Category : Assembly Language Source Code
Archive   : TASMSWAN.ZIP
Filename : COPYSTR.ASM

 
Output of file : COPYSTR.ASM contained in archive : TASMSWAN.ZIP
%TITLE "Copy String external Turbo C function"

IDEAL
MODEL small

CODESEG

PUBLIC _copystring

%NEWPAGE
;-----------------------------------------------------------------------------
; void copystring(unsigned char far * source, unsigned char far * destination, int sourcelen)
;-----------------------------------------------------------------------------
PROC _copystring NEAR
ARG source:DWord, destination:DWord, sourcelen:Word

push bp
mov bp,sp
mov cx,[sourcelen]
jcxz @@99
push ds
les di,[destination]
lds si,[source]
cld
rep movsb
pop ds
@@99:
pop bp
ret
ENDP _copystring

END


  3 Responses to “Category : Assembly Language Source Code
Archive   : TASMSWAN.ZIP
Filename : COPYSTR.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/