1985-02-07 22:06:32 +00:00
|
|
|
.define .trp
|
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
|
|
|
.trp:
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l d0,-(sp)
|
1986-10-27 09:57:42 +00:00
|
|
|
cmp.l #16,8(sp)
|
|
|
|
bcc 1f
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l 8(sp),d0
|
1985-02-07 22:06:32 +00:00
|
|
|
btst d0,.trpim
|
|
|
|
bne 3f
|
|
|
|
1:
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l a0,-(sp)
|
1985-02-07 22:06:32 +00:00
|
|
|
move.l .trppc,a0
|
|
|
|
move.l a0,d0
|
|
|
|
beq 9f
|
|
|
|
clr.l .trppc
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l 12(sp),-(sp)
|
1985-02-07 22:06:32 +00:00
|
|
|
jsr (a0)
|
1986-07-22 13:37:16 +00:00
|
|
|
add.l #4,sp
|
|
|
|
move.l (sp)+,a0
|
1985-02-07 22:06:32 +00:00
|
|
|
3:
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l (sp)+,d0
|
|
|
|
move.l (sp)+,(sp)
|
1985-02-07 22:06:32 +00:00
|
|
|
rts
|
|
|
|
9:
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l (sp)+,a0
|
|
|
|
move.l (sp)+,d0
|
|
|
|
move.l 4(sp),-(sp)
|
1985-02-07 22:06:32 +00:00
|
|
|
pea fmt
|
|
|
|
jsr .diagnos
|
1985-03-04 15:33:28 +00:00
|
|
|
add #4,sp
|
1985-02-07 22:06:32 +00:00
|
|
|
jmp EXIT
|
|
|
|
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .data
|
1986-10-27 09:57:42 +00:00
|
|
|
fmt: .asciz "EM trap %d called\n"
|
1985-02-07 22:06:32 +00:00
|
|
|
.align 2
|