1985-02-07 22:06:32 +00:00
|
|
|
.define .trp
|
|
|
|
|
|
|
|
.text
|
|
|
|
.trp:
|
|
|
|
move.l (sp)+,a2 ! return address
|
1985-03-04 15:33:28 +00:00
|
|
|
move.l (sp)+,d0 ! error number
|
1985-02-07 22:06:32 +00:00
|
|
|
move.l a2,-(sp)
|
1985-03-04 15:33:28 +00:00
|
|
|
move.l d0,-(sp)
|
|
|
|
cmp.l #16,d0
|
1985-02-07 22:06:32 +00:00
|
|
|
bcc 1f
|
|
|
|
btst d0,.trpim
|
|
|
|
bne 3f
|
|
|
|
1:
|
|
|
|
move.l .trppc,a0
|
|
|
|
move.l a0,d0
|
|
|
|
beq 9f
|
|
|
|
clr.l .trppc
|
|
|
|
jsr (a0)
|
|
|
|
3:
|
1985-03-04 15:33:28 +00:00
|
|
|
add #4,sp
|
1985-02-07 22:06:32 +00:00
|
|
|
rts
|
|
|
|
9:
|
|
|
|
pea fmt
|
|
|
|
jsr .diagnos
|
1985-03-04 15:33:28 +00:00
|
|
|
add #4,sp
|
|
|
|
jsr __cleanup
|
1985-02-07 22:06:32 +00:00
|
|
|
jmp EXIT
|
|
|
|
|
|
|
|
.data
|
|
|
|
fmt: .asciz "trap %d called\n"
|
|
|
|
.align 2
|