Annotation of coherent/g/usr/lib/misc/memxch.m, revision 1.1

1.1     ! root        1: /*
        !             2:  * void * memxch(void *buf1, void *buf2, size_t size)
        !             3:  * exchanges buf1 & buf2 for size.
        !             4:  */
        !             5: #include <larges.h>
        !             6: buf1   =       LEFTARG
        !             7: buf2   =       buf1+DPL
        !             8: size   =       buf2+DPL
        !             9:        Enter(memxch_)
        !            10:        mov     cx, size(bp)
        !            11:        Les     si, buf1(bp)
        !            12:        Lds     di, buf2(bp)
        !            13:        shr     cx, $1
        !            14:        jnc     1f
        !            15:        movb    al, Pes (di)
        !            16:        movsb
        !            17:        movb    -1(si), al
        !            18: 1:
        !            19:        jcxz    3f
        !            20: 2:
        !            21:        mov     ax, Pes (di)
        !            22:        movs
        !            23:        mov     -2(si), ax
        !            24:        loop    2b
        !            25: 3:
        !            26:        Leave

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.