Category : Files from Magazines
Archive   : TINYLIB.ZIP
Filename : STRCAT.ASM

 
Output of file : STRCAT.ASM contained in archive : TINYLIB.ZIP
include compiler.inc
ttl STRCAT, 1.04, 08-30-86, clr

;string function - catenates 2nd string on end of 1st
; - catenates 2nd string on end of 1st with max characters
dseg

cseg

procdef strncat, <, , >
mov cx,cnt
jmp short start

entrdef strcat
mov cx,7fffh

start:
pushreg
pushds

push cx
ldptr di,dest
xor al,al
mov cx,7fffh
cld
repnz scasb
dec di
ldptr si,src
pop cx
lp:
lodsb
stosb
or al,al
jz ex

loop lp
xor al,al
stosb
;
ex:
clc
retptrm dest

pend strncat

finish



  3 Responses to “Category : Files from Magazines
Archive   : TINYLIB.ZIP
Filename : STRCAT.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/