home *** CD-ROM | disk | FTP | other *** search
- ; (4,a7) - str1
- ; (8,a7) - str2
- ; (12,a7) - length=-1
-
- xdef _OStrCmp
-
- _OStrCmp move.l (4,a7),a0
- move.l (8,a7),a1
- move.l (12,a7),d0
- .loop cmpm.b (a1)+,(a0)+
- bne.s .nosame
- tst.b (-1,a0)
- beq.s .same
- dbf.s d0,.loop
- .same moveq #0,d0
- rts
- .nosame move.b (-1,a0),d0
- cmp.b (-1,a1),d0
- bgt.s .higher
- .lower moveq #1,d0
- rts
- .higher moveq #-1,d0
- rts
-