diff --git a/pages/e01-01 b/pages/e01-01 index 21b76aa..02eac02 100644 --- a/pages/e01-01 +++ b/pages/e01-01 @@ -1,4 +1,5 @@ / u1 -- unix + unkni: / used for all system calls sysent: incb sysflg / indicate a system routine is diff --git a/pages/e06-01 b/pages/e06-01 index 460f933..d48283a 100644 --- a/pages/e06-01 +++ b/pages/e06-01 @@ -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 _ diff --git a/pages/e06-02 b/pages/e06-02 index 84c34b1..4f552ea 100644 --- a/pages/e06-02 +++ b/pages/e06-02 @@ -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 diff --git a/pages/e06-03 b/pages/e06-03 index 12106f1..dae148d 100644 --- a/pages/e06-03 +++ b/pages/e06-03 @@ -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 diff --git a/pages/e06-04 b/pages/e06-04 index d6a60ed..2213735 100644 --- a/pages/e06-04 +++ b/pages/e06-04 @@ -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