ack/mach/m68k4/libem/cmu.s

33 lines
418 B
ArmAsm
Raw Normal View History

1985-02-07 22:06:32 +00:00
.define .cmu
.sect .text
.sect .rom
.sect .data
.sect .bss
1985-02-07 22:06:32 +00:00
! d0 : # bytes of 1 block
.sect .text
1985-02-07 22:06:32 +00:00
.cmu:
move.l sp,a0 ! top block
add.l #4,a0
move.l a0,a1
1985-02-07 22:06:32 +00:00
add.l d0,a1 ! lower block
move.l d0,d2
asr.l #2,d0
sub.l #1,d0
move.l #1,d1 ! greater
1:
cmp.l (a0)+,(a1)+
bne 2f
dbf d0,1b
clr.l d1 ! equal
2:
bcc 3f
neg.l d1 ! less
3:
asl.l #1,d2
move.l (sp)+,a0
1985-02-07 22:06:32 +00:00
add.l d2,sp ! new sp
jmp (a0)
1985-02-07 22:06:32 +00:00
.align 2