home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
SOFTWARE
/
LIBS
/
PMC101.ZIP
/
LIBSRC.ZIP
/
STRNCPY.ASM
(
.txt
)
< prev
next >
Wrap
Assembly Source File
|
1994-06-14
|
849b
|
54 lines
.386p
locals
extrn STRLEN:near
extrn MEMCPY:near
extrn MEMSET:near
public STRNCPY
_TEXT segment byte public use32 'CODE'
assume cs:_TEXT
STRNCPY:
push ebx esi edi
mov edi,[esp+4+12+08h]
mov ebx,[esp+4+12+04h]
push ebx
call STRLEN
mov esi,eax
mov eax,[esp+4+12+00h]
cmp esi,eax
jbe short @@01
push edi
push ebx
push eax
call MEMCPY
jmp short @@00
@@01:
push edi
push ebx
push esi
call MEMCPY
mov eax,[esp+4+12+00h]
sub eax,esi
add esi,edi
push esi
push 0
push eax
call MEMSET
@@00:
mov eax,edi
pop edi esi ebx
ret 0ch
_TEXT ends
end