system comments

This commit is contained in:
Phil Budne
2016-03-03 13:42:03 -05:00
parent ffbc0b1dab
commit 864c896a8c
8 changed files with 311 additions and 243 deletions
+39 -26
View File
@@ -64,9 +64,9 @@ sysexit: " common system call exit code
jms dskio; 07000 " save to disk?
1:
dzm .insys " clear "in system call" flag
jms chkint
skp
jmp .save " dump core??
jms chkint " pending interrupt?
skp " no
jmp .save " yes: dump core
jms copy; u.rq+2; 10; 6 " restore auto-index locations 10-15
lac u.rq+1 " restore auto-index location 9
dac 9
@@ -139,12 +139,18 @@ swp: " system call dispatch table
swn:
.-swp-1 i " count of system calls, plus indirect!
" AC/ new value for intflg
" sys intrp
.intrp:
lac u.ac
dac u.intflg
jmp okexit
.sysloc: " "sysloc": syscall to return system addresses
" syscall to retrieve system addresses (data & routines!!)
" AC/ index (1..17)
" sys sysloc
" AC/ address (or -1 on bad index)
.sysloc:
lac u.ac
and o17777
jms betwen; d1; locn
@@ -155,7 +161,7 @@ swn:
dac u.ac
jmp sysexit
locsw: " table of system data structures for "sysloc" call
locsw: " table of system addresses for sysloc
lac .
iget; inode; userdata; sysdata; copy; copyz; betwen; dskrd
dskwr; dskbuf; dpdata; namei; pbsflgs; alloc; free; dspdata
@@ -163,34 +169,41 @@ locsw: " table of system data structures for "sysloc" call
locn:
.-locsw-1
" check if interrupt for user
" checks .int1 and .int2 (contain i-number of interrupt source)
" call:
" .insys/ 0
" jms chkint
" no: no interrupt, or intflg set (discards interupt)
" yes: PI off, .insys set
chkint: 0
lac .insys
sza
jmp chkint i
lac .int1
sna
jmp 1f
sad u.ofiles+2
jmp 2f
sza " in system?
jmp chkint i " yes: return
lac .int1 " get inumber of interrupt1 source?
sna " zero?
jmp 1f " yes: skip stdin check
sad u.ofiles+2 " non-zero: compare to stdin inumber
jmp 2f " same
1:
lac .int2
sna
jmp chkint i
sad u.ofiles+2
skp
jmp chkint i
dzm .int2
lac .int2 " get inum of interrupt 2 source?
sna " zero?
jmp chkint i " yes: return
sad u.ofiles+2 " non-zero: compare to stdin inumber
skp " match!
jmp chkint i " no match: return
dzm .int2 " clear int2 source
jmp 1f
2:
dzm .int1
dzm .int1 " clear int1 source
1:
"** 01-s1.pdf page 5
lac u.intflg
sza
jmp chkint i
lac u.intflg " get user intflg
sza " zero?
jmp chkint i " no: ignore
-1
dac .insys
ion
isz chkint
dac .insys " set "in system" flag
ion " enable interrupts
isz chkint " give skip return
jmp chkint i