ack/mach/m68k4/libem/trp.s

42 lines
511 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:
cmp.l #16,4(sp)
1985-02-07 22:06:32 +00:00
bcc 1f
move.l d0,-(sp)
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
jsr __cleanup
1985-02-07 22:06:32 +00:00
jmp EXIT
.sect .data
1985-02-07 22:06:32 +00:00
fmt: .asciz "trap %d called\n"
.align 2