Annotation of coherent/b/lib/libc/string/i8086/strcpy.m, revision 1.1

1.1     ! root        1: //////////
        !             2: / i8086 C string library.
        !             3: / strcpy()
        !             4: / ANSI 4.11.2.3.
        !             5: //////////
        !             6: 
        !             7: //////////
        !             8: / char *
        !             9: / strcpy(To, From)
        !            10: / char *To, *From;
        !            11: /
        !            12: / Copy From to To until NUL.
        !            13: //////////
        !            14: 
        !            15: #include <larges.h>
        !            16: 
        !            17: To     =       LEFTARG
        !            18: From   =       To+DPL
        !            19: 
        !            20:        Enter(strcpy_)
        !            21:        Lds     si, From(bp)    / From address to DS:SI
        !            22:        Les     di, To(bp)      / To address to ES:DI
        !            23:        cld
        !            24: 
        !            25: 1:     lodsb                   / From character to AL
        !            26:        stosb                   / and stored to To
        !            27:        orb     al, al
        !            28:        jne     1b              / Not done
        !            29:        mov     ax, To(bp)      / Return the destination
        !            30: #if    LARGEDATA
        !            31:        mov     dx, es
        !            32: #endif
        !            33:        Leave

unix.superglobalmegacorp.com

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