1
0
mirror of https://github.com/livingcomputermuseum/pdp7-unix.git synced 2026-02-10 02:10:31 +00:00

sys: more comments

This commit is contained in:
Phil Budne
2016-03-11 16:32:11 -05:00
parent 802ab257b9
commit 9372fa5f56
5 changed files with 47 additions and 29 deletions

View File

@@ -317,8 +317,8 @@ rkbdi:
wdspo:
jms chkint1
jms forall
jms dspput
jmp fallr
jms dspput " put char (fallr "returns" here)
jmp fallr " go back for next (continuation!)
jms sleep; sfiles+6
jms swap
jmp wdspo

View File

@@ -141,6 +141,9 @@ copyz: 0
jmp copyz i " return
t = t+1
" put queued character
" CALLED FROM PI: AVOIDS INDIRECT!!
" queue number in AC
putchar: 0
"** 01-s1.pdf page 23
dac 9f+t
@@ -157,6 +160,14 @@ putchar: 0
jmp putchar i
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
jms takeq
jmp i getchar
@@ -168,6 +179,7 @@ getchar: 0
isz getchar
jmp i getchar
" CALLED FROM PI: AVOIDS INDIRECT!!
takeq: 0
rcl
tad lacq1

View File

@@ -204,9 +204,9 @@ dspput: 0
jms dspnl " yes
lac dsploc i " get display word
sad o400000 " TRAP?
jmp dspleft " yes
omq " no: get character back
dac dsploc i " save as "character 2"
jmp dspleft " yes (first character)
omq " no: or in second character
dac dsploc i " save both characters
isz dsploc " advance display pointer
jmp i dspput
@@ -219,19 +219,19 @@ dspput: 0
dspleft:
lac dsploc " get display pointer
sad edspbuf " end of the buffer?
jmp 1f " yes
dac 8
jmp 1f " yes: light up a button!?
dac 8 " no: store in index
lac o400000 " get TRAP instruction
dac 8 i " store
cla; llss 18+7
dac dsploc i
dac 8 i " store as next
cla; llss 18+7 " shift MQ upto "char1" position
dac dsploc i " store word with char1
jmp dspput i
dspnl: 0
lac dsplno
sad d33
jmp 1f
isz dsplno
dspnl: 0 " only called once!
lac dsplno " get display line number
sad d33 " 33?
jmp 1f " yes: light a button!
isz dsplno " no: increment line number
jmp dspnl i
1:
lac o2000 " get bit for push button 7

View File

@@ -338,29 +338,29 @@ putcr: 0
cla
jmp putcr i
intrp1: " here with TTY interrupt character
lac d6 " get keyboard special device number
dac .int1 " save as interrupt source
lac d1
intrp1: " here with TTY interrupt character
lac d6 " get keyboard special device number
dac .int1 " save as interrupt source
lac d1 " drain tty input buffer?
jms getchar
skp
jmp .-3
lac d2
lac d2 " drain tty output buffer?
jms getchar
skp
jmp .-3
lac sfiles+0
lac sfiles+0 " wake ttyin sleepers
jms wakeup
dac sfiles+0
lac sfiles+1
lac sfiles+1 " wake ttyout sleepers
jms wakeup
dac sfiles+1
jms chkint " check if user interrupted
jmp piret " no, return from PI
jmp 1f " yes: return from system call
jmp 1f " yes: return thru system call code (dump core)
intrp2: " here with display interrupt character
lac d7
dac .int2
lac d7 " get keyboard special device number
dac .int2 " save as interrupt source
lac d3 " drain keyboard buffer?
jms getchar
skp
@@ -377,4 +377,4 @@ intrp2: " here with display interrupt character
lac 0 " get interrupt PC
dac 020 " save as system call return PC
lac .ac " restore AC from interrupt
jmp 021 " join system call processing!!!
jmp 021 " join system call processing (dump core?)

View File

@@ -93,10 +93,16 @@ o777760: 0777760
dm3: -3
dm1: -1
9: .=.+t
c1: .=.+1
q1: q2;q2+90 "** ?? 98 ??
9: .=.+t " per-routine temp variables
c1: .=.+1 " not used?
q1: q2;q2+98 " ** 90? 96?? " queue element free list?
.=.+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:
.+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