ack/mach/m68020/libem/trp.s

40 lines
556 B
ArmAsm
Raw Normal View History

1987-01-29 22:10:18 +00:00
.define .trp
.sect .text
.sect .rom
.sect .data
1988-11-04 09:55:50 +00:00
fmt: .asciz "%s\n"
1987-01-29 22:10:18 +00:00
.sect .bss
.sect .text
.trp:
movem.l d0/d1/a0, -(sp)
1987-03-05 19:27:53 +00:00
move.l (12, sp), a0 ! return address
move.l (16, sp), d0 ! error number
move.l a0, (16, sp)
move.l d0, (12, sp)
1987-01-29 22:10:18 +00:00
move.l d0,-(sp)
cmp.l #16, d0
bcc 1f
move.l (.trpim), d1
btst d0, d1
bne 3f
1:
move.l (.trppc), a0
move.l a0, d0
beq 9f
clr.l (.trppc)
jsr (a0)
3:
add.l #4, sp
movem.l (sp)+, d0/d1/a0
add.l #4, sp
rts
9:
1988-10-03 10:53:47 +00:00
jsr (.trpstr)
move.l d0,-(sp)
1988-11-04 09:55:50 +00:00
pea (fmt)
1987-01-29 22:10:18 +00:00
jsr (.diagnos)
lea (4, sp), sp
1988-10-03 10:53:47 +00:00
jsr (_exit)
1987-01-29 22:10:18 +00:00
.align 2