ack/mach/z8000/libem/csa.s

25 lines
316 B
ArmAsm
Raw Normal View History

1985-01-08 11:48:43 +00:00
.define csa
1987-01-19 10:51:50 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-01-08 11:48:43 +00:00
!R1 contains address of jump table
!R2 contains case index
csa:
sub R2, 2(R1)
jr LT, 1f
cp R2, 4(R1)
jr UGT, 1f
sla R2
add R1, R2
ld R2, 06(R1)
cp R2, $0
jr EQ, 2f
jp 0(R2)
1: ld R1, 0(R1)
jp NE, 0(R1)
2: push *RR14, $ECASE
jr fatal