home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
SOFTWARE
/
LIBS
/
PMC101.ZIP
/
LIBSRC.ZIP
/
STRNCAT.ASM
(
.txt
)
< prev
next >
Wrap
Assembly Source File
|
1994-06-14
|
787b
|
49 lines
.386p
locals
public STRNCAT
_TEXT segment byte public use32 'CODE'
assume cs:_TEXT
STRNCAT:
push esi edi
cld
mov edi,[esp+4+8+08h]
mov edx,edi
or ecx,-1
xor al,al
repne scasb
lea esi,[edi-1]
mov edi,[esp+4+8+04h]
or ecx,-1
repne scasb
not ecx
sub edi,ecx
dec ecx
mov eax,edx
mov edx,[esp+4+8+00h]
cmp ecx,edx
jbe short @@00
mov ecx,edx
@@00:
xchg edi,esi
mov edx,ecx
shr ecx,2
rep movsd
mov ecx,edx
and ecx,3
rep movsb
mov byte ptr [edi],0
pop edi esi
ret 0ch
_TEXT ends
end