add some (tab separated) comments; fixed some typos

This commit is contained in:
Phil Budne
2016-02-29 14:22:27 -05:00
parent b3259cc9d1
commit 2def710c48
3 changed files with 67 additions and 64 deletions
+43 -43
View File
@@ -21,61 +21,61 @@ orig:
jmp 1f+1 jmp 1f+1
1f 1f
1: 0 1: 0
iof iof " interrupts off
dac u.ac dac u.ac " save user AC
lacq lacq
dac u.mq dac u.mq " save user MQ
lac 8 lac 8
dac u.rq dac u.rq " save user auto-index location 8
lac 9 lac 9
dac u.rq+1 dac u.rq+1 " save user auto-index location 9
jms copy; 10; u.rq+2; 6 jms copy; 10; u.rq+2; 6 " save user auto-index locations 10-15
lac 1b lac 1b " load user PC after system call
dac u.rq+8 dac u.rq+8 " save user PC
-1 " load -1
dac .savblk " set "save" flag (cleared by disk I/O?)
dac .insys " set "in system" flag
lac uquant " load user quantum count
jms betwen; d0; maxquant " check if between 0 & maxquant??
jms swap " no: swap processes
ion " interrupts on
-1 -1
dac .savblk tad u.rq+8 " get address of system call
dac .insys jms laci " load AC indirect??
lac uquant jms betwen; o20001; swn " range check
jms betwen; d0; maxquant jmp badcal " bad system call
jms swap tad swp " add system call table base
ion dac .+1 " save as next instruction
-1 jmp .. i " dispatch system call
tad u.rq+8
jms laci
jms betwen; o20001; swn
jmp badcal
tad swp
dac .+1
jmp .. i
. = orig+0100 . = orig+0100
jmp coldentry jmp coldentry
jms halt jms halt
okexit: okexit:
dzm: u.ac dzm u.ac " 'OK' system call exit: clear user AC
sysexit: sysexit: " common system call exit code
ion ion " enable interrupts
lac .savblk lac .savblk " load "save" flag
sza sza " is zero (cleared by disk I/O)?
jmp 1f jmp 1f " no: no disk I/O done?
jms copy; sysdata; dskbuf; 64 jms copy; sysdata; dskbuf; 64 " copy system data to disk buffer
cla cla
jms dskio; 07000 jms dskio; 07000 " save to disk?
1: 1:
dzm .insys dzm .insys " clear "in system call" flag
jms chkint jms chkint
skp skp
jmp .save jmp .save " dump core??
jms copy; u.rq+2; 10; 6 jms copy; u.rq+2; 10; 6 " restore auto-index locations 10-15
lac u.rq+1 lac u.rq+1 " restore auto-index location 9
dac 9 dac 9
lac u.rq lac u.rq " restore auto-index location 8
dac 8 dac 8
lac u.rq lac u.mq " restore MQ register
lmq lmq
lac u.ac lac u.ac " restore AC register
jmp u.rq+8 i jmp u.rq+8 i " return to user
swap: 0 swap: 0
ion ion
@@ -129,21 +129,21 @@ swap: 0
jmp swap i jmp swap i
t = t+1 t = t+1
swp: swp: " system call dispatch table
jmp . jmp . " base instruction
.save; .getuid; .open; .read; .write; .creat; .seek; .tell .save; .getuid; .open; .read; .write; .creat; .seek; .tell
.close; .link; .unlink; .setuid; .rename; .exit; .time; .intrp .close; .link; .unlink; .setuid; .rename; .exit; .time; .intrp
.chdir; .chmod; .chown; badcal; .sysloc; badcal; .capt; .rele .chdir; .chmod; .chown; badcal; .sysloc; badcal; .capt; .rele
.status; badcal; .smes; .rmes; .fork .status; badcal; .smes; .rmes; .fork
swn: swn:
.-swp-1 i .-swp-1 i " count of system calls, plus indirect!
.intrp: .intrp:
lac u.ac lac u.ac
dac u.intflg dac u.intflg
jmp okexit jmp okexit
.sysloc: .sysloc: " "sysloc": syscall to return system addresses
lac u.ac lac u.ac
and o17777 and o17777
jms betwen; d1; locn jms betwen; d1; locn
@@ -154,7 +154,7 @@ swn:
dac u.ac dac u.ac
jmp sysexit jmp sysexit
locsw: locsw: " table of system data structures for "sysloc" call
lac . lac .
iget; inode; userdata; sysdata; copy; copyz; betwen; dskrd iget; inode; userdata; sysdata; copy; copyz; betwen; dskrd
dskwr; dskbuf; dpdata; namei; pbsflgs; alloc; free; dspdata dskwr; dskbuf; dpdata; namei; pbsflgs; alloc; free; dspdata
+15 -12
View File
@@ -53,9 +53,9 @@
jms iput jms iput
jmp okexit jmp okexit
.getuid: .getuid: " getuid system call
lac u.uid lac u.uid
dac u.ac dac u.ac " return u.uid in user AC
jmp sysexit jmp sysexit
.seek: .seek:
@@ -146,12 +146,12 @@
jms iput jms iput
jmp sysexit jmp sysexit
.setuid: .setuid: " setuid system call
lac u.uid lac u.uid " load current user id
sma sma " negative?
jms error jms error " no: error!!
lac u.ac lac u.ac " load user AC
dac u.uid dac u.uid " save as new uid
jmp sysexit jmp sysexit
.rename: .rename:
@@ -168,11 +168,14 @@
jms copy; 1:0; d.name; 4 jms copy; 1:0; d.name; 4
jmp okexit jmp okexit
" time system call returns line (mains) frequency ticks since boot?
" note: returns uptime!?
" at 60Hz, 36 bits would last 36+ years!
.time: .time:
lac s.tim lac s.tim " load high order bits
dac u.ac dac u.ac " return in AC
lac s.tim+1 lac s.tim+1 " load low order bits
dac u.mq dac u.mq " return in MQ
jmp sysexit jmp sysexit
.chdir: .chdir:
+9 -9
View File
@@ -1,7 +1,7 @@
"** 01-s1.pdf page 41 "** 01-s1.pdf page 41
" s7 " s7
pibreak: pibreak: " priority interrupt processing "chain"
dac .ac "** CROSSED OUT.... dac .ac "** CROSSED OUT....
dpsf dpsf
@@ -25,15 +25,15 @@ pibreak:
dac dpwrite dac dpwrite
jmp piret "** END OF CROSSOUT jmp piret "** END OF CROSSOUT
1: clsf 1: clsf " clock overflow (line frequency ticks)?
jmp 1f jmp 1f " no
lpb lpb " load display push buttons
dac pbsflgs dac pbsflgs " save
isz s.tim+1 isz s.tim+1 " increment low order tick count
skp skp " no overflow, skip second increment
isz s.tim isz s.tim " low order overflowed, increment high order count
isz uquant isz uquant " increment user quantum counter
"** written: ttydelay -> ttyd1 "** written: ttydelay -> ttyd1
"** written: ttyrestart -> ttyres1 "** written: ttyrestart -> ttyres1
cnop: cnop: