Merge pull request #45 from philbudne/master

system updates
This commit is contained in:
philbudne
2016-03-11 16:39:07 -05:00
12 changed files with 315 additions and 260 deletions
+3 -3
View File
@@ -15,9 +15,9 @@ dd drw-- -1 2
system drw-- -1 3 system drw-- -1 3
init frwr- -1 ../bin/init init frwr- -1 ../bin/init
password frw-- -1 password password frw-- -1 password
ttyin irwr- -1 7 ttyin irwr- -1 6
keyboard irwr- -1 8 keyboard irwr- -1 7
pptin irwr- -1 9 pptin irwr- -1 8
ttyout irwr- -1 11 ttyout irwr- -1 11
display irwr- -1 12 display irwr- -1 12
pptout irwr- -1 13 pptout irwr- -1 13
+1
View File
@@ -3,6 +3,7 @@ set cpu eae
set cpu history=100 set cpu history=100
show cpu show cpu
set tti 8b
set rb ena set rb ena
att rb image.fs att rb image.fs
show dev show dev
+11 -2
View File
@@ -5,6 +5,8 @@ uid -1 is superuser
process 1 is "init", runs as superuser process 1 is "init", runs as superuser
there are ten process slots, pids are 18 bits.
DISK DISK
==== ====
@@ -28,7 +30,7 @@ inode format
------------ ------------
``` ```
i.flags i.flags
400000 free?? (checked/toggled by icreat) 400000 in use
200000 large file 200000 large file
000040 special file 000040 special file
000020 directory 000020 directory
@@ -39,7 +41,7 @@ inode format
01 world write 01 world write
i.dskps 7 block numbers (all indirect blocks if "large file") i.dskps 7 block numbers (all indirect blocks if "large file")
i.uid owner i.uid owner
i.nlks link count i.nlks link count (negative)
i.size size (in words?) i.size size (in words?)
i.uniq unique value assigned at creation i.uniq unique value assigned at creation
``` ```
@@ -69,3 +71,10 @@ i numbers
11 "display" (graphic-2) special file 11 "display" (graphic-2) special file
12 "pptout" (paper tape punch) special file 12 "pptout" (paper tape punch) special file
``` ```
swapping
--------
Only one process is in memory at any time (in the high half of the 8KW
memory). The ten processes are swapped to the last ten tracks of the
disk.
+8 -6
View File
@@ -9,7 +9,7 @@ orig:
. = orig+7 . = orig+7
-1 " only ever set (to -1): never read?! -1 " only ever set (to -1): never read?!
. = orig+020 " syscall (CAL) processing . = orig+020 " syscall (CAL) and user "interrupt" processing
1f " addr for "CAL I": store return here on "CAL" 1f " addr for "CAL I": store return here on "CAL"
iof " interrupts off iof " interrupts off
dac u.ac " save user AC dac u.ac " save user AC
@@ -19,8 +19,8 @@ orig:
dac 020 " restore location 20 dac 020 " restore location 20
lac u.ac " restore user AC lac u.ac " restore user AC
jmp 1f+1 " join "CAL I" processing jmp 1f+1 " join "CAL I" processing
1f 1f " literal to restore location 20
1: 0 1: 0 " "CAL I" PC stored here
iof " interrupts off iof " interrupts off
dac u.ac " save user AC dac u.ac " save user AC
lacq lacq
@@ -64,7 +64,7 @@ sysexit: " common system call exit code
jms dskio; 07000 " save to disk? jms dskio; 07000 " save to disk?
1: 1:
dzm .insys " clear "in system call" flag dzm .insys " clear "in system call" flag
jms chkint " pending interrupt? jms chkint " pending user interrupt?
skp " no skp " no
jmp .save " yes: dump core jmp .save " yes: dump core
jms copy; u.rq+2; 10; 6 " restore auto-index locations 10-15 jms copy; u.rq+2; 10; 6 " restore auto-index locations 10-15
@@ -169,12 +169,14 @@ locsw: " table of system addresses for sysloc
locn: locn:
.-locsw-1 .-locsw-1
" check if interrupt for user " check if "interrupt" for current process
" checks .int1 and .int2 (contain i-number of interrupt source) " checks .int1 and .int2 (contain i-number of interrupt source)
" compared against process stdin
"
" call: " call:
" .insys/ 0 " .insys/ 0
" jms chkint " jms chkint
" no: no interrupt, or intflg set (discards interupt) " no: no interrupt, or intflg set (discards interrupt)
" yes: PI off, .insys set " yes: PI off, .insys set
chkint: 0 chkint: 0
lac .insys lac .insys
+5 -5
View File
@@ -121,7 +121,7 @@
lac i.uniq lac i.uniq
dac d.uniq dac d.uniq
-1 -1
tad i.nlks tad i.nlks " decrement link count!
dac i.nlks dac i.nlks
"** 01-s1.pdf page 9 "** 01-s1.pdf page 9
jms iput jms iput
@@ -138,10 +138,10 @@
jms dput jms dput
lac u.base lac u.base
jms iget jms iget
isz i.nlks isz i.nlks " increment link count
jmp 1f jmp 1f " not zero
jms itrunc jms itrunc " zero links: free blocks
dzm i.flags dzm i.flags " clear status (free inode)
1: 1:
jms iput jms iput
jmp sysexit jmp sysexit
+6 -6
View File
@@ -231,7 +231,7 @@ sww:
" read routine for ttyin special file " read routine for ttyin special file
rttyi: rttyi:
jms chkint1 jms chkint1
lac d1 lac d1 " ** written d3 ttyin2
jms getchar jms getchar
jmp 1f jmp 1f
and o177 and o177
@@ -258,9 +258,9 @@ wttyo:
xor o400000 xor o400000
dac sfiles+1 dac sfiles+1
lacq lacq
tls tls " load output buffer
sad o12 sad o12 " newline?
jms putcr jms putcr " yes, put CR as well
jmp fallr jmp fallr
1: 1:
lacq lacq
@@ -317,8 +317,8 @@ rkbdi:
wdspo: wdspo:
jms chkint1 jms chkint1
jms forall jms forall
jms dspput jms dspput " put char (fallr "returns" here)
jmp fallr jmp fallr " go back for next (continuation!)
jms sleep; sfiles+6 jms sleep; sfiles+6
jms swap jms swap
jmp wdspo jmp wdspo
+12
View File
@@ -141,6 +141,9 @@ copyz: 0
jmp copyz i " return jmp copyz i " return
t = t+1 t = t+1
" put queued character
" CALLED FROM PI: AVOIDS INDIRECT!!
" queue number in AC
putchar: 0 putchar: 0
"** 01-s1.pdf page 23 "** 01-s1.pdf page 23
dac 9f+t dac 9f+t
@@ -157,6 +160,14 @@ putchar: 0
jmp putchar i jmp putchar i
t = t+1 t = t+1
" get queued character
" CALLED FROM PI: AVOIDS INDIRECT!!
" queue number in AC:
" 1: tty input
" 2: tty output
" 3: display keyboard
" 4: paper tape reader
" 5: paper tape punch
getchar: 0 getchar: 0
jms takeq jms takeq
jmp i getchar jmp i getchar
@@ -168,6 +179,7 @@ getchar: 0
isz getchar isz getchar
jmp i getchar jmp i getchar
" CALLED FROM PI: AVOIDS INDIRECT!!
takeq: 0 takeq: 0
rcl rcl
tad lacq1 tad lacq1
+92 -83
View File
@@ -88,154 +88,163 @@ fput: 0
jmp fput i jmp fput i
t = t+1 t = t+1
" helper for special device write routines
" return to caller with next character to write:
" when done return character count to user.
forall: 0 forall: 0
lac u.base lac u.base
sad u.limit sad u.limit
jmp 1f jmp 1f " done
lac u.base lac u.base " get base pointer (again?)
ral ral " rotate MSB into LINK
lac u.base i lac u.base i " fetch word via base pointer
snl snl " link set?
lrs 9 lrs 9 " no: get low 9 bits
and o777 and o777 " mask to 9 bits
jmp forall i jmp forall i " return char
fallr: fallr: " jump here for subsequent characters
lac u.base lac u.base " get base
add o400000 add o400000 " advance pointer
dac u.base dac u.base " start from top
jmp forall+1 jmp forall+1
1: 1:
lac u.count lac u.count
dac u.ac dac u.ac
jmp sysexit jmp sysexit
" wait for a condition variable
" call:
" jmr sleep; sfiles+N
sleep: 0 sleep: 0
law ulist-1 law ulist-1 " pointer to process table
dac 8 dac 8 " in index register
lac o200000 lac o200000
lmq lmq " get 200000 in MQ
1: 1:
lac u.ulistp i lac u.ulistp i " get current process status word
sad 8 i sad 8 i " compare to next process table entry
jmp 1f jmp 1f " match
isz 8 " no match: skip other 3 words of process table
isz 8 isz 8
isz 8 isz 8
isz 8 cla; lrs 1 " shift MQ down one
cla; lrs 1 jmp 1b " loop
jmp 1b
1: 1:
tad o100000 tad o100000 " mark process not ready
dac u.ulistp i dac u.ulistp i
lac sleep i lac sleep i " get sleep variable pointer
dac 9f+t dac 9f+t
lac 9f+t i lac 9f+t i " get sleep variable contents
omq omq " or in MQ (bit vector of processes waiting)
dac 9f+t i dac 9f+t i " save
isz sleep isz sleep " skip sleep variable pointer
jmp sleep i jmp sleep i
t = t+1 t = t+1
"** 01-s1.pdf page 30 "** 01-s1.pdf page 30
" look for a free directory entry??
dslot: 0 dslot: 0
dzm di dzm di
skp skp
1: 1:
isz di isz di
lac di lac di
jms dget jms dget " get directory entry
lac d.i lac d.i " get i number
sza sza " zero (free)?
jmp 1b jmp 1b " no keep looking
jmp dslot i jmp dslot i " yes: return index
" called with: " called with:
" AC/ mode " AC/ mode
" name/ file name
icreat: 0 icreat: 0
dac 9f+t dac 9f+t " save mode in t0
jms dslot jms dslot
lac o20 lac o20 " look for a free inode starting at 17
dac ii dac ii
1: 1:
isz ii isz ii
lac ii lac ii
jms iget jms iget
lac i.flags lac i.flags
spa spa " "in use" bit bit clear?
jmp 1b jmp 1b " no, guess again
lac ii lac ii
dac d.i dac d.i
jms copy; name; d.name; 4 jms copy; name; d.name; 4
isz s.uniq isz s.uniq " get a new unique number
lac s.uniq lac s.uniq
dac d.uniq dac d.uniq " save in directory entry
dac i.uniq dac i.uniq " and inode
lac 9f+t lac 9f+t " get mode
xor o400000 xor o400000 " set "in use"
dac i.flags dac i.flags
lac u.uid lac u.uid " get user
dac i.uid dac i.uid " set owner
-1 -1
dac i.nlks dac i.nlks " -1 links?!
dzm i.size dzm i.size " empty
jms copyz; i.dskps; 7 jms copyz; i.dskps; 7 " clear disk block numbers
jms iput jms iput " write inode
jms dput jms dput " write directory entry
jmp icreat i jmp icreat i
t = t+1 t = t+1
" output character to display
dspput: 0 dspput: 0
and o177 and o177 " mask to 7 bits
sna sna
jmp i dspput jmp i dspput " discard NUL
sad o14 sad o14 " Form Feed?
jmp 1f jmp 1f " yes
lmq lmq " save char in MQ
sad o12 sad o12 " newline?
jms dspnl jms dspnl " yes
lac dsploc i lac dsploc i " get display word
sad o400000 sad o400000 " TRAP?
jmp dspleft jmp dspleft " yes (first character)
omq omq " no: or in second character
dac dsploc i dac dsploc i " save both characters
isz dsploc isz dsploc " advance display pointer
jmp i dspput jmp i dspput
"** 01-s1.pdf page 31 "** 01-s1.pdf page 31
1: 1: " here on form feed
jms dspinit jms dspinit " clear display
jmp dspput i jmp dspput i
dspleft: dspleft:
lac dsploc lac dsploc " get display pointer
sad edspbuf sad edspbuf " end of the buffer?
jmp 1f jmp 1f " yes: light up a button!?
dac 8 dac 8 " no: store in index
lac o400000 lac o400000 " get TRAP instruction
dac 8 i dac 8 i " store as next
cla; llss 18+7 cla; llss 18+7 " shift MQ upto "char1" position
dac dsploc i dac dsploc i " store word with char1
jmp dspput i jmp dspput i
dspnl: 0 dspnl: 0 " only called once!
lac dsplno lac dsplno " get display line number
sad d33 sad d33 " 33?
jmp 1f jmp 1f " yes: light a button!
isz dsplno isz dsplno " no: increment line number
jmp dspnl i jmp dspnl i
1: 1:
lac o2000 lac o2000 " get bit for push button 7
wbl wbl " write button lights
isz dspput isz dspput
jmp dspput i jmp dspput i
dspinit: 0 dspinit: 0
lac dspbufp3 lac dspbufp3 " get pointer to dspbuf+3
dac dsploc dac dsploc " store location
lac o400000 lac o400000 " display "TRAP" instruction
dac dspbuf+3 dac dspbuf+3 " save in buffer
dzm dsplno dzm dsplno " clear display line number
jmp dspinit i jmp dspinit i
movdsp: 0 movdsp: 0
+9 -6
View File
@@ -151,12 +151,14 @@ iput: 0
jmp iput i jmp iput i
t = t+3 t = t+3
" allocate directory entry
" AC/ entry number
dget: 0 dget: 0
dac di dac di " save entry number
alss 3 alss 3 " get word number
dac 9f+t dac 9f+t " save in t0
jms pget jms pget " get free disk block
dac 9f+t+1 dac 9f+t+1 " save in t1
jms dskrd jms dskrd
lac 9f+t lac 9f+t
and o77 and o77
@@ -185,7 +187,8 @@ dput: 0
t = t+3 t = t+3
" allocate a block for a file, returns disk block number " get a block number for a file, returns disk block number
" allocates block if not allocated
" AC/ file offset " AC/ file offset
" jms pget " jms pget
" AC/ disk block number " AC/ disk block number
+123 -115
View File
@@ -38,18 +38,18 @@ pibreak: " priority interrupt break processing "chain"
"** written: ttydelay -> ttyd1 "** written: ttydelay -> ttyd1
"** written: ttyrestart -> ttyres1 "** written: ttyrestart -> ttyres1
" referenced in iread: cnop: " fetched as constant in iread
cnop:
nop nop
-1 -1
dac 7 " set location 7 to -1 dac 7 " set location 7 to -1 (nothing ever clears it)
clon " enable clock interrupts, reset flag clon " enable clock interrupts, reset flag
lac ttydelay lac ttydelay " tty delay positive?
spa spa " yes: skip to skp
isz ttydelay isz ttydelay " no: done delaying?
skp skp " not done
jms ttyrestart jms ttyrestart " yes: start output
lac .dspb "** START CROSSED OUT: written: lac tty "** START CROSSED OUT: written: lac tty
lac .dspb
sna sna
jmp piret jmp piret
isz .dsptm isz .dsptm
@@ -61,23 +61,24 @@ cnop:
jmp piret jmp piret
jmp dsprestart "** END CROSSED OUT jmp dsprestart "** END CROSSED OUT
1: dssf 1: dssf " disk flag set?
jmp 1f jmp 1f " no
-1 -1 " set .dskb = -1
dac .dskb dac .dskb
"** 01-s1.pdf page 42 "** 01-s1.pdf page 42
dsrs dsrs " get disk status in .dske
dac .dske dac .dske
dscs dscs " clear status register
jmp piret jmp piret
1: lds "** BEGIN CROSSED OUT "** BEGIN CROSSED OUT
sma ral 1: lds " load display status (see 03-scope.pdf pg 25)
jmp 1f sma ral " edges flag??
cdf jmp 1f " not set
cdf " clear display flags?
lac .dspb lac .dspb
sna sna
jmp piret jmp piret
@@ -88,89 +89,89 @@ cnop:
jmp piret jmp piret
dsprestart: dsprestart:
lac d1 lac d1
dac .dspb dac .dspb " set .dsbp = 1
lac dspbufp lac dspbufp " load display buf pointer
beg beg " start display processor
-10 -10
dac .dsptm dac .dsptm " set .dsptm = -10 (10 ticks)
jmp piret jmp piret
1: sna ral 1: sna ral " dataphone flag set (bit 7)??
jmp .+3 jmp .+3 " no
dpcf dpcf " clear dataphone flag
jmp piret jmp piret " return
sma sma " light pen flags (bit 2)
jmp 1f jmp 1f " no
lda lda " G-2: load display address
dac .lpba dac .lpba " save
rlpd rlpd " G-2: resume after light pen stop
jmp piret jmp piret
1: ksf " (TTY) keyboard flag set? 1: ksf " (TTY) keyboard flag set?
jmp 1f " no jmp 1f " no
lac ttydelay lac ttydelay " get TTY delay
sma sma "
isz ttydelay isz ttydelay
krb " read keyboard buffer krb " read keyboard buffer
dac char " save in char dac char " save in char
sad o375 " interrupt char (TTY ALT MODE?) sad o375 " interrupt char (TTY ALT MODE?)
jmp intrp1 " yes jmp intrp1 " yes
lac d1 lac d1
jms putchar jms putchar
dzm char dzm char
lac sfiles+0 lac sfiles+0 " get sleep word for ttyin
jms wakeup jms wakeup " wake processes
dac sfiles+0 dac sfiles+0 " clear sleep word
lac char lac char " get character
sad o212 sad o212 " odd condition (break???)
skp skp " yes
jmp piret jmp piret " no: done
lac sfiles+1 lac sfiles+1 " get ttyout wait word
sma sma " bit for process 1 already set?
xor o400000 xor o400000 " no, make it so
dac sfiles+1 dac sfiles+1 " save back
"** 01-s1.pdf page 43 "** 01-s1.pdf page 43
jms putcr jms putcr " output CR next
jms ttyrestart jms ttyrestart " start output
jmp piret jmp piret
1: tsf 1: tsf " TTY output flag set?
jmp 1f jmp 1f " no
tcf tcf " yes: clear flag
jms ttyrestart jms ttyrestart " transmit next character
jmp piret jmp piret
ttyrestart: 0 ttyrestart: 0
lac ttydelay lac ttydelay " get tty delay
spa spa " positive?
jmp ttyrestart i jmp ttyrestart i " no: keep waiting
lac nttychar lac nttychar " get pending CR, if any
dzm nttychar dzm nttychar " clear it
sza sza " need to send CR?
jmp 3f jmp 3f " yes
isz ttydelay isz ttydelay " increment ttydelay (make more positive)
lac d2 lac d2
jms getchar jms getchar " get a character
jmp 2f jmp 2f " none found??
3: 3:
tls tls " start output
sad o12 sad o12 " newline?
jms putcr jms putcr " yes: put CR next
sad o15 sad o15 " CR?
skp skp " yes
jmp ttyrestart i jmp ttyrestart i " no: return
lac ttydelay lac ttydelay " get current tty delay
tad o20 tad o20 " bump by 16
rcr rcr " divide by two
cma cma " complement
dac ttydelay dac ttydelay " save
jmp ttyrestart i jmp ttyrestart i
2: 2:
lac sfiles+1 lac sfiles+1 " run out of characters to send: wake user(s)
jms wakeup jms wakeup
dac sfiles+1 dac sfiles+1
jmp ttyrestart i "** written arrow up 2 copies jmp ttyrestart i "** written arrow up 2 copies
@@ -270,7 +271,7 @@ ttyrestart: 0
lac sfiles+6 lac sfiles+6
jms wakeup jms wakeup
dac sfiles+6 dac sfiles+6
cla cla " clear button lights
wbl wbl
jmp piret "** END CROSSED OUT jmp piret "** END CROSSED OUT
@@ -292,35 +293,42 @@ piret: " return from priority interrupt
ion " reenable interrupts ion " reenable interrupts
jmp 0 i " return from interrupt jmp 0 i " return from interrupt
" wake sleeping processes
" NOTE!! Called from interrupt service, so avoids indirect!!!
" call:
" AC/ sfiles word (bit vector of processes to wake)
" jms wakeup
" AC/ 0 (to store in sfiles word)
wakeup: 0 wakeup: 0
dac 9f+t dac 9f+t " save vector in t0
-mnproc -mnproc
dac 9f+t+1 dac 9f+t+1 " loop count in t1
lac tadu lac tadu " get "tad ulist"
dac 2f dac 2f
lac dacu lac dacu " get "dac ulist"
dac 2f+1 dac 2f+1
1: 1:
lac 9f+t lac 9f+t
ral ral " rotate vector up one
dac 9f+t dac 9f+t
sma sma " high bit set?
jmp 2f+2 jmp 2f+2 " no: skip the fun
lac o700000 lac o700000 " yes: decrement process status (wake)
2: tad .. 2: tad .. " (avoiding indirect)
dac .. dac ..
lac 2b lac 2b " advance tad operand by 4 words
tad d4 tad d4
dac 2b dac 2b
lac 2b+1 lac 2b+1 " advance tad operand by 4 words
tad d4 tad d4
dac 2b+1 dac 2b+1
isz 9f+t+1 isz 9f+t+1 " done?
jmp 1b jmp 1b " no, keep going
cla cla " return zero in AC
jmp wakeup i jmp wakeup i
t = t+2 t = t+2
" call to output CR after LF (NL)
putcr: 0 putcr: 0
lac o15 lac o15
dac nttychar dac nttychar
@@ -330,43 +338,43 @@ putcr: 0
cla cla
jmp putcr i jmp putcr i
intrp1: " here with TTY interrupt character intrp1: " here with TTY interrupt character
lac d6 " get keyboard special device number lac d6 " get keyboard special device number
dac .int1 " save as interrupt source dac .int1 " save as interrupt source
lac d1 lac d1 " drain tty input buffer?
jms getchar jms getchar
skp skp
jmp .-3 jmp .-3
lac d2 lac d2 " drain tty output buffer?
jms getchar jms getchar
skp skp
jmp .-3 jmp .-3
lac sfiles+0 lac sfiles+0 " wake ttyin sleepers
jms wakeup jms wakeup
dac sfiles+0 dac sfiles+0
lac sfiles+1 lac sfiles+1 " wake ttyout sleepers
jms wakeup jms wakeup
dac sfiles+1 dac sfiles+1
jms chkint jms chkint " check if user interrupted
jmp piret jmp piret " no, return from PI
jmp 1f jmp 1f " yes: return thru system call code (dump core)
intrp2: intrp2: " here with display interrupt character
lac d7 lac d7 " get keyboard special device number
dac .int2 dac .int2 " save as interrupt source
lac d3 lac d3 " drain keyboard buffer?
jms getchar jms getchar
skp skp
jmp .-3 jmp .-3
lac sfiles+2 lac sfiles+2 " wake up any "keyboard" sleepers
jms wakeup jms wakeup
dac sfiles+2 dac sfiles+2
lac sfiles+6 lac sfiles+6 " wake up any "display" sleepers
jms wakeup jms wakeup
dac sfiles+6 dac sfiles+6
jms chkint jms chkint " check if user interrupted
jmp piret jmp piret " no, return from PI
1: 1:
lac 0 lac 0 " get interrupt PC
dac 020 dac 020 " save as system call return PC
lac .ac lac .ac " restore AC from interrupt
jmp 021 jmp 021 " join system call processing (dump core?)
+31 -20
View File
@@ -8,11 +8,10 @@ dspbsz = 270
ndskbs = 4 ndskbs = 4
" flags " flags
" interupt flags
.insys: 0 " "in system" .insys: 0 " "in system"
.int1: 0 " inode for interrupt 1 .int1: 0 " inode for user interrupt 1
.int2: 0 " inode for interrupt 2 .int2: 0 " inode for user interrupt 2
.ac: 0 " saved AC from interrupt .ac: 0 " saved AC from Priotity Interrupt
.savblk: 0 " set by system call, cleared by disk i/o .savblk: 0 " set by system call, cleared by disk i/o
.dsptm: 0 " display restart countdown (10 ticks) .dsptm: 0 " display restart countdown (10 ticks)
.dskb: 0 " set on disk interrupt .dskb: 0 " set on disk interrupt
@@ -94,10 +93,16 @@ o777760: 0777760
dm3: -3 dm3: -3
dm1: -1 dm1: -1
9: .=.+t 9: .=.+t " per-routine temp variables
c1: .=.+1 c1: .=.+1 " not used?
q1: q2;q2+90 "** ?? 98 ?? q1: q2;q2+98 " ** 90? 96?? " queue element free list?
.=.+14 .=.+14
" queues (two words each, head and tail pointers?)
" 1: tty input
" 2: tty output
" 3: display keyboard
" 4: paper tape reader
" 5: paper tape punch
q2: q2:
.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0 .+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0
.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0 .+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0
@@ -107,7 +112,10 @@ q2:
dsploc: .=.+1 dsploc: .=.+1
dsplno: .=.+1 dsplno: .=.+1
dspbuf: dspbuf:
0065057;0147740;0160000 0065057;0147740;0160000 " display commands: see 03-scope.pdf pg 20
" PARAM: clear blink, clear light pen, scale=1, intensity=3
" X-Y: invisible, no delay, Y=01740 (992)
" X-Y: invisible, settling delay, X=0
.=.+30 .=.+30
coldentry: coldentry:
dzm 0100 " not re-entrant dzm 0100 " not re-entrant
@@ -134,13 +142,13 @@ coldentry:
dskbuf = 07700 dskbuf = 07700
dskbs: .=.+65+65+65+65 dskbs: .=.+65+65+65+65
edskbsp: . edskbsp: .
uquant: .=.+1 uquant: .=.+1 " number of ticks user has been running
dspbufp: .=.+1 dspbufp: .=.+1 " pointer to display buffer
pbsflgs: .=.+2 pbsflgs: .=.+2 " buttons on last tick, last button interrupt
mode: .=.+1 mode: .=.+1
nttychar: .=.+1 nttychar: .=.+1 " CR to send next, or zero
npptchar: .=.+1 npptchar: .=.+1
ttydelay: .=.+1 ttydelay: .=.+1 " delay count for TTY output
name: .=.+4 name: .=.+4
lnkaddr: .=.+1 lnkaddr: .=.+1
char: .=.+1 char: .=.+1
@@ -148,6 +156,9 @@ dskaddr: .=.+1
uniqpid: 1 " pid generator uniqpid: 1 " pid generator
lu: .=.+4 " user (process) table entry copy lu: .=.+4 " user (process) table entry copy
sfiles: .=.+10 " wait addresses for special files sfiles: .=.+10 " wait addresses for special files
" (bit vector of waiting processes?)
" offsets: 0: ttyin, 1: ttyout, 2: keyboard,
" 3: ptr, 4: ptp, 6: display
dpdata: dpdata:
dpstat: .=.+1 dpstat: .=.+1
dpread: .=.+1 dpread: .=.+1
@@ -211,21 +222,21 @@ userdata: " "ustruct" (swappable)
ii: .=.+1 " number of i-node in inode: ii: .=.+1 " number of i-node in inode:
inode: " disk inode in memory: inode: " disk inode in memory:
i.flags: .=.+1 " inode flags i.flags: .=.+1 " inode flags
" 400000 free?? (checked/toggled by icreat) " 400000 in use
" 200000 large file " 200000 large file
" 000040 special device (indicated by inum)? " 000040 special device (indicated by inum)
" 000020 directory " 000020 directory
" 000010 owner read " 000010 owner read
" 000004 owner write " 000004 owner write
" 000002 world read " 000002 world read
" 000001 world write " 000001 world write
i.dskps: .=.+7 " disk block pointers (indirect if "large file") i.dskps: .=.+7 " disk block numbers (indirect if "large file")
i.uid: .=.+1 " owner i.uid: .=.+1 " owner
i.nlks: .=.+1 " link count i.nlks: .=.+1 " link count (negative)
i.size: .=.+1 i.size: .=.+1 " size (in words)
i.uniq: .=.+1 " unique number i.uniq: .=.+1 " unique number
.= inode+12 .= inode+12
di: .=.+1 di: .=.+1 " directory index
dnode: " directory entry: dnode: " directory entry:
d.i: .=.+1 " inode number d.i: .=.+1 " inode number
d.name: .=.+4 " name (space padded) d.name: .=.+4 " name (space padded)
+13 -13
View File
@@ -67,9 +67,9 @@ krb = 0700312 " KBD: read buffer
tsf = 0700401 " TTY: skip if flag set tsf = 0700401 " TTY: skip if flag set
tcf = 0700402 " TTY: clear flag tcf = 0700402 " TTY: clear flag
tls = 0700406 " TTY: load buffer, select tls = 0700406 " TTY: load buffer, select
sck = 0704301 " S-2: skip on console keyboard sck = 0704301 " G-2: skip on console keyboard
cck = 0704304 " S-2: clear console keyboard cck = 0704304 " G-2: clear console keyboard
lck = 0704312 " S-2: load console keyboard lck = 0704312 " G-2: load console keyboard
rsf = 0700101 " PTR: skip if flag set rsf = 0700101 " PTR: skip if flag set
rsa = 0700104 " PTR: select alphanumeric mode rsa = 0700104 " PTR: select alphanumeric mode
rrb = 0700112 " PTR: clear flag, or read buffer rrb = 0700112 " PTR: clear flag, or read buffer
@@ -77,16 +77,16 @@ psf = 0700201 " PTP: skip if flag set
pcf = 0700202 " PTP: clear flag pcf = 0700202 " PTP: clear flag
psa = 0700204 " PTP: alphanumeric mode psa = 0700204 " PTP: alphanumeric mode
cdf = 0700501 " ??? cdf = 0700501 " ???
lds = 0701052 " S-2: load display status lds = 0701052 " G-2: load display status
lda = 0701012 " S-2: load display address lda = 0701012 " G-2: load display address
wcga = 0704206 " S-2: ??? wcga = 0704206 " G-2: ???
raef = 0700742 " S-2: resume after edges flag raef = 0700742 " G-2: resume after edges flag
rlpd = 0700723 " S-2: resume after light pen stop, disabled rlpd = 0700723 " G-2: resume after light pen stop, disabled
beg = 0700547 " S-2: begin beg = 0700547 " G-2: begin
spb = 0704401 " S-2: skip on push button flag spb = 0704401 " G-2: skip on push button flag
cpb = 0704404 " S-2: clear push button flag cpb = 0704404 " G-2: clear push button flag
lpb = 0704412 " S-2: load push buttons lpb = 0704412 " G-2: load push buttons
wbl = 0704424 " S-2: write button lights wbl = 0704424 " G-2: write button lights
dprs = 0704752 " dataphone: read status dprs = 0704752 " dataphone: read status
dpsf = 0704741 " dataphone: skip on flag dpsf = 0704741 " dataphone: skip on flag
dpcf = 0704761 " dataphone: clear flag dpcf = 0704761 " dataphone: clear flag