1984-12-14 15:41:14 +00:00
|
|
|
.define .trp
|
1985-06-04 10:57:42 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
1984-12-14 15:41:14 +00:00
|
|
|
|
1985-06-04 10:57:42 +00:00
|
|
|
.sect .text
|
1984-12-14 15:41:14 +00:00
|
|
|
.trp:
|
|
|
|
move.l (sp)+,a1 ! return address
|
|
|
|
move.w (sp)+,d0 ! error number
|
|
|
|
move.l a1,-(sp)
|
|
|
|
move.w d0,-(sp)
|
|
|
|
cmp #16,d0
|
|
|
|
bcc 1f
|
1991-06-26 17:32:09 +00:00
|
|
|
cmp #8,d0
|
|
|
|
bcc 4f
|
1984-12-14 15:41:14 +00:00
|
|
|
btst d0,.trpim
|
1991-06-26 17:32:09 +00:00
|
|
|
bra 5f
|
|
|
|
4:
|
|
|
|
btst d0,.trpim+1
|
|
|
|
5:
|
1984-12-14 15:41:14 +00:00
|
|
|
bne 3f
|
|
|
|
1:
|
|
|
|
move.l .trppc,a0
|
|
|
|
move.l a0,d0
|
|
|
|
beq 9f
|
|
|
|
clr.l .trppc
|
|
|
|
jsr (a0)
|
|
|
|
3:
|
|
|
|
add #2,sp
|
|
|
|
rts
|
|
|
|
9:
|
|
|
|
pea fmt
|
|
|
|
jsr .diagnos
|
|
|
|
jmp EXIT
|
|
|
|
|
1985-06-04 10:57:42 +00:00
|
|
|
.sect .data
|
|
|
|
.rettrp: .data4 0
|
1984-12-14 15:41:14 +00:00
|
|
|
fmt: .asciz "trap %d called\n"
|
|
|
|
.align 2
|