home *** CD-ROM | disk | FTP | other *** search
- XDEF _strncmp
- section code
- _strncmp:
- move.l (8,a0),d0 ;size
- beq.b zerout
- move.l (4,a0),a1 ; buf2
- move.l (a0),a0 ; buf1
- lp:
- move.b (a1)+,d1
- beq.b posout
- tst.b (a0)
- beq.b negout
- cmp.b (a0)+,d1
- beq.b lp2
- bcc.b negout
- bcs.b posout
- lp2:
- subq #1,d0
- bne lp
- zerout:
- clr.l d0
- rts
- posout:
- tst.b (a0)
- beq zerout
- clr.l d0
- addq #1,d0
- rts
- negout:
- clr.l d0
- subq #1,d0
- rts