Merge pull request #58 from philbudne/master
fix init, build dsksav/dskres, have shell wake init before exit
This commit is contained in:
+8
-2
@@ -79,8 +79,8 @@ dirs:
|
|||||||
|
|
||||||
# The commands that came from the original scans
|
# The commands that came from the original scans
|
||||||
cmd: dirs $(BINDIR)/as $(BINDIR)/cat $(BINDIR)/check $(BINDIR)/chmod \
|
cmd: dirs $(BINDIR)/as $(BINDIR)/cat $(BINDIR)/check $(BINDIR)/chmod \
|
||||||
$(BINDIR)/chown $(BINDIR)/chrm $(BINDIR)/cp $(BINDIR)/ds $(BINDIR)/ed \
|
$(BINDIR)/chown $(BINDIR)/chrm $(BINDIR)/cp $(BINDIR)/ds \
|
||||||
$(BINDIR)/init
|
$(BINDIR)/dskres $(BINDIR)/dsksav $(BINDIR)/ed $(BINDIR)/init
|
||||||
|
|
||||||
# Alternate commands: no dd, but . and ..
|
# Alternate commands: no dd, but . and ..
|
||||||
altcmd: dirs $(BINDIR)/as $(BINDIR)/cat $(BINDIR)/check $(BINDIR)/chmod \
|
altcmd: dirs $(BINDIR)/as $(BINDIR)/cat $(BINDIR)/check $(BINDIR)/chmod \
|
||||||
@@ -114,6 +114,12 @@ $(BINDIR)/cp: $(CMDSRC)/cp.s
|
|||||||
$(BINDIR)/ds: $(CMDSRC)/ds.s
|
$(BINDIR)/ds: $(CMDSRC)/ds.s
|
||||||
$(AS) $(ASARGS) -o $(BINDIR)/ds $(CMDSRC)/ds.s
|
$(AS) $(ASARGS) -o $(BINDIR)/ds $(CMDSRC)/ds.s
|
||||||
|
|
||||||
|
$(BINDIR)/dskres: $(CMDSRC)/dskres.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s
|
||||||
|
$(AS) $(ASARGS) -o $(BINDIR)/dskres $(CMDSRC)/dskres.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s
|
||||||
|
|
||||||
|
$(BINDIR)/dsksav: $(CMDSRC)/dsksav.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s
|
||||||
|
$(AS) $(ASARGS) -o $(BINDIR)/dsksav $(CMDSRC)/dsksav.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s
|
||||||
|
|
||||||
$(BINDIR)/ed: $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
|
$(BINDIR)/ed: $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
|
||||||
$(AS) $(ASARGS) -o $(BINDIR)/ed $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
|
$(AS) $(ASARGS) -o $(BINDIR)/ed $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ dd drwr- -1 4
|
|||||||
cp frwr- -1 bin/cp
|
cp frwr- -1 bin/cp
|
||||||
date frwr- -1 bin/date
|
date frwr- -1 bin/date
|
||||||
ds frwr- -1 bin/ds
|
ds frwr- -1 bin/ds
|
||||||
|
dskres frwr- -1 bin/dskres
|
||||||
|
dsksav frwr- -1 bin/dsksav
|
||||||
ed frwr- -1 bin/ed
|
ed frwr- -1 bin/ed
|
||||||
init frwr- -1 bin/init
|
init frwr- -1 bin/init
|
||||||
ln frwr- -1 bin/ln
|
ln frwr- -1 bin/ln
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ dskwr1: 0
|
|||||||
jmp i dskwr1
|
jmp i dskwr1
|
||||||
|
|
||||||
|
|
||||||
iskio: 0
|
dskio: 0
|
||||||
cll; idiv; 80
|
cll; idiv; 80
|
||||||
dac 2f
|
dac 2f
|
||||||
lacq
|
lacq
|
||||||
|
|||||||
+1
-1
@@ -100,7 +100,7 @@ ca:
|
|||||||
ca1:
|
ca1:
|
||||||
jms rline
|
jms rline
|
||||||
lac line
|
lac line
|
||||||
sad o56012
|
sad o56012 " . NL?
|
||||||
jmp advanc
|
jmp advanc
|
||||||
jms append
|
jms append
|
||||||
jmp ca1
|
jmp ca1
|
||||||
|
|||||||
+3
-3
@@ -4,16 +4,16 @@
|
|||||||
sys intrp
|
sys intrp
|
||||||
jms init1 " Fork the first child connected to ttyin/ttyout
|
jms init1 " Fork the first child connected to ttyin/ttyout
|
||||||
jms init2 " Fork the second child connected to keyboard/display
|
jms init2 " Fork the second child connected to keyboard/display
|
||||||
1:
|
l:
|
||||||
sys rmes " Wait for a child to exit
|
sys rmes " Wait for a child to exit
|
||||||
sad pid1
|
sad pid1
|
||||||
jmp 1f " It was child 1, so jump to 1f and restart it
|
jmp 1f " It was child 1, so jump to 1f and restart it
|
||||||
sad pid2
|
sad pid2
|
||||||
jms init2 " It was child 2, so restart it
|
jms init2 " It was child 2, so restart it
|
||||||
jmp 1 " and loop back. XXX: weird use of 1: not 1b. I don't like it!
|
jmp l " and loop back.
|
||||||
1:
|
1:
|
||||||
jms init1
|
jms init1
|
||||||
jmp 1 " Weird use of 1: not 1b. I don't like it!
|
jmp l
|
||||||
|
|
||||||
init1: 0
|
init1: 0
|
||||||
sys fork " Fork a child process
|
sys fork " Fork a child process
|
||||||
|
|||||||
+6
-1
@@ -332,7 +332,7 @@ rline: 0
|
|||||||
1:
|
1:
|
||||||
cla; sys read; char; 1 " Read in one character from stdin
|
cla; sys read; char; 1 " Read in one character from stdin
|
||||||
sna " read ok?
|
sna " read ok?
|
||||||
sys exit " EOF: quit
|
jmp quit " no
|
||||||
lac char
|
lac char
|
||||||
lrss 9 " Get it and shift down 9 bits
|
lrss 9 " Get it and shift down 9 bits
|
||||||
sad o100 " '@' (kill) character?
|
sad o100 " '@' (kill) character?
|
||||||
@@ -353,6 +353,11 @@ rline: 0
|
|||||||
dac 8
|
dac 8
|
||||||
jmp 1b " and loop back
|
jmp 1b " and loop back
|
||||||
|
|
||||||
|
quit:
|
||||||
|
lac d1; sys smes " wake up init
|
||||||
|
sys exit
|
||||||
|
|
||||||
|
" copied from cat.s:
|
||||||
putc: 0
|
putc: 0
|
||||||
and o177 " Keep the lowest 7 bits and save into 2f+1
|
and o177 " Keep the lowest 7 bits and save into 2f+1
|
||||||
dac 2f+1
|
dac 2f+1
|
||||||
|
|||||||
+2
-2
@@ -283,11 +283,11 @@ rkbdi:
|
|||||||
lmq
|
lmq
|
||||||
and o155
|
and o155
|
||||||
sad o55
|
sad o55
|
||||||
jmp 1f
|
jmp 1f " -/=? map to =?-/ ???
|
||||||
lacq
|
lacq
|
||||||
and o137
|
and o137
|
||||||
sad o134
|
sad o134
|
||||||
skp
|
skp " \| map to Ll ???
|
||||||
jmp 2f
|
jmp 2f
|
||||||
1:
|
1:
|
||||||
lacq
|
lacq
|
||||||
|
|||||||
+5
-5
@@ -77,18 +77,18 @@ cnop: " fetched as constant in iread
|
|||||||
1: lds " load display status (see 03-scope.pdf pg 25)
|
1: lds " load display status (see 03-scope.pdf pg 25)
|
||||||
sma ral " display trap set? (and rotate left)
|
sma ral " display trap set? (and rotate left)
|
||||||
jmp 1f " not set
|
jmp 1f " not set
|
||||||
cdf " clear display flags
|
cdf " display done executing; clear display flags
|
||||||
lac .dspb
|
lac .dspb
|
||||||
sna
|
sna
|
||||||
jmp piret
|
jmp piret " return now if .dspb == 0
|
||||||
tad dm3
|
tad dm3
|
||||||
sna
|
sna
|
||||||
jmp dsprestart
|
jmp dsprestart " start display if .dspb == 3
|
||||||
dac .dspb
|
dac .dspb " otherwise, .dspb -= 3 and return
|
||||||
jmp piret
|
jmp piret
|
||||||
dsprestart:
|
dsprestart:
|
||||||
lac d1
|
lac d1
|
||||||
dac .dspb " set .dsbp = 1
|
dac .dspb " set .dspb = 1
|
||||||
lac dspbufp " load display buf pointer
|
lac dspbufp " load display buf pointer
|
||||||
beg " start display processor
|
beg " start display processor
|
||||||
-10
|
-10
|
||||||
|
|||||||
Reference in New Issue
Block a user