1
0
mirror of https://github.com/DoctorWkt/unix-jun72.git synced 2026-04-05 05:23:12 +00:00

fixed missing readi, added some missing whitespace

This commit is contained in:
brad@heeltoe.com
2008-05-01 11:21:20 +00:00
parent d54a9a7402
commit 22b1ac41c5
5 changed files with 14 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
/ u1 -- unix
unkni: / used for all system calls
sysent:
incb sysflg / indicate a system routine is

View File

@@ -1,5 +1,6 @@
/ u6 -- unix
read:
readi:
clr u.nread / accumulates number of bytes transmitted
tst u.count / is number of bytes to be read greater than 0
bgt 1f / yes, branch
@@ -37,6 +38,7 @@ read:
rcvt / tty6
rcvt / tty7
rcrd/ crd
rtty: / read from console tty
mov tty+[8*ntty]-8+6,r5 / r5 is the address of the 4th word of
/ of the control and status block _

View File

@@ -1,8 +1,10 @@
dec 2(r5) / decrement the character count
jsr r0,passc / move the character to core (user)
br 1b / get next character
ret1:
jmp ret / return to caller via 'ret'
rppt: / read paper tape
jsr r0,pptic / gets next character in clist for ppt input and
/ places
@@ -47,6 +49,7 @@ dskr:
tst u.count / all bytes read off disk
bne dskr
br ret
passc:
movb r1,*u.base / move a character to the next byte of the
/ users buffer

View File

@@ -6,9 +6,10 @@
/ 'readi' by:
ret: / (1) pop the return address off the stack into r0
mov (sp)+,r1 / (2) pup the i-number off the stack into r1
1 : .
1:
clr *$ps / clear processor status
rts r0 / return to address currently on top of stack
writei:
clr u.nread / clear the number of bytes transmitted during
/ read or write calls

View File

@@ -41,14 +41,15 @@ wmem: / transfer characters from a user area of core to memory file
br wmem / continue
1:
jmp error / ?
dskw: / write routine for non-special files
mov (sp),r1 / get an i-node number from the stack into r1
jsr r0,iget / write i-node out (if modified), read i-node 'r1'
/ into i-node area of core
mov *u.fofp,r2 / put the file offset [(u.off) or the offset in
mov *u.fofp,r2 / put the file offset [(u.off) or the offset in
/ the fsp entry for this file] in r2
add u.count,r2 / no. of bytes to be written + file offset is
add u.count,r2 / no. of bytes to be written + file offset is
/ put in r2
cmp r2,i.size / is this greater than the present size of
cmp r2,i.size / is this greater than the present size of
/ the file?
blos 1f / no, branch
blos 1f / no, branch