1985-02-07 22:06:32 +00:00
|
|
|
.define .csa
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
1985-02-07 22:06:32 +00:00
|
|
|
|
1986-07-22 13:37:16 +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:
|
|
|
|
move.w #ECASE,-(sp)
|
1987-03-27 12:43:17 +00:00
|
|
|
jmp .fatal
|
1986-07-22 13:37:16 +00:00
|
|
|
|
1985-02-07 22:06:32 +00:00
|
|
|
.align 2
|