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