ack/mach/m68020/libem/trp.s

51 lines
725 B
ArmAsm
Raw Permalink Normal View History

1989-06-09 09:32:40 +00:00
#
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
cmp.l #16, d0
bcc 1f
move.l (.ignmask), d1
1987-01-29 22:10:18 +00:00
btst d0, d1
bne 3f
1:
move.l (.trppc), a0
1989-06-09 09:32:40 +00:00
move.l a0, d1
1987-01-29 22:10:18 +00:00
beq 9f
clr.l (.trppc)
1989-06-09 09:32:40 +00:00
movem.l d2-d7/a1-a5,-(sp)
#if _M68881
fmovem.x fp0-fp7,-(sp)
#endif
move.l d0,-(sp)
1987-01-29 22:10:18 +00:00
jsr (a0)
add.l #4, sp
1989-06-09 09:32:40 +00:00
#if _M68881
1989-06-09 09:53:29 +00:00
fmovem.x (sp)+,fp0-fp7
1989-06-09 09:32:40 +00:00
#endif
movem.l (sp)+,d2-d7/a1-a5
3:
1987-01-29 22:10:18 +00:00
movem.l (sp)+, d0/d1/a0
add.l #4, sp
rts
9:
1988-10-03 10:53:47 +00:00
move.l d0,-(sp)
1991-09-02 17:00:19 +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
illegal
1992-06-30 15:22:07 +00:00
jmp (EXIT)
1987-01-29 22:10:18 +00:00
.align 2