diff --git a/pages/e00-01 b/pages/e00-01 index 819c97b..26f4283 100644 --- a/pages/e00-01 +++ b/pages/e00-01 @@ -9,7 +9,7 @@ rkcs = 177404 / control status reg rk03/rk11 rcsr = 174000 / receiver status reg dc-11 rcbr = 174002 / receiver buffer reg dc-11 tcsr = 174004 / xmtr status reg dc-11 -tcbr = 174006 / xmtr buffer req dc-11 +tcbr = 174006 / xmtr buffer reg dc-11 tcst = 177340 / dec tape control status tc11/tu56 tccm = 177342 / dec tape command reg tc11/tu56 tcwc = 177344 / word count tc11/tu56 diff --git a/pages/e00-02 b/pages/e00-02 index 7d3d746..3349a2e 100644 --- a/pages/e00-02 +++ b/pages/e00-02 @@ -24,7 +24,7 @@ . = orig+400 / copy in transfer vectors - mov $ecore,sp / put pointer to score in the stack pointer + mov $ecore,sp / put pointer to ecore in the stack pointer jsr r0,copyz; 0; 14 / clear locations 0 to 14 in core mov $4,r0 clr r1 diff --git a/pages/e00-04 b/pages/e00-04 index e2e2406..f561ca8 100644 --- a/pages/e00-04 +++ b/pages/e00-04 @@ -1,7 +1,7 @@ / free rest of drum .if cold - mov $128.,systm / inltialize word 1 of drum superblock image; + mov $128.,systm / initialize word 1 of drum superblock image; / number of bytes in free storage map=128. mov $64.,systm+2+128. / init. wd 66. of superblock image; # of / bytes in i-node map=64. @@ -52,6 +52,6 @@ dec r1 / next i-node no. = present i-node no.-1 bgt 1b / has i-node 1 been initialized; no, branch -/ initialize i-nodes r1.,...,47. and wr1te the root device, binary, etc., +/ initialize i-nodes r1.,...,47. and write the root device, binary, etc., / directories onto fixed head disk. user temporary, initialization prog. diff --git a/pages/e00-05 b/pages/e00-05 index 26fb899..8361efa 100644 --- a/pages/e00-05 +++ b/pages/e00-05 @@ -14,7 +14,7 @@ / assembled directories header movb (r0)+,i.nlks / set no. of links from header movb (r0)+,i.uid / set user id of owner from header - jsr r0,setimod / set imod=1 to indicate inode modified: also, + jsr r0,setimod / set imod=1 to indicate inode modified; also, / stuff time of modification into i-node mov (r0)+,u.count / set byte count for write call equal to / size of directory @@ -27,7 +27,7 @@ / next 2 instructions not executed during cold boot. bis $2000,sb0 / sb0 I/O queue entry for superblock on drum; - / set blt 10 to 1 + / set bit 10 to 1 jsr r0,ppoke / read drum superblock 1: tstb sb0+1 / has I/O request been honored (for drum)? diff --git a/pages/e01-03 b/pages/e01-03 index 691b23f..2387d53 100644 --- a/pages/e01-03 +++ b/pages/e01-03 @@ -7,8 +7,8 @@ rti / no return from interrupt badsys: - incb u.bsys / turn on the user's bad system flag - mov $3f,u.namep / point u.namep to "core\0\O" + incb u.bsys / turn on the user's bad-system flag + mov $3f,u.namep / point u.namep to "core\0\0" jsr r0,namei / get the i-number for the core image file br 1f / error neg r1 / negate the i-number to open the core image file diff --git a/pages/e01-04 b/pages/e01-04 index fc1d205..5441893 100644 --- a/pages/e01-04 +++ b/pages/e01-04 @@ -39,7 +39,7 @@ intract: / interrupt action cmp (sp)+,(sp)+ / pop clock pointer 1: / now in user area mov r1,-(sp) / save r1 - mov u.ttyp,r1 / pointer to tty buffer in control to r1 + mov u.ttyp,r1 / pointer to tty buffer in control-to r1 cmpb 6(r1),$177 / is the interrupt char equal to "del" beq 1f / yes, 1f clrb 6(r1) / no, clear the byte (must be a quit character) diff --git a/pages/e02-01 b/pages/e02-01 index f0a0e6d..121fa73 100644 --- a/pages/e02-01 +++ b/pages/e02-01 @@ -14,7 +14,7 @@ syslink: / name1, name2 jsr r0,namei / no, get i-number of name2 br .+4 / not found so r1-i-number of current directory / ii = i-number of current directory - br error9 / file already exits., error + br error9 / file already exists., error cmp (sp)+,cdev / u.dirp now points to end of current directory bne error9 mov (sp),u.dirbuf / i-number of name1 into u.dirbuf @@ -31,14 +31,14 @@ error9: jmp error / see 'error' routine isdir: / if the i-node whose i-number is in r1 is a directory there is an - / error unless super user make the call + / error unless super user made the call tstb u.uid / super user beq 1f / yes, don't care mov ii,-(sp) / put current i-number on stack - jsr r0,iget / get i-number into core (i-number in r1) + jsr r0,iget / get i-node into core (i-number in r1) bit $40000,i.flgs / is it a directory bne error9 / yes, error - mov (sp)+,r1 / no, put current i-number back in r1 (ii) + mov (sp)+,r1 / no, put current i-number in r1 (ii) jsr r0,iget / get it back in 1: rts r0 diff --git a/pages/e02-02 b/pages/e02-02 index c9557d9..22575de 100644 --- a/pages/e02-02 +++ b/pages/e02-02 @@ -2,7 +2,7 @@ jsr r0,iget / get i-node jsr r0,setimod / set modified flag decb i.nlks / decrement the number of links - bgt sysret9 / if this was not the last link to the file return + bgt sysret9 / if this was not the last link to file return jsr r0,anyi / if it was, see if anyone has it open. Then / free contents of file and destroy it. br sysret9 @@ -35,7 +35,7 @@ wdir: sysexec: jsr r0,arg2 / arg0 in u.namep,arg1 on top of stack - jsr r0,namei / namei return i-number of file named in + jsr r0,namei / namei returns i-number of file named in / sysexec call in r1 br error9 jsr r0,iget / get i-node for file to be executed diff --git a/pages/e02-03 b/pages/e02-03 index 98c1abc..5e79e5d 100644 --- a/pages/e02-03 +++ b/pages/e02-03 @@ -7,7 +7,7 @@ mov r5,-(sp) / save arguments pointer on stack mov $ecore,r5 / r5 has end of core mov $core,r4 / r4 has start of users core - mov r4,u.base / u.base has start of users ore + mov r4,u.base / u.base has start of users core mov (sp),r2 / move arguments list pointer into r2 1: tst (r2)+ / argument char = "nul" @@ -45,12 +45,12 @@ mov r4,-(r5) / save number of arguments ahead of the argument / pointers clr -(r5) / popped into ps when rti in sysrele is executed - mov $core,-(r5) / popped into pc when rti is sysrele + mov $core,-(r5) / popped into pc when rti in sysrele / is executed mov r5,0f / load second copyz argument tst -(r5) / decrement r5 mov r5,u.r0 / sub $16.,r5 / skip 8 words mov r5,u.sp / assign user stack pointer value, effectively - / zeros all regs when sysrele is executed + / zeroes all regs when sysrele is executed jsr r0,copyz; core; 0:0 / zero user's core diff --git a/pages/e02-04 b/pages/e02-04 index ef2b34c..942e6ff 100644 --- a/pages/e02-04 +++ b/pages/e02-04 @@ -6,18 +6,18 @@ jsr r0,readi / read in first six words of user's file, starting / at $core mov sp,r5 / put users stack address in r5 - sub $core+40.,r5 / subtract $core +40 from r5 (leaves + sub $core+40.,r5 / subtract $core +40, from r5 (leaves / number of words less 26 available for / program in user core mov r5,u.count / - cmp core,$405 / br .+14 is first instrution if file is + cmp core,$405 / br .+14 is first instruction if file is / standard a.out format bne 1f / branch, if not standard format mov core+2,r5 / put 2nd word of users program in r5; number of / bytes in program text sub $14,r5 / subtract 12 - cmp r5,u.count - bgt 1f / branch if r5 is greater than u.count + cmp r5,u.count / + bgt 1f / branch if r5 greater than u.count mov r5,u.count jsr r0,readi / read in rest of user's program text add core+10,u.nread / add size of user data area to u.nread @@ -49,7 +49,7 @@ sysstat: / ; name of file; buffer - get files status 1: jsr r0,iget / get the i-node into core mov (sp)+,r3 / move u.off to r3 (points to buffer) - mov r1,(r3)+ / put i-number into 1st word of buffer + mov r1,(r3)+ / put i-number in 1st word of buffer mov $inode,r2 / r2 points to i-node 1: mov (r2)+,(r3)+ / move rest of i-node to buffer diff --git a/pages/e02-06 b/pages/e02-06 index b72ac68..1e397ce 100644 --- a/pages/e02-06 +++ b/pages/e02-06 @@ -31,7 +31,7 @@ nig: nib: rts r0 -syschdir: / make the directory specified in the argument the current +syschdir: / makes the directory specified in the argument the current / directory jsr r0,arg; u.namep / u.namep points to path name jsr r0,namei / find its i-number diff --git a/pages/e02-07 b/pages/e02-07 index 8cc77e6..2324e43 100644 --- a/pages/e02-07 +++ b/pages/e02-07 @@ -1,5 +1,5 @@ - jsr r0,setimod / indicate i-node has been modified - mov (sp)+,r2 / mode is put into r2 (u.off put on stack with + jsr r0,setimod / indicates i-node has been modified + mov (sp)+,r2 / mode is put in r2 (u.off put on stack with / 2nd arg) rts r0 @@ -38,7 +38,7 @@ arg2: / sys call jsr r0,arg; u.off / u.off contains value of second arg in / sys call - mov r0,r1 / r0 points to callling routine + mov r0,r1 / r0 points to calling routine mov (sp),r0 / put operation code back in r0 mov u.off,(sp) / put pointer to second argument on stack jmp (r1) / return to calling routine @@ -52,6 +52,6 @@ sysstime: / set time tstb u.uid / is user the super user bne error4 / no, error mov 4(sp),s.time - mov 2(sp),s.time+2 + mov 2(sp),s.time+2 / set the system time br sysret4 diff --git a/pages/e02-09 b/pages/e02-09 index b31a0d7..37cb9f3 100644 --- a/pages/e02-09 +++ b/pages/e02-09 @@ -33,7 +33,7 @@ seektell: sysintr: / set interrupt handling jsr r0,arg; u.intr / put the argument in u.intr br 1f / go into quit routine - jsr r0,arg; u.quit / put argument in u.quit + jsr r0,arg; u.quit / put argument in u.quit 1: mov u.ttyp,r1 / move pointer to control tty buffer to r1 beq sysret4 / return to user @@ -43,7 +43,7 @@ sysintr: / set interrupt handling syssetuid: / set process id movb *u.r0,r1 / move process id (number) to r1 cmpb r1,u.ruid / is it equal to the real user id number - beq 1f / yst + beq 1f / yes tstb u.uid / no, is current user the super user? bne error4 / no, error 1: diff --git a/pages/e02-10 b/pages/e02-10 index aa81890..5b09212 100644 --- a/pages/e02-10 +++ b/pages/e02-10 @@ -37,7 +37,7 @@ anyi: / r1 contains an i-number neg r1 / no complement r1 cmp r1,(r2) / do they match now? beq 1f / yes, transfer - / i-number do not match + / i-numbers do not match add $8,r2 / no, bump to next entry in fsp table cmp r2,$fsp+[nfiles*8] / are we at last entry in the table blt 1b / no, check next entries i-number diff --git a/pages/e03-01 b/pages/e03-01 index 11f5be1..eed8118 100644 --- a/pages/e03-01 +++ b/pages/e03-01 @@ -1,4 +1,4 @@ -/ u3 unlx +/ u3 -- unix tswap: movb u.uno,r1 / move users process number to r1 @@ -11,8 +11,8 @@ swap: tst (r2)+ / are there any processes to run in this Q entry bne 1f / yes, process 1f cmp r2,$runq+6 / if zero compare address to end of table - bne 1b / lf not at end, go back - jsr r0,idle; s.idlet+2 / waif for interrupt; all queues + bne 1b / if not at end, go back + jsr r0,idle; s.idlet+2 / wait for interrupt; all queues / are empty br swap 1: @@ -21,28 +21,28 @@ swap: movb (r2)+,r1 / move 1st process in queue to r1 cmpb r1,(r2)+ / is there only 1 process in this Q to be run beq 1f / yes - tst (r2) / no, pt r2 back to this Q entry + tst -(r2) / no, pt r2 back to this Q entry movb p.link-1(r1),(r2) / move next process in line into / run queue br 2f 1: clr -(r2) / zero the entry; no processes on the Q 2: / write out core to appropriate disk area and read in new process if - / required V + / required clr *$ps / clear processor status cmpb r1,u.uno / is this process the same as the process in core? beq 2f / yes, don't have to swap - mov r0,-(sp) / no, write out core; save r0 (address in rout? v + mov r0,-(sp) / no, write out core; save r0 (address in rout. / that called swap) mov sp,u.usp / save stack pointer mov $sstack,sp / move swap stack pointer to the stack pointer mov r1,-(sp) / put r1 (new process #) on the stack - tstb u.uno / is the process # = O + tstb u.uno / is the process # = 0 beq 1f / yes, kill process by overwriting jsr r0,wswap / write out core to disk 1: mov (sp)+,r1 / restore r1 to new process number - jsr r0,rswap / read new process 1nto core + jsr r0,rswap / read new process into core jsr r0,unpack / unpack the users stack from next to his program / to its normal mov u.usp,sp / location; restore stack pointer to new process diff --git a/pages/e03-02 b/pages/e03-02 index 5e84c5d..8abb531 100644 --- a/pages/e03-02 +++ b/pages/e03-02 @@ -7,7 +7,7 @@ wswap: bic $1,r2 / make it even mov r2,u.break / set break to an even location mov u.usp,r3 / put users stack pter at moment of swap in r3 - cmp r2,$core / is u.break less than Score + cmp r2,$core / is u.break less than $core blos 2f / yes cmp r2,r3 / no, is (u.break) greater than stack pointer bhis 2f / yes @@ -20,8 +20,8 @@ wswap: mov $ecore,r2 / put end of core in r2 1: sub $user,r2 / get number of bytes to write out (user up - / to end of stack gets written out) ~ - neg r2 / make it negative V + / to end of stack gets written out) + neg r2 / make it negative asr r2 / change bytes to words (divide by 2) mov r2,swp+4 / word count movb u.uno,r1 / move user process number to r1 @@ -46,8 +46,8 @@ rswap: bis $2000,swp / read jsr r0,ppoke / read it in 1: - tstb swp+1 / done l - bne 1b / no, wait for bit 15 to clear (inhibit blt) + tstb swp+1 / done + bne 1b / no, wait for bit 15 to clear (inhibit bit) mov u.emt,*$30 / yes move these mov u.ilgins,*$10 / back rts r0 / return diff --git a/pages/e03-03 b/pages/e03-03 index e37b78b..95f4d44 100644 --- a/pages/e03-03 +++ b/pages/e03-03 @@ -17,11 +17,11 @@ putlu: / r1 = user process no.; r2 points to lowest priority queue tstb (r2)+ / is queue empty? beq 1f / yes, branch - movb (r2),r3 / no, save the last user processnumber in_r3 - movb r1,p.link-1(r3) / put pointer to user on last users- link + movb (r2),r3 / no, save the "last user" process number in r3 + movb r1,p.link-1(r3) / put pointer to user on "last users" link br 2f / 1: - movb r1,-1(r2) / user is only user; put_procss no. at beginning + movb r1,-1(r2) / user is only user; put process no. at beginning / and at end 2: movb r1,(r2) / user process in r1 is now the last entry on diff --git a/pages/e03-04 b/pages/e03-04 index c2dcdef..34f98e7 100644 --- a/pages/e03-04 +++ b/pages/e03-04 @@ -3,7 +3,7 @@ 1: clr (r5)+ / zero data word in buffer dec r3 - bgt 1b / branch u til all data words in buffer are zero + bgt 1b / branch until all data words in buffer are zero jsr r0,dskwr / write zeroed buffer area out onto physical / block specified rts r0 / in r1 diff --git a/pages/e04-01 b/pages/e04-01 index 1fb3f9a..a999f07 100644 --- a/pages/e04-01 +++ b/pages/e04-01 @@ -41,7 +41,7 @@ clock: / interrupt from 60 cycle clock tstb (r0) / is the time out? beq 3f / yes, 3f (get next entry) decb (r0) / no, decrement the time - bne 3f /Is1t zero now? + bne 3f / isit zero now? incb (r0) / yes, increment the time 3: inc r0 / next entry diff --git a/pages/e04-02 b/pages/e04-02 index f7224cf..bb48fe1 100644 --- a/pages/e04-02 +++ b/pages/e04-02 @@ -4,23 +4,23 @@ tstb toutt(r0) / is the time out for this entry beq 2f / yes decb toutt(r0) / no, decrement the time - bne 2f / is the time O, now + bne 2f / is the time 0, now asl r0 / yes, 2 x r0 to get word index for tout entry jsr r0,*touts(r0) / go to appropriate routine specified in this asr r0 / touts entry; set r0 back to toutt index 2: dec r0 / set up r0 for next entry - bge 1b / finished? , no, go back ` - br retisp / yes, restore registers and do a rtl + bge 1b / finished? , no, go back + br retisp / yes, restore registers and do a rti ttyi: / console tty input interrupt routine jsr r0,setisp / save reg r1, r2, r3 mov *$tkb,r1 / r1 = char in tty reader buffer inc *$tks / set the reader enable bit - bic $!177,r1 / clear upper 9 blts of the character (strip off - / 8th bit of char + bic $!177,r1 / clear upper 9 bits of the character (strip off + / 8th bit of char) cmp r1,$'a-40 / is character upper case A,..., upper case Z. / note that - blt 1f / lower case a ls represented by 141, upper case by + blt 1f / lower case a is represented by 141, upper case by cmp r1,$'z-40 / 101; and lower case z by 172, upper / case Z by 132. bgt 1f / if not upper case, branch @@ -45,7 +45,7 @@ ttyi: / console tty input interrupt routine jsr r0,wakeup; runq; 0 / no, wakeup the input process br retisp / return 2: / r1 = "}" or "delete" to get here - mov tty+[ntty*8]-8+6,r2 / move console tty-buffer address to r2 + mov tty+[ntty*8]-8+6,r2 / move console tty buffer address to r2 beq 2f / if 0, wakeall movb r1,6(r2) / move "}" or del into "interrupt char" / byte of buffer diff --git a/pages/e04-03 b/pages/e04-03 index 6216d3a..ac9e69f 100644 --- a/pages/e04-03 +++ b/pages/e04-03 @@ -1,12 +1,12 @@ wakeall: mov $39.,0f / flll arg2 of wakeup call wlth 39 1: - jsr r0,wakeup; runq+4; 0:.. / wakeup the processes ln the + jsr r0,wakeup; runq+4; 0:.. / wakeup the processes in the dec 0b / wait list; decrement arg2 - bge 1b / lf not done, go back + bge 1b / if not done, go back rts r0 -ttyo: / console typewriter output interrupt routlne +ttyo: / console typewriter output interrupt routine jsr r0,setisp / save registers jsr r0,startty / put a char on the console tty output buffer br retisp / restore registers @@ -19,31 +19,31 @@ retisp: mov (sp)+,r0 rti / return from interrupt -ppti: / paper tape lnput interrupt routine M +ppti: / paper tape lnput interrupt routine jsr r0,setisp / save registers movb pptiflg,r1 / place "pptiflg" in r1 - jmp *1f(r1) / jump to location speclfled by value of pptiflg + jmp *1f(r1) / jump to location speclfled by value of "pptiflg" 1: retisp / file not open 1f / file just opened 2f / file normal retisp / file not closed -1: / flle just opened - tstb *$prs+1 / is error blt set in prs +1: / file just opened + tstb *$prs+1 / is error bit set in prs bge 1f / no - jsr r0,pptito / place 10 ln toutt entry for ppt input + jsr r0,pptito / place 10 in toutt entry for ppt input br retisp 1: movb $4,pptiflg / change "pptiflg" to indicate file "normal" 2: jsr r0,wakeup; runq+2; 2 / wakeup process for ppt input entry - / ln wllst + / in wlist tstb *$prs+1 / is error bit set blt 1f / yes mov *$prb,r1 / place contents ppt read buffer in r1 jsr r0,putc; 2 / place character in clist area for ppt input - br .+2 / temp / if no space ln clist character lost + br .+2 / temp / if no space in clist character lost cmpb cc+2,$50. / character count in clist area for ppt lnput / greater than or equal to 50 bhis retisp / yes diff --git a/pages/e04-04 b/pages/e04-04 index 8ba9dd3..7a0e926 100644 --- a/pages/e04-04 +++ b/pages/e04-04 @@ -1,10 +1,10 @@ / jsr r0,setisp / jsr r0,starlpt / br retisp -ppto: / paper tape output in errupt routine +ppto: / paper tape output interrupt routine jsr r0,setisp / save registers jsr r0,starppt / get next character from clist, and output - / if possible . + / if possible br retisp / pop register values from stack / starlpt: @@ -13,7 +13,7 @@ ppto: / paper tape output in errupt routine / jsr r0,wakeup; runq+2; 5 /1: / tstb *$lps -/ bqs 1f +/ bge 1f / jsr r0,getc; 5 / br 1f / mov r1,*$lpb @@ -39,7 +39,7 @@ startty: / start or restart console tty output 1: clrb ttyoch mov r1,*$tpb / put character in console output register - cmp r1,$12 / is char a l1ne feed + cmp r1,$12 / is char a line feed bne 1f movb $15,ttyoch / put a cr in ttyoch 1: diff --git a/pages/e04-05 b/pages/e04-05 index aa1cab0..9fd5f9a 100644 --- a/pages/e04-05 +++ b/pages/e04-05 @@ -31,11 +31,11 @@ wakeup: / wakeup processes waiting for an event by linking them to the mov (r0)+,r3 / r3 = wait channel number movb wlist(r3),r1 / r1 contains process number in that wait / channel that was sleeping - beq 2f / if O return, nothing to wakeup - cmp r2,u.pri / is rung greater than or equal to users process + beq 2f / if 0 return, nothing to wakeup + cmp r2,u.pri / is runq greater than or equal to users process / priority bhis 1f / yes, don't set time quantum to zero - clrb uquant / time quantum = O + clrb uquant / time quantum = 0 1: clrb wlist(r3) / zero wait channel entry jsr r0,putlu / create a link from the last user on the Q diff --git a/pages/e04-06 b/pages/e04-06 index cf95afa..5a5339c 100644 --- a/pages/e04-06 +++ b/pages/e04-06 @@ -7,8 +7,8 @@ beq 1f / if 0 branch mov $runq+4,r2 / r2 points to lowest priority queue mov $300,*$ps / processor priority = 6 - jsr r0,putlu / create llnk to old process number - clr *$ps / clear the status; process priority = O + jsr r0,putlu / create link to old process number + clr *$ps / clear the status; process priority = 0 1: rts r0 / return 2: @@ -22,8 +22,8 @@ isintr: beq 1f / if 0, do nothing except skip return movb 6(r1),r1 / put interrupt char in the tty buffer in r1 beq 1f / if its 0 do nothing except skip return - cmp r1,$177 / is interrupt char e delete? - bne 3f / no, so lt must be a quit (fs) + cmp r1,$177 / is interrupt char = delete? + bne 3f / no, so it must be a quit (fs) tst u.intr / yes, value of u.intr determines handling / of interrupts bne 2f / if not 0, 2f. If zero do nothing. diff --git a/pages/e05-01 b/pages/e05-01 index 75fb8ba..ccb2145 100644 --- a/pages/e05-01 +++ b/pages/e05-01 @@ -1,4 +1,4 @@ -/ u5 - unix +/ u5 -- unix mget: mov *u.fofp,mq / file offset in mq @@ -8,10 +8,10 @@ mget: bit $10000,i.flgs / lg/sm is this a large or small file bne 4f / branch for large file bit $!17,r2 - bne 3f / branch if/r2 greater than or equal to 16 + bne 3f / branch if r2 greater than or equal to 16 bic $!16,r2 / clear all bits but bits 1,2,3 mov i.dskp(r2),r1 / r1 has physical block number - bne 2f / lf physical block num is zero then need a new block + bne 2f / if physical block num is zero then need a new block / for file jsr r0,alloc / allocate a new block mov r1,i.dskp(r2) / physical block number stored in i-node @@ -22,7 +22,7 @@ mget: 3: / adding on block which changes small file to a large file jsr r0,alloc / allocate a new block for this file; block number /in r1 - jsr r0,wslot / set up I/0 buffer for write, r5 points to first + jsr r0,wslot / set up I/O buffer for write, r5 points to first / data word in buffer mov $8.,r3 / next 6 instructions transfer old physical block / pointers @@ -39,7 +39,7 @@ mget: bgt 1b jsr r0,dskwr / write new indirect block on disk mov r1,i.dskp / put pointer to indirect block in i-node - bis $10000,i.flgs / set large file blt in i.flgs word of i-node + bis $10000,i.flgs / set large file bit in i.flgs word of i-node jsr r0,setimod / set i-node modified flag br mget 4: / large file diff --git a/pages/e05-02 b/pages/e05-02 index 0ee082e..d5e8499 100644 --- a/pages/e05-02 +++ b/pages/e05-02 @@ -29,7 +29,7 @@ alloc: mov r3,-(sp) mov $systm,r2 / start of inode and free storage map for drum tst cdev - beq 1f / drum ls device + beq 1f / drum is device mov $mount,r2 / disk or tape is device, start of inode and free / storage map 1: diff --git a/pages/e05-03 b/pages/e05-03 index e5e3e2e..a857abc 100644 --- a/pages/e05-03 +++ b/pages/e05-03 @@ -26,7 +26,7 @@ free: clr r3 bisb 2f(r2),r3 / use mask to set bit in r3 corresponding to / (k) mod 8 - mov r1,1r2 / divide block number by 16 + mov r1,r2 / divide block number by 16 asr r2 asr r2 asr r2 diff --git a/pages/e05-04 b/pages/e05-04 index 6683896..a432cc0 100644 --- a/pages/e05-04 +++ b/pages/e05-04 @@ -15,7 +15,7 @@ setimod: movb $1,imod / set current i-node modified bytes - mov s.time,i.mtim / put present tlme into file modified time + mov s.time,i.mtim / put present time into file modified time mov s.time+2,i.mtim+2 rts r0 @@ -47,10 +47,10 @@ imap: / get the byte that has the allocation bit for the i-number contained rts r0 iget: - cmp r1, ii / r1 = i-number of current flle + cmp r1,ii / r1 = i-number of current flle bne 1f - cmp idev,cdev / ls device number of i-node = current device + cmp idev,cdev / is device number of i-node = current device beq 2f 1: tstb imod / has i-node of current file been modified i.e., - / lmod set + / imod set diff --git a/pages/e05-05 b/pages/e05-05 index 2c4eec7..3bd5510 100644 --- a/pages/e05-05 +++ b/pages/e05-05 @@ -29,7 +29,7 @@ icalc: / i-node i is located in block (i+31.)/16. and begins 32.* / (i+31)mod16 bytes from its start add $31.,r1 / add 31. to i-number - mov r1,-(sp) / save i+.31. on stack + mov r1,-(sp) / save i+31. on stack asr r1 / divide by 16. asr r1 asr r1 diff --git a/pages/e06-01 b/pages/e06-01 index d48283a..5855ff5 100644 --- a/pages/e06-01 +++ b/pages/e06-01 @@ -10,7 +10,7 @@ readi: cmp r1,$40. / want to read a special file (i-nodes 1,...,40 are / for special files) ble 1f / yes, branch - jmp dskr / no, jmp to dskr; read file with 1.-node number (:1) + jmp dskr / no, jmp to dskr; read file with i-node number (r1) / starting at byte ((u.fofp)), read in u.count bytes 1: asl r1 / multiply inode number by 2 @@ -41,9 +41,9 @@ readi: 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 _ + / of the control and status block tst 2(r5) / for the console tty; this word points to the console - / tty bufTer + / tty buffer bne 1f / 2nd word of console tty buffer contains number / of chars. Is this number non-zero? jsr r0,canon; ttych / if 0, call 'canon' to get a line diff --git a/pages/e06-02 b/pages/e06-02 index 4f552ea..4e8dc56 100644 --- a/pages/e06-02 +++ b/pages/e06-02 @@ -8,15 +8,15 @@ ret1: rppt: / read paper tape jsr r0,pptic / gets next character in clist for ppt input and / places - br ret / it 1n r1; 1f there 1s no problem with reader, it - / also enables read bit Ln prs + br ret / it in r1; if there 1s no problem with reader, it + / also enables read bit in prs jsr r0,passc / place character in users buffer area br rppt rmem: / transfer characters from memory to a user area of core mov *u.fofp,r1 / save file offset which points to the char to / be transferred to user - inc *u.fofp / increment file offset to point to 'next' char 1n + inc *u.fofp / increment file offset to point to 'next' char in / memory file movb (r1),r1 / get character from memory file, put it in r1 jsr r0,passc / move this character to the next byte of the diff --git a/pages/e06-03 b/pages/e06-03 index dae148d..1eb8f42 100644 --- a/pages/e06-03 +++ b/pages/e06-03 @@ -5,7 +5,7 @@ mov (sp)+,r0 / no, do a non-local return to the caller of / '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 + mov (sp)+,r1 / (2) pop the i-number off the stack into r1 1: clr *$ps / clear processor status rts r0 / return to address currently on top of stack @@ -44,7 +44,7 @@ writei: xmtt / tty5 xmtt / tty6 xmtt / tty7 -/ w1pr / 1pr +/ w1pr / lpr wtty: jsr r0,cpass / get next character from user buffer area; if diff --git a/pages/e06-04 b/pages/e06-04 index 2213735..35e9f0d 100644 --- a/pages/e06-04 +++ b/pages/e06-04 @@ -18,26 +18,26 @@ wppt: / if none return to writei's calling routine jsr r0,pptoc / output character on ppt br wppt -/w1pr: -/ jar r0,cpass +/wlpr: +/ jsr r0,cpass / cmp r0,$'a / blo 1f / cmp r1,$'z / bhi 1f / sub $40,r1 /1: -/ jsr r0,1ptoc -/ br w1pr +/ jsr r0,lptoc +/ br wlpr wmem: / transfer characters from a user area of core to memory file jsr r0,cpass / get next character from users area of core and / put it in r1 mov r1,-(sp) / put character on the stack mov *u.fofp,r1 / save file offset in r1 - inc *u.fofp / increment f11e offset to point to next available + inc *u.fofp / increment file offset to point to next available / location in file movb (sp)+,(r1) / pop char off stack, put in memory loc assigned - / no 1: + / to it br wmem / continue 1: jmp error / ? diff --git a/pages/e06-05 b/pages/e06-05 index aeabefe..029e8ce 100644 --- a/pages/e06-05 +++ b/pages/e06-05 @@ -1,7 +1,7 @@ mov r2,i.size / yes, increase the f11e size to file offset + / no. of data bytes - jsr r0,setimod / set imod=1 (1.e., core inode has been - / modified), stuff tlme of modiflcatlon into + jsr r0,setimod / set imod=1 (i.e., core inode has been + / modified), stuff tlme of modification into / core image of i-node 1: jsr r0,mget / get the block no. in which to write the next data @@ -11,7 +11,7 @@ / 512, 1024,...(i.e., start of new block) cmp u.count,$512. / if zero, is there enough data to fill an / entire block? (i.e., no. of - bhis 3f / bytes to be written greater than S12.? Yes, branch. + bhis 3f / bytes to be written greater than 512.? Yes, branch. / Don't have to read block 2: / in as no past info. is to be saved (the entire block will be / overwritten). @@ -34,7 +34,7 @@ cpass: / get next character from user area of core and put it in r1 tst u.count / have all the characters been transferred (i.e., - / u.count, # of chars. left . + / u.count, # of chars. left beq 1f / to be transferred = 0?) yes, branch dec u.count / no, decrement u.count movb *u.base,r1 / take the character pointed to by u.base and @@ -44,7 +44,7 @@ cpass: / get next character from user area of core and put it in r1 rts r0 / next byte 1: mov (sp)+,r0 / put return address of calling routine into r0 - mov (sp)+,r1 / i.-number in r1 + mov (sp)+,r1 / i-number in r1 rts r0 / non-local return sioreg: diff --git a/pages/e06-06 b/pages/e06-06 index 58ab0b7..e20c2fd 100644 --- a/pages/e06-06 +++ b/pages/e06-06 @@ -1,8 +1,8 @@ mov u.base,r1 / address of data is in r1 - neg r3 / 512 - file offset (mod512..) in r3 (i.e., the number + neg r3 / 512 - file offset (mod512.) in r3 (i.e., the number / of free bytes in the file block cmp r3,u.count / compare this with the number of data bytes to - / be written to the f11e + / be written to the file blos 2f / if less than branch. Use the number of free bytes / in the file block as the number to be written mov u.count,r3 / if greater than, use the number of data bytes diff --git a/pages/e07-01 b/pages/e07-01 index c1fc025..80770aa 100644 --- a/pages/e07-01 +++ b/pages/e07-01 @@ -13,12 +13,12 @@ canon: br canon / character was @ so start over jsr r0,cesc; 43 / test for # (erase last char. typed) br 1b / character was #, go back - cmp r0,$4 / is char eot? - beq 1f / yes. reset and return + cmp r1,$4 / is char eot? + beq 1f / yes, reset and return movb r1,*4(r5) / no, move char to address in 3rd word of buffer / (char. pointer) - inc 2(r5) / increment 2nd word (char, count) - inc 4(r5) / increment 3rd word (char, pointer) + inc 2(r5) / increment 2nd word (char. count) + inc 4(r5) / increment 3rd word (char. pointer) cmp r1,$'\n / is char = newline beq 1f / yes, 1f cmp 2(r5),$120. / is byte count greater than or equal to 120 @@ -35,7 +35,7 @@ canon: cesc: / test for erase or kill char cmp r1,(r0)+ / char in r1 = erase or kill character? bne 1f / no, skip return - tst 2(r5) / yes, is char, count = 0 + tst 2(r5) / yes, is char. count = 0 beq 2f / yes, don't skip return dec 2(r5) / no, decrement char count dec 4(r5) / decrement character pointer @@ -48,7 +48,7 @@ cesc: / test for erase or kill char ttych: / get characters from Q of characters inputted to tty mov $240,*$ps / set processor priority to 5 - jsr r0,getc; 0 / takes char, off clist and puts it in r1 + jsr r0,getc; 0 / takes char. off clist and puts it in r1 br 1f / list is empty, go to sleep clr *$ps / clear process priority rts r0 / return diff --git a/pages/e07-04 b/pages/e07-04 index 7a0c008..1df70d7 100644 --- a/pages/e07-04 +++ b/pages/e07-04 @@ -24,7 +24,7 @@ iopen: / open file whose i-number is in r1 tst r1 / write or read access? blt 2f / write, go to 2f jsr r0,access; 2 / get inode into core with read access - cmp r1,340. / is it a special file + cmp r1,$40. / is it a special file bgt 3f / no. 3f mov r1,-(sp) / yes, figure out asl r1 @@ -36,7 +36,7 @@ iopen: / open file whose i-number is in r1 sret / rf0 sret / rk0 sret / tap0 - sret / tapl + sret / tap1 sret / tap2 sret / tap3 sret / tap4 @@ -44,7 +44,7 @@ iopen: / open file whose i-number is in r1 sret / tap6 sret / tap7 ocvt / tty0 - ocvt / ttyl + ocvt / tty1 ocvt / tty2 ocvt / tty3 ocvt / tty4 diff --git a/pages/e07-05 b/pages/e07-05 index 997e6e5..8bd594d 100644 --- a/pages/e07-05 +++ b/pages/e07-05 @@ -16,7 +16,7 @@ sret / rf0 sret / rk0 sret / tap0 - sret / tapl + sret / tap1 sret / tap2 sret / tap3 sret / tap4 @@ -24,7 +24,7 @@ sret / tap6 sret / tap7 ocvt / tty0 - ocvt / ttyl + ocvt / tty1 ocvt / tty2 ocvt / tty3 ocvt / tty4 @@ -44,7 +44,7 @@ otty: / open console tty for reading or writing / console tty tst u.ttyp / is there a process control tty (i.e., has a tty / buffer header - bne sret / address been loaded into u.ttyp yet)? Yes, branch + bne sret / address been loaded into u.ttyp yet)? yes, branch mov r5,u.ttyp / no, make the console tty the process control / tty br sret / ? diff --git a/pages/e07-06 b/pages/e07-06 index 753be96..ac4dde4 100644 --- a/pages/e07-06 +++ b/pages/e07-06 @@ -25,10 +25,10 @@ iclose: / close file whose i-number is in r1 ctty / tty cppt / ppt sret / mem - sret / rfo + sret / rf0 sret / rk0 sret / tap0 - sret / tapl + sret / tap1 sret / tap2 sret / tap3 sret / tap4 @@ -36,7 +36,7 @@ iclose: / close file whose i-number is in r1 sret / tap6 sret / tap7 ccvt / tty0 - ccvt / ttyl + ccvt / tty1 ccvt / tty2 ccvt / tty3 ccvt / tty4 diff --git a/pages/e07-07 b/pages/e07-07 index 07d01fd..e51776a 100644 --- a/pages/e07-07 +++ b/pages/e07-07 @@ -4,7 +4,7 @@ sret / rf0 sret / rk0 sret / tap0 - sret / tapl + sret / tap1 sret / tap2 sret / tap3 sret / tap4 @@ -12,7 +12,7 @@ sret / tap6 sret / tap7 ccvt / tty0 - ccvt / ttyl + ccvt / tty1 ccvt / tty2 ccvt / tty3 ccvt / tty4 diff --git a/pages/e08-01 b/pages/e08-01 index 12eefad..61c6e82 100644 --- a/pages/e08-01 +++ b/pages/e08-01 @@ -2,7 +2,7 @@ rtap: / read from the dec tape asr r1 / divide the i-number by 2 - sub $4.,r1 / (i-number/2)-r r1 + sub $4.,r1 / (i-number/2)-4 r1 mov r1,cdev / cdev now has device number jsr r0,bread; 578. / read in block thats in *u.fofp @@ -14,7 +14,7 @@ wtap: / Maximum rrk0: - mov $1,cdev / set current device to 1., disk + mov $1,cdev / set current device to i., disk jsr r0,bread; 4872. / read block from disk (maximum block / number allowed on device is 4872.) / - (u.fofp) contains block number @@ -36,13 +36,13 @@ wrf0: bread: / read a block from a block structured device jsr r0,tstdeve / error on special file I/O (only works on - / tape + / tape) mov *u.fofp,r1 / move block number to r1 mov $2.-cold,-(sp) / "2-cold" to stack 1: cmp r1,(r0) / is this block # greater than or equal to / maximum block # allowed on device - bhis 1f / yes, if (error) + bhis 1f / yes, 1f (error) mov r1,-(sp) / no, put block # on stack jsr r0,preread / read in the block into an I/O buffer mov (sp)+,r1 / return block # to r1 diff --git a/pages/e08-02 b/pages/e08-02 index da2bc57..b208f9c 100644 --- a/pages/e08-02 +++ b/pages/e08-02 @@ -10,7 +10,7 @@ beq 1f / no cmp cdev,$1 / disk or drum? ble 2f / yes - tstb uquant / is the time quan+um = 0? + tstb uquant / is the time quantum = 0? bne 2f / no, 2f mov r5,-(sp) / yes, save r5 (buffer address) jsr r0,sleep; 31. / put process to sleep in channel 31 (tape) @@ -29,7 +29,7 @@ movb (r5)+,(r2)+ / move data from the I/O buffer dec r3 / to the user's area in core starting at u.base tst u.count / done - beq 1f / yes, return . + beq 1f / yes, return tst -(r0) / no, point r0 to the argument again br bread / read some more 1: @@ -44,7 +44,7 @@ bwrite: / write on block structured device inc *u.fofp / no, increment block number jsr r0,wslot / get an I/O buffer to write into jsr r0,dioreg / do the necessary bookkeeping -1: / r2 points to the users data; r5-points to the I/O buffers data area +1: / r2 points to the users data; r5 points to the I/O buffers data area movb (r2)+,(r5)+ / ; r3, has the byte count dec r3 / area to the I/O buffer bne 1b diff --git a/pages/e08-03 b/pages/e08-03 index 90b8798..b7f430d 100644 --- a/pages/e08-03 +++ b/pages/e08-03 @@ -1,7 +1,7 @@ mov (sp)+,r0 / return to routine that called writei jmp ret -tstdeve: / check whether permanent error has occured on special f11e - / I/0 +tstdeve: / check whether permanent error has occured on special file + / I/O mov cdev,r1 / only works on tape; r1 has device # tstb deverr(r1) / test error bit of device bne 1f / error @@ -18,7 +18,7 @@ dioreg: blos 1f / no, branch mov $512.,r3 / yes, just take 512. 1: - mov u.base,r2 / put users base in r2 ~ + mov u.base,r2 / put users base in r2 add r3,u.nread / add the number to be read to u.nread sub r3,u.count / update count add r3,u.base / update base @@ -26,19 +26,19 @@ dioreg: preread: jsr r0,bufaloc / get a free I/O buffer (r1 has block number) - br 1f / branch if block already 1n a I/O buffer - bis $2000,(r5) / set read mu (bu: 100 1n 1/0 buffer) + br 1f / branch if block already in a I/O buffer + bis $2000,(r5) / set read bit (bit 100 in I/O buffer) jsr r0,poke / perform the read 1: - clr *$ps / ps = O + clr *$ps / ps = 0 rts r0 dskrd: - jsr r0,bufaloc / shuffle off to bufaloc; get a free I/0 buffer + jsr r0,bufaloc / shuffle off to bufaloc; get a free I/O buffer br 1f bis $2000,(r5) / set bit 10 of word 1 of I/O queue entry / for buffer - jsr r0,poke / just assigned in bufalocg bit 10:1 says read + jsr r0,poke / just assigned in bufaloc, bit 10=1 says read 1: clr *$ps bit $22000,(r5) / if either bits 10, or 13 are 1; jump to idle @@ -51,5 +51,5 @@ dskrd: rts r0 wslot: - jsr r0,bufaloc / get a free I/0 buffer; pointer to first + jsr r0,bufaloc / get a free I/O buffer; pointer to first br 1f / word in buffer in r5 diff --git a/pages/e08-04 b/pages/e08-04 index d259ccd..c774a68 100644 --- a/pages/e08-04 +++ b/pages/e08-04 @@ -1,7 +1,7 @@ 1: bit $22000,(r5) / check bits 10, 13 (read, waiting to read) / of I/O queue entry - beq 1f / branch 1f 10, 13 zero (i.e., not reading, or waiting + beq 1f / branch if 10, 13 zero (i.e., not reading, or waiting / to read) jsr r0,idle; s.wait+2 / if buffer is reading or writing to read, / idle diff --git a/pages/e08-05 b/pages/e08-05 index edd92dc..893c295 100644 --- a/pages/e08-05 +++ b/pages/e08-05 @@ -1,4 +1,4 @@ - mov $rkda+2,r3 / A + mov $rkda+2,r3 / mov ac,-(sp) / put remainder from divide on stack; gives / sector number mov $4,lsh / shift quotient 4 bits, to align with cyl and surf @@ -6,7 +6,7 @@ bis mq,(sp) / or mq with sector; gives total disk address br 3f prf: / drum - bit $1,active / test drum busy blt + bit $1,active / test drum busy bit bne 2f / branch if bit is set bis $1,active / set drum busy bit mov r1,rfap / rfap points to current I/O queue entry for drum @@ -17,7 +17,7 @@ prf: / drum clr -(sp) / word movb 3(r1),(sp) / move high byte of physical block number into / low byte of stack - mov (sp)+,-(r3) / load dae with high byt. of physical block + mov (sp)+,-(r3) / load dae with high byte of physical block / number 3: mov (sp)+,-(r3) / load rkda register; load dar register @@ -37,7 +37,7 @@ ptc: / tape I/O bne 2f mov tccm,r3 swab r3 - bic $17,r3 + bic $!7,r3 add $2,r3 cmpb r3,(r1) beq 3f @@ -50,7 +50,7 @@ ptc: / tape I/O movb (r1),r3 / device sub $2,r3 / now unit swab r3 - bis $103,r3 / now rbn,for,un1t,1e + bis $103,r3 / now rbn,for,unit,ie mov r3,tccm seta: / I/O queue bookkeeping; set read/write waiting bits. mov (r1),r3 / move word 1 of I/O queue entry into r3 diff --git a/pages/e08-06 b/pages/e08-06 index 55b3e7c..5ca13c3 100644 --- a/pages/e08-06 +++ b/pages/e08-06 @@ -6,8 +6,8 @@ bis r3,(r1) / or old value of bits 9 and 10 with bits 12 / and 13 2: - cmp r2,$bufp / test to see if entire-I/O queue has been - / scanned + cmp r2,$bufp / test to see if entire I/O queue has been + / scanned bhi 1b mov (sp)+,r3 mov (sp)+,r2 @@ -24,11 +24,11 @@ bufaloc: 2: mov (r2)+,r5 / move pointer to word 1 of an I/O queue entry / into r5 - bit $173000,(r5) / lock+keep+active+outstand1ng + bit $173000,(r5) / lock+keep+active+outstanding bne 3f / branch when any of bits 9,10,12,13,14,15 are set / (i.e., buffer busy) - mov r2,(sp) / save pointer to last non-busy buffer_found - / points to word 2_of I/O queue entry) + mov r2,(sp) / save pointer to last non-busy buffer found + / points to word 2 of I/O queue entry) 3: cmpb (r5),cdev / is device in I/O queue entry same as current / device diff --git a/pages/e08-07 b/pages/e08-07 index cadeaac..453b1d1 100644 --- a/pages/e08-07 +++ b/pages/e08-07 @@ -1,6 +1,6 @@ / entry 1: - cmp r2,$bufp / bump all entrys ln bufp and put latest assigned + cmp r2,$bufp / bump all entrys in bufp and put latest assigned blos 1f / buffer on the top (this makes if the lowest priority) mov -(r2),2(r2) / job for a particular device br 1b @@ -20,7 +20,7 @@ taper: / dec tape error dec tcerrc / decrement the number of errors bne 1f / if more than 1 branch movb 1(r2),r3 / r2+1 points to command register upper byte - bic $17,r3 / clear all but bits 8-10 (Unit Selection) + bic $!7,r3 / clear all but bits 8-10 (Unit Selection) incb deverr+2(r3) / set error bit for this tape unit br tape3 1: / more than 1 error @@ -45,12 +45,12 @@ tape1: / read bn forward mov 4(r1),-(r0) / put word count in tcwc mov $115,-(sp) / put end interrupt enable bit $20000,(r1) / is "waiting to read bit" of I/O queue set? - beq 1f / no 1f - mov $105,(sp) / yes, put and lnterrupt enable + beq 1f / no, 1f + mov $105,(sp) / yes, put and interrupt enable 1: movb (sp)+,(r2) / move function into command register (tccm) bis $4,active / set active bit mov $tape3,tcstate / get ready for I/O transfer - br 4f / go to retisp (rtl) + br 4f / go to retisp (rti) tape2: / read bn bakasswards diff --git a/pages/e08-08 b/pages/e08-08 index 4b10c0c..49993fb 100644 --- a/pages/e08-08 +++ b/pages/e08-08 @@ -5,10 +5,10 @@ br taper / else reverse tape3: / I/O transfer - bic $30000,(r1) / clear bits 12 and 13 of I/0 queue entry + bic $30000,(r1) / clear bits 12 and 13 of I/O queue entry jsr r0,poke / do the I/O - bit $4,active / still k sy see if pick up r-ahead, w-behind - bne 1f / yes I + bit $4,active / still busy see if pick up r-ahead, w-behind + bne 1f / yes movb $1,(r2) / no, indicate too bad 1: jsr r0,wakeup; runq; 31. / wait up diff --git a/pages/e08-09 b/pages/e08-09 index 7383de5..7d122fd 100644 --- a/pages/e08-09 +++ b/pages/e08-09 @@ -8,7 +8,7 @@ trapt: / r2 points to the tstb (r2) / is ready bit of dcs set? bge 4b / device still active so branch bit (r0),active / was device busy? - beq 4b / no, stray interrupt - + beq 4b / no, stray interrupt bic (r0)+,active / yes, set active to zero tst (r2) / test the err(bit is) of dcs bge 2f / if no error jump to 2f diff --git a/pages/e09-03 b/pages/e09-03 index 3aff7af..2056432 100644 --- a/pages/e09-03 +++ b/pages/e09-03 @@ -47,10 +47,10 @@ starxmt: br 1f / if no entry in clist to be output, return to / calling routine 3: - bic $!177,r1 / zero out blts 7-15 of r1 + bic $!177,r1 / zero out bits 7-15 of r1 movb partab(r1),r3 / move "partab" entry (identified by / r1) into r3 - bge 3f / if entry 1s greater than or equal to 0 (digit + bge 3f / if entry is greater than or equal to 0 (digit / 2, far left digit = 0) branch - bisb 200,r1 / if entry is less than 0 add 128 to ASC11 + bisb 200,r1 / if entry is less than 0 add 128 to ASCII / code for char to be output diff --git a/pages/e09-04 b/pages/e09-04 index 04341c0..bbf0c64 100644 --- a/pages/e09-04 +++ b/pages/e09-04 @@ -4,7 +4,7 @@ 3: mov (sp),r2 / r2 contains 8xtty number bit $4,rcsr(r2) / is carrier present for tty - beq starxmt / no carrler flush + beq starxmt / no carrier flush mov r1,-(sp) / yes, place character to be output on stack cmp r1,$11 / is character "ht" bne 3f / no @@ -35,7 +35,7 @@ clrb (r2) / col set column count = 0 br 1f 2: - bit $1,r1 / is bit 0 of ASC11 char = 1 (char = lf) + bit $1,r1 / is bit 0 of ASCII char = 1 (char = lf) bne 2f / yes bitb $20,3(r2) / cr flag is bit 4 of 5th byte of "tty" / area = 1 diff --git a/pages/e09-05 b/pages/e09-05 index 9c50385..15bf5e1 100644 --- a/pages/e09-05 +++ b/pages/e09-05 @@ -21,7 +21,7 @@ / tout clrb (r2) / set column count = 0 entry 2: - add $5,r3 / time for this char increment value for tout + add $5,r3 / time for this char,increment value for tout / entry by 5 mov (sp),r2 / 0%8 r2 contains 8xtty number asr r2 @@ -33,11 +33,11 @@ rts r0 / return partab: / contains 3 digits for each character; digit 2 is used - / to determine if 200 is to added to ASC11 code digits 0 + / to determine if 200 is to added to ASCII code digits 0 / and 1 are used to determine value for jump table. - .byte 002,202,202,002,002,002,002,202 + .byte 002,202,202,002,202,002,002,202 .byte 204,010,006,212,012,214,202,002 - .byte 202,002,002,202,002,002,202,002 + .byte 202,002,002,202,002,202,202,002 .byte 002,202,202,002,202,002,002,202 .byte 200,000,000,200,000,200,200,000 .byte 000,200,200,000,200,000,000,200