ack/mach/m68k4/libem/trp.s

41 lines
499 B
ArmAsm
Raw Normal View History

1985-02-07 22:06:32 +00:00
.define .trp
.sect .text
.sect .rom
.sect .data
.sect .bss
1985-02-07 22:06:32 +00:00
.sect .text
1985-02-07 22:06:32 +00:00
.trp:
move.l d0,-(sp)
cmp.l #16,8(sp)
bcc 1f
move.l 8(sp),d0
1985-02-07 22:06:32 +00:00
btst d0,.trpim
bne 3f
1:
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
move.l 12(sp),-(sp)
1985-02-07 22:06:32 +00:00
jsr (a0)
add.l #4,sp
move.l (sp)+,a0
1985-02-07 22:06:32 +00:00
3:
move.l (sp)+,d0
move.l (sp)+,(sp)
1985-02-07 22:06:32 +00:00
rts
9:
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
add #4,sp
1985-02-07 22:06:32 +00:00
jmp EXIT
.sect .data
fmt: .asciz "EM trap %d called\n"
1985-02-07 22:06:32 +00:00
.align 2