fixes from Nigel Hall
This commit is contained in:
parent
1d98b5fd02
commit
9258a2a3e9
3 changed files with 18 additions and 23 deletions
|
@ -9,14 +9,7 @@
|
|||
|
||||
!r0 contains descriptor addres
|
||||
.gto:
|
||||
addr 0(sp), r7 !first put future localbase in sp
|
||||
subd 8(r0), r7
|
||||
subd 4, r7
|
||||
adjspd r7 !done
|
||||
movd -4(sp), r1 !save this memory location
|
||||
enter[], 0 !adjust local base
|
||||
movd r1, 0(sp) !restore saved memory location
|
||||
addr 0(sp), r7 !adjust stackpointer now
|
||||
subd 4(r0), r7
|
||||
adjspd r7
|
||||
jump r0 !adjust programcounter
|
||||
lprd fp,8(r0)
|
||||
lprd sp,4(r0)
|
||||
movd 0(r0),tos
|
||||
ret 0
|
||||
|
|
|
@ -7,12 +7,14 @@
|
|||
|
||||
.sect .text
|
||||
|
||||
! putchar, for a unix
|
||||
|
||||
.putchar:
|
||||
save [r0, r1, r2, r3]
|
||||
movqd 4, r0
|
||||
addr 20(sp), r1
|
||||
movqd 1, r2
|
||||
xord r3, r3
|
||||
svc
|
||||
restore[r0,r1,r2,r3]
|
||||
ret 1
|
||||
enter [],0
|
||||
movqd 1,tos
|
||||
addr 8(fp),tos
|
||||
movqd 1,tos
|
||||
bsr _write
|
||||
asjspb -12
|
||||
exit []
|
||||
ret 0
|
||||
|
|
|
@ -10,12 +10,11 @@
|
|||
.trp:
|
||||
save [r0, r1]
|
||||
movd 12(sp), r0 !error number
|
||||
movd r0,tos
|
||||
cmpd r0, 16
|
||||
bge 1f
|
||||
sbitd r0, r1
|
||||
andw @.ignmask, r1
|
||||
beq 1f
|
||||
br 3f !do not trap
|
||||
tbitd r0, @.ignmask
|
||||
bfs 3f !do not trap
|
||||
1: !do trap
|
||||
movd @.trpreg, r1
|
||||
cmpqd 0, r1
|
||||
|
@ -23,6 +22,7 @@
|
|||
movqd 0, @.trpreg
|
||||
jsr r1
|
||||
3:
|
||||
adjspd $-4
|
||||
restore [r0, r1]
|
||||
ret 4
|
||||
2:
|
||||
|
|
Loading…
Reference in a new issue