home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Shareware Magazine 1996 December
/
CD_shareware_12-96.iso
/
DOS
/
Programa
/
CCDL122.ZIP
/
CLIBS
/
STRING
/
68K
/
MEMCHR.SRC
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1996-08-02
|
278 b
|
21 lines
xdeF _memchr
section code
_memchr:
move.l (4,a0),d1 ; char
move.l (8,a0),d2 ; downward count
move.l (a0),a0 ; buffer
lp:
cmp.b (a0),d1
beq.b out
tst.b (a0)
beq.b badout
addq.l #1,a0
subq #1,d2
bne lp
badout:
clr.l d0
out:
move.l a0,d0
rts