fix in csb: must be able to handle 0 cases

This commit is contained in:
ceriel 1988-03-17 09:24:01 +00:00
parent 0030ddd97f
commit 2c01d45a49
3 changed files with 4 additions and 2 deletions

View file

@ -12,6 +12,8 @@
.csb: .csb:
save[r2,r3] save[r2,r3]
movd 4(r1), r2 !number of entries movd 4(r1), r2 !number of entries
cmpqd 0, r2
beq 3f
movd r1, r3 movd r1, r3
1: 1:
addd 8, r3 !find addres of next index addd 8, r3 !find addres of next index

View file

@ -15,6 +15,6 @@
addr 8(fp),tos addr 8(fp),tos
movqd 1,tos movqd 1,tos
bsr _write bsr _write
asjspb -12 adjspb -12
exit [] exit []
ret 0 ret 0

View file

@ -22,7 +22,7 @@
movqd 0, @.trpreg movqd 0, @.trpreg
jsr r1 jsr r1
3: 3:
adjspd $-4 adjspd -4
restore [r0, r1] restore [r0, r1]
ret 4 ret 4
2: 2: