home *** CD-ROM | disk | FTP | other *** search
-
- * Maxon C++
- * Library-Modul "mem_cmp"
- * Jens Gelhar 11.09.91, 15.04.94
- * (Oh Fuck, ist das mal wieder langweilig!)
-
- xdef _memcmp,memcmp__PCvPCvUi
- xdef _memchr,memchr__PCviUi
-
- _memcmp:
- memcmp__PCvPCvUi:
- movem.l 4(a7),a0/a1
- move.l 12(a7),d1
- beq.b equal
- loop move.b (a0)+,d0
- cmp.b (a1)+,d0
- bne.b noneq
- subq.l #1,d1
- bne.b loop
- equal moveq #0,d0
- rts
- noneq bhi.b great
- moveq #-1,d0
- rts
- great moveq #1,d0
- rts
-
- _memchr:
- memchr__PCviUi:
- move.l 4(a7),a0
- movem.l 8(a7),d0/d1
- tst.l d1
- beq.b nix
- such cmp.b (a0)+,d0
- beq.b find
- subq.l #1,d1
- bne.b such
- nix moveq #0,d0
- rts
- find move.l a0,d0
- subq.l #1,d0
- rts
-
- end
-