Added saving of registers
This commit is contained in:
parent
3b4a813a6c
commit
2b8ee048c8
1 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#
|
||||||
.define .trp
|
.define .trp
|
||||||
.sect .text
|
.sect .text
|
||||||
.sect .rom
|
.sect .rom
|
||||||
|
@ -12,7 +13,6 @@ fmt: .asciz "%s\n"
|
||||||
move.l (16, sp), d0 ! error number
|
move.l (16, sp), d0 ! error number
|
||||||
move.l a0, (16, sp)
|
move.l a0, (16, sp)
|
||||||
move.l d0, (12, sp)
|
move.l d0, (12, sp)
|
||||||
move.l d0,-(sp)
|
|
||||||
cmp.l #16, d0
|
cmp.l #16, d0
|
||||||
bcc 1f
|
bcc 1f
|
||||||
move.l (.trpim), d1
|
move.l (.trpim), d1
|
||||||
|
@ -20,12 +20,21 @@ fmt: .asciz "%s\n"
|
||||||
bne 3f
|
bne 3f
|
||||||
1:
|
1:
|
||||||
move.l (.trppc), a0
|
move.l (.trppc), a0
|
||||||
move.l a0, d0
|
move.l a0, d1
|
||||||
beq 9f
|
beq 9f
|
||||||
clr.l (.trppc)
|
clr.l (.trppc)
|
||||||
|
movem.l d2-d7/a1-a5,-(sp)
|
||||||
|
#if _M68881
|
||||||
|
fmovem.x fp0-fp7,-(sp)
|
||||||
|
#endif
|
||||||
|
move.l d0,-(sp)
|
||||||
jsr (a0)
|
jsr (a0)
|
||||||
3:
|
|
||||||
add.l #4, sp
|
add.l #4, sp
|
||||||
|
#if _M68881
|
||||||
|
fmovem.x (sp)+,fp0-fp7,-(sp)
|
||||||
|
#endif
|
||||||
|
movem.l (sp)+,d2-d7/a1-a5
|
||||||
|
3:
|
||||||
movem.l (sp)+, d0/d1/a0
|
movem.l (sp)+, d0/d1/a0
|
||||||
add.l #4, sp
|
add.l #4, sp
|
||||||
rts
|
rts
|
||||||
|
|
Loading…
Reference in a new issue