mirror of
https://github.com/DoctorWkt/pdp7-unix.git
synced 2026-05-02 22:32:42 +00:00
18
src/sys/s1.s
18
src/sys/s1.s
@@ -30,12 +30,12 @@ orig:
|
||||
lacq
|
||||
dac u.mq " save user MQ in user area
|
||||
lac 8
|
||||
dac u.rq " save user auto-index location 8 in uarea
|
||||
dac u.rg " save user auto-index location 8 in uarea
|
||||
lac 9
|
||||
dac u.rq+1 " save auto-index location 9 in user area
|
||||
jms copy; 10; u.rq+2; 6 " save auto-index locations 10-15 (using 8/9!)
|
||||
dac u.rg+1 " save auto-index location 9 in user area
|
||||
jms copy; 10; u.rg+2; 6 " save auto-index locations 10-15 (using 8/9!)
|
||||
lac 1b " load user PC
|
||||
dac u.rq+8 " save in user area
|
||||
dac u.rg+8 " save in user area
|
||||
-1 " load -1
|
||||
dac .savblk " set "save" flag (cleared by disk I/O?)
|
||||
dac .insys " set "in system" flag
|
||||
@@ -44,7 +44,7 @@ orig:
|
||||
jms swap " no: quantum expired: swap process out
|
||||
ion " interrupts on
|
||||
-1
|
||||
tad u.rq+8 " get address of system call
|
||||
tad u.rg+8 " get address of system call
|
||||
jms laci " load system call instruction
|
||||
jms betwen; o20001; swn " range check (expects CAL I!)
|
||||
jmp badcal " bad system call
|
||||
@@ -71,15 +71,15 @@ sysexit: " common system call exit code
|
||||
jms chkint " pending user interrupt?
|
||||
skp " no, return to user
|
||||
jmp .save " yes: dump core
|
||||
jms copy; u.rq+2; 10; 6 " restore auto-index locations 10-15 (use 8/9)
|
||||
lac u.rq+1 " restore auto-index location 9
|
||||
jms copy; u.rg+2; 10; 6 " restore auto-index locations 10-15 (use 8/9)
|
||||
lac u.rg+1 " restore auto-index location 9
|
||||
dac 9
|
||||
lac u.rq " restore auto-index location 8
|
||||
lac u.rg " restore auto-index location 8
|
||||
dac 8
|
||||
lac u.mq " restore MQ register
|
||||
lmq
|
||||
lac u.ac " restore AC register
|
||||
jmp u.rq+8 i " return to user
|
||||
jmp u.rg+8 i " return to user
|
||||
|
||||
" scheduler / swapper / idle loop
|
||||
swap: 0
|
||||
|
||||
@@ -81,7 +81,7 @@ lookfor: 0
|
||||
dac u.pid " set child pid
|
||||
isz 9f+t " advance to second word in process table
|
||||
dac 9f+t i " set pid in process table
|
||||
isz u.rq+8 " give skip return
|
||||
isz u.rg+8 " give skip return
|
||||
dzm u.intflg " clear int flag
|
||||
jmp sysexit " return in child process
|
||||
t= t+1
|
||||
|
||||
@@ -264,8 +264,8 @@ movdsp: 0
|
||||
|
||||
" fetch user argument from word after "sys" call, return in AC
|
||||
arg: 0
|
||||
lac u.rq+8 i " fetch word after return PC
|
||||
isz u.rq+8 " bump PC
|
||||
lac u.rg+8 i " fetch word after return PC
|
||||
isz u.rg+8 " bump PC
|
||||
jmp arg i
|
||||
|
||||
" fetch user pathname argument from pointer word after "sys" call
|
||||
|
||||
@@ -209,7 +209,7 @@ ulist:
|
||||
userdata: " "ustruct" (swappable)
|
||||
u.ac: 0 " user AC
|
||||
u.mq: 0 " user MQ
|
||||
u.rq: .=.+9 " user 010-017, user PC
|
||||
u.rg: .=.+9 " user 010-017, user PC
|
||||
u.uid: -1 " user id
|
||||
u.pid: 1 " process id
|
||||
u.cdir: 3 " current directory (i-num?)
|
||||
|
||||
Reference in New Issue
Block a user