;       Static Name Aliases
;
        TITLE   strmov
;       NAME    strmov.C
;
;   strmov(dst, src) moves all the  characters  of  src  (including  the
;   closing NUL) to dst, and returns a pointer to the new closing NUL in
;   dst.
;
;   strmov(strmov(dst,a),b) moves a+b into dst.

        .287
_TEXT   SEGMENT  BYTE PUBLIC 'CODE'
_TEXT   ENDS
_DATA   SEGMENT  WORD PUBLIC 'DATA'
_DATA   ENDS
CONST   SEGMENT  WORD PUBLIC 'CONST'
CONST   ENDS
_BSS    SEGMENT  WORD PUBLIC 'BSS'
_BSS    ENDS
DGROUP  GROUP   CONST,  _BSS,   _DATA
        ASSUME  CS: _TEXT, DS: DGROUP, SS: DGROUP, ES: DGROUP
EXTRN   __chkstk:NEAR
_TEXT      SEGMENT
; Line 15
        PUBLIC  _strmov
_strmov PROC NEAR
        push    bp
        mov     bp,sp
        push    di
        push    si

;       dst = 4
;       register di = dst
;       src = 6
;       register si = src

        mov     di,[bp+4]       ;dst
        mov     si,[bp+6]       ;src
$loop:
        movsb
        cmp     byte ptr [di- 1],0
        jne     $loop

        lea     ax,[di-1]
        pop     si
        pop     di
        mov     sp,bp
        pop     bp
        ret

_strmov ENDP
_TEXT   ENDS
END
