Category : Assembly Language Source Code
Archive   : RHSTDLIB.ZIP
Filename : STRCPYL.ASM

 
Output of file : STRCPYL.ASM contained in archive : RHSTDLIB.ZIP
stdlib segment para public 'slcode'
assume cs:stdlib
;
;
; strcpyl- Copies string pointed at by cs:rtnadrs to es:di.
;
;
; inputs:
; cs:rtn- Zero-terminated source string.
; es:di- Buffer for destination string.
; outputs:
; es:di- Still points at destination string.
;
;
; Note: The destination buffer must be large enough to hold the string and
; zero terminating byte.
;
public sl_strcpyl
;
rtnadrs equ 6[bp]
destptr equ 2[bp]
;
sl_strcpyl proc far
push es
push di
push bp
mov bp, sp
push ds
push cx
push ax
pushf
push si
;
cld
mov al, 0
mov cx, 0ffffh
les di, rtnadrs
repne scasb
lds si, rtnadrs
mov rtnadrs, di
les di, destptr
neg cx
dec cx
shr cx, 1
jnc CpyWrd
lodsb
stosb
CpyWrd: rep movsw
;
DidByte: pop si
popf
pop ax
pop cx
pop ds
pop bp
pop di
pop es
ret
sl_strcpyl endp
;
;
stdlib ends
end


  3 Responses to “Category : Assembly Language Source Code
Archive   : RHSTDLIB.ZIP
Filename : STRCPYL.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/