|
|
Microsoft OS/2 SDK PM 08-08-1988
title indos.asm
;****************************************************************/
;* */
;* Windows Cardfile */
;* (c) Copyright Microsoft Corp. 1985 - All Rights Reserved */
;* */
;****************************************************************/
.xlist
include cmacros.inc
.list
createSeg _FILE,nrfile,byte,public,CODE
sBegin DATA
globalD resZero,0
sEnd DATA
sBegin NRFILE
assumes CS,NRFILE
assumes DS,DATA
;
; MyStrlen
;
cProc Mylstrlen,<PUBLIC,FAR>,<di>
parmD lpStr
cBegin
les di,lpStr
cld
xor ax,ax ; get zero in ax
mov cx,-1 ; at most 64 k to move
repnz scasb ; look for end
mov ax,cx
neg ax
dec ax
dec ax
cEnd
;
;MyStrcpy:
;
cProc Mylstrcpy,<PUBLIC,FAR>,<si,di,ds>
parmD lpDst
parmD lpSrc
cBegin
lds si,lpSrc
les di,lpDst
cld
Mycp1: lodsb
stosb
or al,al
jnz Mycp1
mov ax,di ; point at last byte copied
dec ax
mov dx,es ; and segment
cEnd
;
;MyStrcat:
;
cProc Mylstrcat,<PUBLIC,FAR>,<si,di,ds>
parmD lpDst
parmD lpSrc
cBegin
lds si,lpSrc
les di,lpDst
cld
xor ax,ax ; get zero in ax
mov cx,-1 ; at most 64 k to look
repnz scasb ; look for end
dec di ; Point at null byte
Myct1: lodsb
stosb
or al,al
jnz Myct1
mov ax,di ; point at last byte copied
dec ax
mov dx,es ; and segment
cEnd
;
;MyStrcmp:
;
cProc Mylstrcmp,<PUBLIC,FAR>,<si,di,ds>
parmD lps1
parmD lps2
cBegin
lds si,lps1
les di,lps2
cld
xor ax,ax ; clear out ah
Mycmploop:
lodsb
mov bl,es:[di]
inc di
cmp bl,al
jnz MyNeq
or al,al
jnz Mycmploop
xor ax,ax ; equal
jmp short MSEnd
MyNeq:
mov ax,1 ; not equal
MSEnd:
cEnd
sEnd NRFILE
end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.