ack/mach/m68k4/libem/csa.s

33 lines
536 B
ArmAsm
Raw Normal View History

1985-02-07 22:06:32 +00:00
.define .csa
.sect .text
.sect .rom
.sect .data
.sect .bss
1985-02-07 22:06:32 +00:00
.sect .text
1985-02-07 22:06:32 +00:00
.csa:
move.l (sp)+,a0 ! case descriptor
move.l (sp)+,d0 ! index
move.l (a0)+,a1 ! default address
sub.l (a0)+,d0 ! index - lower bound
blt 1f
cmp.l (a0)+,d0 ! rel. index <-> upper - lower bound
bgt 1f
asl.l #2,d0
add.l d0,a0
move.l (a0),d0 ! test jump address
beq 1f
move.l d0,-(sp)
bra 3f
1:
move.l a1,d0 ! test default jump address
beq 2f
move.l a1,-(sp) ! jump address
3:
rts ! not a real rts
2:
1987-11-16 15:52:57 +00:00
move.l #ECASE,-(sp)
1987-03-27 12:43:17 +00:00
jmp .fatal
1985-02-07 22:06:32 +00:00
.align 2