fixes from Nigel Hall

This commit is contained in:
ceriel 1988-03-10 16:00:58 +00:00
parent 1d98b5fd02
commit 9258a2a3e9
3 changed files with 18 additions and 23 deletions

View file

@ -9,14 +9,7 @@
!r0 contains descriptor addres !r0 contains descriptor addres
.gto: .gto:
addr 0(sp), r7 !first put future localbase in sp lprd fp,8(r0)
subd 8(r0), r7 lprd sp,4(r0)
subd 4, r7 movd 0(r0),tos
adjspd r7 !done ret 0
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

View file

@ -7,12 +7,14 @@
.sect .text .sect .text
! putchar, for a unix
.putchar: .putchar:
save [r0, r1, r2, r3] enter [],0
movqd 4, r0 movqd 1,tos
addr 20(sp), r1 addr 8(fp),tos
movqd 1, r2 movqd 1,tos
xord r3, r3 bsr _write
svc asjspb -12
restore[r0,r1,r2,r3] exit []
ret 1 ret 0

View file

@ -10,12 +10,11 @@
.trp: .trp:
save [r0, r1] save [r0, r1]
movd 12(sp), r0 !error number movd 12(sp), r0 !error number
movd r0,tos
cmpd r0, 16 cmpd r0, 16
bge 1f bge 1f
sbitd r0, r1 tbitd r0, @.ignmask
andw @.ignmask, r1 bfs 3f !do not trap
beq 1f
br 3f !do not trap
1: !do trap 1: !do trap
movd @.trpreg, r1 movd @.trpreg, r1
cmpqd 0, r1 cmpqd 0, r1
@ -23,6 +22,7 @@
movqd 0, @.trpreg movqd 0, @.trpreg
jsr r1 jsr r1
3: 3:
adjspd $-4
restore [r0, r1] restore [r0, r1]
ret 4 ret 4
2: 2: