Author SHA1 Message Date
phil 8dcc21ed8d mkfs7: add uid function to handle -1 2019-10-28 02:39:13 -04:00
phil 07c9a5c2d7 README.md: update 2019-10-26 23:11:11 -04:00
phil 396492720b sys.rc: use rn command for rename 2019-10-26 22:31:36 -04:00
phil 970c5b6347 b_readme: B compiler now named 'b' 2019-10-26 22:29:57 -04:00
phil e1ee7f254a as7: change directive prefix from "<TAB>." to "@" 2019-10-26 12:38:18 -04:00
phil f51734d3de Makefile: add adm, proto wants it (but dataphone h/w & GCOS not avail!) 2019-10-26 01:14:55 -04:00
phil c2ba39ba0f add (d)ttt to image 2019-10-26 01:14:55 -04:00
phil 9f818a984b fsck7/mkfs7/proto/password: interpret/dislpay uids strictly as octal 2019-10-26 01:14:55 -04:00
phil bceda25306 update README.md to reflect reality in original-commands branch. 2019-10-26 01:14:55 -04:00
phil d2690695db add bwk & doug users; have ken & dmr files use uids from password file
put B files in bwk; tmg files in doug
2019-10-26 01:14:55 -04:00
phil 7af29dd922 b_readme: update to reflect op.s 2019-10-26 01:14:55 -04:00
phil 0c65c8f1d6 t7.s: add guesses at missing variable declarations (missing last page?) 2019-10-26 01:14:55 -04:00
phil e22f0e74df add tmg sources to src/cmd 2019-10-26 01:14:55 -04:00
phil 3fa173ab56 Makefile: call CFLAGS for compiling near-B code BFLAGS! 2019-10-26 01:14:55 -04:00
phil 963ea7c170 as7 tweaks: make it clear multiple define is not an error; fix = for tmg 2019-10-26 01:14:55 -04:00
phil dbd19c5478 G2TTY support is in github SimH: remove old comment that it isn't 2019-10-26 01:14:55 -04:00
phil ddf4ab1f23 renamed B compiler binary to b: new scans include a bc.s 2019-10-26 01:14:55 -04:00
phil 663faf8a00 adjust sys.rc for original link, rm commands 2019-10-26 01:14:55 -04:00
phil 9e61d74691 add "link" as alias for ln; use original op.s 2019-10-26 01:14:55 -04:00
phil 1c039339ef copy scan/op.s to cmd/src 2019-10-26 01:14:55 -04:00
phil 668de66579 Makefile and proto using original cat, cp, ln, ls, sh, stat
couldn't deal with the alt clutter
consider this a sandbox
2019-10-26 01:14:55 -04:00
115 changed files with 2451 additions and 3124 deletions
-31
View File
@@ -1,31 +0,0 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: get libdatetime-perl
run: sudo apt-get install libdatetime-perl
- name: build
run: make clean;make alt; make clean; make
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: get DateTime
run: sudo cpan -i DateTime
- name: build
run: make clean;make alt; make clean; make
-2
View File
@@ -14,5 +14,3 @@ build/alt/a.out
build/alt/image.fs build/alt/image.fs
**/.DS_Store **/.DS_Store
/a.out /a.out
/build/cas.out
/build/chrtbl.out
+3
View File
@@ -0,0 +1,3 @@
language: c
sudo: false
script: make clean;make
+2 -5
View File
@@ -9,11 +9,8 @@ buildit:
run: buildit run: buildit
cd build && $(MAKE) run cd build && $(MAKE) run
alt: altrun: buildit
cd build && $(MAKE) alt cd build && $(MAKE) alt && $(MAKE) altrun
altrun: alt
cd build && $(MAKE) altrun
clean: clean:
cd build && $(MAKE) clean cd build && $(MAKE) clean
+73 -81
View File
@@ -1,54 +1,53 @@
![CI](https://github.com/DoctorWkt/pdp7-unix/workflows/CI/badge.svg)
# pdp7-unix # pdp7-unix
## About ## About
pdp7-unix is a project to resurrect Unix on the PDP-7 from scans of the original pdp7-unix is a project to resurrect Unix on the PDP-7 from scans of
assembly code done by the original assembly code done by
[Norman Wilson](http://www.cs.toronto.edu/~norman/pers/index.html). [Norman Wilson](http://www.cs.toronto.edu/~norman/pers/index.html).
The scans of PDP-7 Unix are in the [Unix Archive](http://www.tuhs.org/) The scans of PDP-7 Unix are in the [Unix Archive](http://www.tuhs.org/)
[as the files 0*.pdf](http://www.tuhs.org/Archive/Distributions/Research/McIlroy_v0/). as the files
[0*.pdf and 1*.pdf](http://www.tuhs.org/Archive/Distributions/Research/McIlroy_v0/).
## Current Status ## Current Status
### January 2020
Unixv0 is running on a real PDP-7 at the Living Computer Museum. [Youtube](https://www.youtube.com/watch?v=pvaPaWyiuLA).
### October 2019 ### October 2019
A second notebook with missing sources has been A second notebook with missing sources has been discovered and
discovered and scanned. New files are being added to the scans scanned. The original commands are now in the disk image
directory as they are typed in! (only the B compiler, date, mv and od are modern programs).
Graphics programs (including Space Travel) are being debugged
along with a simulation of the display hardware.
### March 2016 ### March 2016
We've written an assembler, a user-mode simulator and We've written an assembler, a user-mode simulator and commented
commented several source files. We now have these utilities running: several source files. We now have these utilities running: as, cat,
as, cat, chmod, chown, chrm, cp, date, ln, ls, mv, stat. We have a working chmod, chown, chrm, cp, date, ln, ls, mv, stat. We have a working
shell with some functionality missing. We have a working filesystem and (replacement) shell. We have a working filesystem and we can now boot
we can now boot the kernel, launch init, login, get to a shell prompt and the kernel, launch init, login, get to a shell prompt and run the
run the utilities. utilities.
Things to do: bring the Things to do: bring the
system fully up on a PDP-7 system, fix any bugs and document everything. system fully up on a PDP-7 system, fix any bugs and document everything.
We have a [real PDP-7](http://physics.uoregon.edu/outreach/movies/pdplives/) We have a [real PDP-7](http://physics.uoregon.edu/outreach/movies/pdplives/)
and [SimH](http://simh.trailing-edge.com/) as target platforms. and [SimH](http://simh.trailing-edge.com/) as target platforms.
## Building pdp7-unix ## Building pdp7-unix
pdp7-unix requires [Perl5](https://www.perl.org/) to build. pdp7-unix requires [Perl5](https://www.perl.org/) to build,
plus the perl DateTime package (debian/Ubuntu libtimedate-perl).
To compile it: To compile it:
`make` `make pdp7`
## Running pdp7-unix ## Running pdp7-unix
You will need [simh](http://simh.trailing-edge.com/) 4.0 to run pdp7-unix. You can get the source code [here](https://github.com/simh/simh). On 64-bit systems, you may need to set the C compiler's optimisation level to -O1. You will need [simh](http://simh.trailing-edge.com/) 4.0 to run pdp7-unix. You can get the source code [here](https://github.com/simh/simh).
On 64-bit systems, you may need to set the C compiler's optimisation level to -O1.
### Running from source ### Running from source
@@ -64,13 +63,13 @@ A typical pdp7-unix session on simh looks like:
<pre> <pre>
pdp7 unixv0.simh pdp7 unixv0.simh
k
PDP-7 simulator V4.0-0 Current git commit id: b848cb12 PDP-7 simulator V4.0-0 Current git commit id: aff3346e
CPU idle disabled CPU idle disabled
8KW, EAE 8KW, EAE
/Users/tom/projects/pdp7-unix/build/unixv0.simh-13> att rb image.fs /Users/tom/projects/pdp7-unix/build/unixv0.simh-13> att rb image.fs
RB: buffering file in memory RB: buffering file in memory
/Users/tom/projects/pdp7-unix/build/unixv0.simh-17> att -U g2in 12345 /Users/tom/projects/pdp7-unix/build/unixv0.simh-18> att -U g2in 12345
Listening on port 12345 Listening on port 12345
PDP-7 simulator configuration PDP-7 simulator configuration
@@ -90,9 +89,10 @@ G2IN devno=43-44
login: ken login: ken
password: ken password: ken
@ ls @ ls
..
dd dd
maksys.s ..
system
sop.s
s1.s s1.s
s2.s s2.s
s3.s s3.s
@@ -101,65 +101,58 @@ s5.s
s6.s s6.s
s7.s s7.s
s8.s s8.s
sop.s maksys.s
system
sys.rc
trysys.s trysys.s
sys.rc
@ ls system @ ls system
.. dd
adm ttyin
apr
as
b
cas
cat
check
chmod
chown
chrm
cp
date
db
dd
display
ds
dskres
dsksav
dsw
dttt
ed
init
keyboard keyboard
link pptin
list ttyout
ln display
ls pptout
moo apr
mv as
nm bc
od cas
p cat
check
chmod
chown
chrm
cp
date
db
ds
dskres
dsksav
dsw
ed
init
ln
ls
lsd
lsl
nm
od
p
pd
mv
password password
pptin roff
pptout rn
rm rm
rn sh
roff stat
salv tm
sh
stat
tm
ttyin
ttyout
ttt
un
@ @
</pre> </pre>
## Source Tree ## Source Tree
The code in the original scans are (c) Micro Focus who own the rights to the Unix The code in the original scans are (c) Novell who own the rights to the Unix
source code. Everything that didn't come from the scanned files is GPLv3. source code. Everything that didn't come from the scanned files is GPLv3.
* /build is an area to build the kernel & filesystem and run them * /build is an area to build the kernel & filesystem and run them
@@ -171,11 +164,6 @@ source code. Everything that didn't come from the scanned files is GPLv3.
* /src/other holds PDP-7 source code which did not come from the scanned files * /src/other holds PDP-7 source code which did not come from the scanned files
* /tools holds the source for the tools written to assist the project * /tools holds the source for the tools written to assist the project
## License
pdp7-unix is under the [GPLv3](LICENSE)
## Mailing List ## Mailing List
We have a We have a
@@ -183,3 +171,7 @@ We have a
for those people actively involved in the restoration effort. Send e-mail for those people actively involved in the restoration effort. Send e-mail
to Warren Toomey (DoctorWkt) if you are keen to help out. to Warren Toomey (DoctorWkt) if you are keen to help out.
## Travis Status
<a href="https://travis-ci.org/DoctorWkt/pdp7-unix">
<img src="https://api.travis-ci.org/DoctorWkt/pdp7-unix.png"></a>
+36 -142
View File
@@ -8,8 +8,8 @@ ASARGS=--format=ptr
MKFS=../tools/mkfs7 MKFS=../tools/mkfs7
A7OUT=../tools/a7out A7OUT=../tools/a7out
FSCK=../tools/fsck7 FSCK=../tools/fsck7
CCARGS=-Wno-multichar -Wno-implicit BFLAGS=-Wno-multichar -Wno-implicit
PDP7?=pdp7 PDP7=pdp7
# source dirs # source dirs
SYSSRC=../src/sys SYSSRC=../src/sys
@@ -26,19 +26,12 @@ BINARIES=../binaries/
all: cmd others a.out boot.rim image.fs all: cmd others a.out boot.rim image.fs
# Make alternative everything: no dd but . and ..
alt: altcmd altothers boot.rim alt/a.out alt/image.fs
# The run rule has no dependencies so that the system can be booted easily # The run rule has no dependencies so that the system can be booted easily
# and frequently with make run. However, you have to manually make all first! # and frequently with make run. However, you have to manually make all first!
run: run:
$(PDP7) unixv0.simh $(PDP7) unixv0.simh
# Alternative run, use the alt/image.fs dist: all
altrun:
$(PDP7) alt/unixv0.simh
dist: all alt
mkdir -p $(BINARIES) mkdir -p $(BINARIES)
mkdir -p $(BINARIES)/orig mkdir -p $(BINARIES)/orig
mkdir -p $(BINARIES)/alt mkdir -p $(BINARIES)/alt
@@ -46,62 +39,31 @@ dist: all alt
cp boot.rim $(BINARIES)/orig cp boot.rim $(BINARIES)/orig
cp a.out $(BINARIES)/orig cp a.out $(BINARIES)/orig
cp unixv0.simh $(BINARIES)/orig cp unixv0.simh $(BINARIES)/orig
cp alt/image.fs $(BINARIES)/alt
cp alt/a.out $(BINARIES)/alt
cp alt/unixv0.simh $(BINARIES)/alt
# Warm boot Unix kernel: boots into init and a login prompt
SYS= $(SYSSRC)/sop.s $(SYSSRC)/s1.s $(SYSSRC)/s2.s \
$(SYSSRC)/s3.s $(SYSSRC)/s4.s $(SYSSRC)/s5.s \
$(SYSSRC)/s6.s $(SYSSRC)/s7.s $(SYSSRC)/s8.s
a.out: $(SYS)
$(AS) -f ptr -o a.out $(SYSSRC)/sop.s $(SYS)
$(AS) -n -f list -o a.lst $(SYSSRC)/sop.s $(SYS)
# Alternative kernel: no dd, but . and ..
ALTSYS= $(SYSSRC)/sop.s $(SYSSRC)/s1.s $(ALTSRC)/s2.s \
$(SYSSRC)/s3.s $(SYSSRC)/s4.s $(SYSSRC)/s5.s \
$(SYSSRC)/s6.s $(SYSSRC)/s7.s $(SYSSRC)/s8.s
alt/a.out: $(ALTSYS)
$(AS) -f ptr -o alt/a.out $(ALTSYS)
$(AS) -n -f list -o alt/a.lst $(ALTSYS)
# Phil's bootstrap code # Phil's bootstrap code
boot.rim: $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s boot.rim: $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s
$(AS) -f rim -o boot.rim $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s $(AS) -f rim -o boot.rim $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s
# Warm boot Unix kernel: boots into init and a login prompt
SYS_FILES=$(SYSSRC)/sop.s $(sort $(wildcard $(SYSSRC)/s[1-8].s))
a.out: $(SYS_FILES)
$(AS) -f ptr -o a.out $(SYS_FILES)
$(AS) -n -f list -o a.lst $(SYS_FILES)
# Cold boot Unix kernel: attempts to build a minimal filesystem. # Cold boot Unix kernel: attempts to build a minimal filesystem.
# Don't use this one! # Don't use this one!
COLDBOOT=$(SYS) $(SYSSRC)/s9.s COLD_FILES=$(SYS_FILES) $(SYSSRC)/s9.s
coldboot.rim: $(COLDBOOT) coldboot.rim: $(COLD_FILES)
$(AS) -f rim -o coldboot.rim $(COLDBOOT) $(AS) -f rim -o coldboot.rim $(COLD_FILES)
$(AS) -n -f list -o a.lst $(COLDBOOT) $(AS) -n -f list -o coldboot.lst $(COLD_FILES)
# Filesystem image # Filesystem image
image.fs: cmd others a.out chrtbl.out image.fs: cmd others
$(MKFS) -k a.out -c chrtbl.out proto $(MKFS) -k a.out proto
$(FSCK) image.fs $(FSCK) image.fs
# Alternate filesystem image: . and .. but no dd
alt/image.fs: altcmd altothers
$(MKFS) -1 -2 -3 -o alt/image.fs -k alt/a.out alt/proto
$(FSCK) -3 alt/image.fs
# character table: assemble output of cas.s
chrtbl.out: cas.out ../src/other/chrtbl.s
$(AS) -f ptr --no-label-warnings -o chrtbl.out ../src/other/chrtbl.s cas.out
# run cas.s under a7out: needs local file!
cas.out: bin/cas ../src/sys/cas.in
rm -f cas.in
ln -s ../src/sys/cas.in .
$(A7OUT) bin/cas cas.out cas.in
rm -f cas.in
clean: clean:
rm -f boot.rim image.fs a.lst n.out a.out rm -f boot.rim image.fs a.lst n.out a.out
rm -f cas cas.in cas.out chrtbl.out
rm -f alt/image.fs alt/a.out alt/a.lst
rm -rf $(BINDIR) $(TESTDIR) rm -rf $(BINDIR) $(TESTDIR)
rm -rf $(BINARIES) rm -rf $(BINARIES)
@@ -109,10 +71,8 @@ dirs:
mkdir -p $(BINDIR) mkdir -p $(BINDIR)
# The commands that came from the original scans # The commands that came from the original scans
# PLEASE KEEP IN ALPHABETICAL ORDER! cmd: dirs \
cmd: dirs \
$(BINDIR)/adm \ $(BINDIR)/adm \
$(BINDIR)/ald \
$(BINDIR)/apr \ $(BINDIR)/apr \
$(BINDIR)/as \ $(BINDIR)/as \
$(BINDIR)/cas \ $(BINDIR)/cas \
@@ -134,36 +94,32 @@ cmd: dirs \
$(BINDIR)/moo \ $(BINDIR)/moo \
$(BINDIR)/nm \ $(BINDIR)/nm \
$(BINDIR)/p \ $(BINDIR)/p \
$(BINDIR)/psych \
$(BINDIR)/rm \ $(BINDIR)/rm \
$(BINDIR)/rn \ $(BINDIR)/rn \
$(BINDIR)/roff \ $(BINDIR)/roff \
$(BINDIR)/salv \ $(BINDIR)/salv \
$(BINDIR)/sh \ $(BINDIR)/sh \
$(BINDIR)/st \
$(BINDIR)/stat \ $(BINDIR)/stat \
$(BINDIR)/tm \ $(BINDIR)/tm \
$(BINDIR)/ttt \ $(BINDIR)/ttt \
$(BINDIR)/un $(BINDIR)/un
# Alternate commands: no dd, but . and .. # -- compile errors
altcmd: dirs cmd \
$(BINDIR)/altchrm $(BINDIR)/cp $(BINDIR)/altinit $(BINDIR)/altmkdir
$(BINDIR)/adm: $(CMDSRC)/adm.s $(BINDIR)/adm: $(CMDSRC)/adm.s
$(AS) $(ASARGS) -o $(BINDIR)/adm $(CMDSRC)/adm.s $(AS) $(ASARGS) -o $(BINDIR)/adm $(CMDSRC)/adm.s
$(BINDIR)/ald: $(CMDSRC)/ald.s
$(AS) $(ASARGS) -o $(BINDIR)/ald $(CMDSRC)/ald.s
$(BINDIR)/apr: $(CMDSRC)/apr.s $(BINDIR)/apr: $(CMDSRC)/apr.s
$(AS) $(ASARGS) -o $(BINDIR)/apr $(CMDSRC)/apr.s $(AS) $(ASARGS) -o $(BINDIR)/apr $(CMDSRC)/apr.s
$(BINDIR)/as: $(CMDSRC)/as.s $(BINDIR)/as: $(CMDSRC)/as.s
$(AS) $(ASARGS) -o $(BINDIR)/as $(CMDSRC)/as.s $(AS) $(ASARGS) -o $(BINDIR)/as $(CMDSRC)/as.s
# NOT the B compiler!
$(BINDIR)/bc: $(CMDSRC)/bc.s $(BINDIR)/bc: $(CMDSRC)/bc.s
$(AS) $(ASARGS) -o $(BINDIR)/bc $(CMDSRC)/bc.s $(AS) $(ASARGS) -o $(BINDIR)/bcx $(CMDSRC)/bc.s
$(BINDIR)/cas: $(CMDSRC)/cas.s
$(AS) $(ASARGS) -o $(BINDIR)/cas $(CMDSRC)/cas.s
$(BINDIR)/cat: $(CMDSRC)/cat.s $(BINDIR)/cat: $(CMDSRC)/cat.s
$(AS) $(ASARGS) -o $(BINDIR)/cat $(CMDSRC)/cat.s $(AS) $(ASARGS) -o $(BINDIR)/cat $(CMDSRC)/cat.s
@@ -180,24 +136,22 @@ $(BINDIR)/chown: $(CMDSRC)/chown.s
$(BINDIR)/chrm: $(CMDSRC)/chrm.s $(BINDIR)/chrm: $(CMDSRC)/chrm.s
$(AS) $(ASARGS) -o $(BINDIR)/chrm $(CMDSRC)/chrm.s $(AS) $(ASARGS) -o $(BINDIR)/chrm $(CMDSRC)/chrm.s
$(BINDIR)/altchrm: $(ALTSRC)/chrm.s
$(AS) $(ASARGS) -o $(BINDIR)/altchrm $(ALTSRC)/chrm.s
$(BINDIR)/cas: $(CMDSRC)/cas.s
$(AS) $(ASARGS) -o $(BINDIR)/cas $(CMDSRC)/cas.s
$(BINDIR)/cp: $(CMDSRC)/cp.s $(BINDIR)/cp: $(CMDSRC)/cp.s
$(AS) $(ASARGS) -o $(BINDIR)/cp $(CMDSRC)/cp.s $(AS) $(ASARGS) -o $(BINDIR)/cp $(CMDSRC)/cp.s
$(BINDIR)/db: $(CMDSRC)/db.s $(BINDIR)/db: $(CMDSRC)/db.s
$(AS) $(ASARGS) -o $(BINDIR)/db $(CMDSRC)/db.s $(AS) $(ASARGS) -o $(BINDIR)/db $(CMDSRC)/db.s
# -- compile errors
$(BINDIR)/dmabs: $(CMDSRC)/dmabs.s $(BINDIR)/dmabs: $(CMDSRC)/dmabs.s
$(AS) $(ASARGS) -o $(BINDIR)/dmabs $(CMDSRC)/dmabs.s $(AS) $(ASARGS) -o $(BINDIR)/dmabs $(CMDSRC)/dmabs.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)/dsw: $(CMDSRC)/dsw.s
$(AS) $(ASARGS) -o $(BINDIR)/dsw $(CMDSRC)/dsw.s
DSKRES=$(CMDSRC)/dskres.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s DSKRES=$(CMDSRC)/dskres.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s
$(BINDIR)/dskres: $(DSKRES) $(BINDIR)/dskres: $(DSKRES)
$(AS) $(ASARGS) -o $(BINDIR)/dskres $(DSKRES) $(AS) $(ASARGS) -o $(BINDIR)/dskres $(DSKRES)
@@ -206,12 +160,8 @@ DSKSAV=$(CMDSRC)/dsksav.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s
$(BINDIR)/dsksav: $(DSKSAV) $(BINDIR)/dsksav: $(DSKSAV)
$(AS) $(ASARGS) -o $(BINDIR)/dsksav $(DSKSAV) $(AS) $(ASARGS) -o $(BINDIR)/dsksav $(DSKSAV)
$(BINDIR)/dsw: $(CMDSRC)/dsw.s $(BINDIR)/ed: $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
$(AS) $(ASARGS) -o $(BINDIR)/dsw $(CMDSRC)/dsw.s $(AS) $(ASARGS) -o $(BINDIR)/ed $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
ED=$(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
$(BINDIR)/ed: $(ED)
$(AS) $(ASARGS) -o $(BINDIR)/ed $(ED)
$(BINDIR)/init: $(CMDSRC)/init.s $(BINDIR)/init: $(CMDSRC)/init.s
$(AS) $(ASARGS) -o $(BINDIR)/init $(CMDSRC)/init.s $(AS) $(ASARGS) -o $(BINDIR)/init $(CMDSRC)/init.s
@@ -228,13 +178,13 @@ $(BINDIR)/moo: $(CMDSRC)/moo.s
$(BINDIR)/nm: $(CMDSRC)/nm.s $(BINDIR)/nm: $(CMDSRC)/nm.s
$(AS) $(ASARGS) -o $(BINDIR)/nm $(CMDSRC)/nm.s $(AS) $(ASARGS) -o $(BINDIR)/nm $(CMDSRC)/nm.s
P=$(CMDSRC)/p1.s $(CMDSRC)/p2.s $(CMDSRC)/p3.s $(CMDSRC)/p4.s $(CMDSRC)/p5.s P=$(sort $(wildcard $(CMDSRC)/p[1-5].s))
$(BINDIR)/p: $(P) $(BINDIR)/p: $(P)
$(AS) $(ASARGS) -o $(BINDIR)/p $(P) $(AS) $(ASARGS) -o $(BINDIR)/p $(P)
PSYCH=$(CMDSRC)/psych.s $(CMDSRC)/fop.s # contains halt!
$(BINDIR)/psych: $(PSYCH) $(BINDIR)/pd: $(CMDSRC)/pd.s
$(AS) $(ASARGS) -o $(BINDIR)/psych $(PSYCH) $(AS) $(ASARGS) -o $(BINDIR)/pd $(CMDSRC)/pd.s
$(BINDIR)/rm: $(CMDSRC)/rm.s $(BINDIR)/rm: $(CMDSRC)/rm.s
$(AS) $(ASARGS) -o $(BINDIR)/rm $(CMDSRC)/rm.s $(AS) $(ASARGS) -o $(BINDIR)/rm $(CMDSRC)/rm.s
@@ -242,9 +192,6 @@ $(BINDIR)/rm: $(CMDSRC)/rm.s
$(BINDIR)/rn: $(CMDSRC)/rn.s $(BINDIR)/rn: $(CMDSRC)/rn.s
$(AS) $(ASARGS) -o $(BINDIR)/rn $(CMDSRC)/rn.s $(AS) $(ASARGS) -o $(BINDIR)/rn $(CMDSRC)/rn.s
$(BINDIR)/pd: $(CMDSRC)/pd.s
$(AS) $(ASARGS) -o $(BINDIR)/pd $(CMDSRC)/pd.s
$(BINDIR)/roff: $(CMDSRC)/roff.s $(BINDIR)/roff: $(CMDSRC)/roff.s
$(AS) $(ASARGS) -o $(BINDIR)/roff $(CMDSRC)/roff.s $(AS) $(ASARGS) -o $(BINDIR)/roff $(CMDSRC)/roff.s
@@ -264,25 +211,18 @@ TTT=$(CMDSRC)/ttt1.s $(CMDSRC)/ttt2.s
$(BINDIR)/ttt: $(TTT) $(BINDIR)/ttt: $(TTT)
$(AS) $(ASARGS) -o $(BINDIR)/ttt $(TTT) $(AS) $(ASARGS) -o $(BINDIR)/ttt $(TTT)
ST=$(CMDSRC)/st1.s $(CMDSRC)/st2.s $(CMDSRC)/st3.s $(CMDSRC)/st4.s $(CMDSRC)/fop.s $(CMDSRC)/st5.s $(CMDSRC)/st6.s $(CMDSRC)/st7.s
$(BINDIR)/st: $(ST)
$(AS) $(ASARGS) -o $(BINDIR)/st $(ST)
$(BINDIR)/un: $(CMDSRC)/un.s $(BINDIR)/un: $(CMDSRC)/un.s
$(AS) $(ASARGS) -o $(BINDIR)/un $(CMDSRC)/un.s $(AS) $(ASARGS) -o $(BINDIR)/un $(CMDSRC)/un.s
################ ################
# The commands that did not come from the scans # The commands that did not come from the scans
others: dirs \ others: dirs $(BINDIR)/b $(BINDIR)/date $(BINDIR)/mv $(BINDIR)/od
$(BINDIR)/b \
$(BINDIR)/date \
$(BINDIR)/mv \
$(BINDIR)/od
# B compiler # PLB: B compiler -- renamed from bc to b
# there is a bc.s in the second set of scans!
$(BINDIR)/b: $(CMDSRC)/bl.s $(CMDSRC)/bi.s ../tools/b.c $(OTHERSRC)/b.b $(BINDIR)/b: $(CMDSRC)/bl.s $(CMDSRC)/bi.s ../tools/b.c $(OTHERSRC)/b.b
$(CC) $(CCARGS) -o b ../tools/b.c $(CC) $(BFLAGS) -o b ../tools/b.c
./b $(OTHERSRC)/b.b b.s ./b $(OTHERSRC)/b.b b.s
$(AS) $(ASARGS) -o $(BINDIR)/b $(CMDSRC)/bl.s b.s $(CMDSRC)/bi.s $(AS) $(ASARGS) -o $(BINDIR)/b $(CMDSRC)/bl.s b.s $(CMDSRC)/bi.s
rm b b.s rm b b.s
@@ -296,50 +236,6 @@ $(BINDIR)/mv: $(OTHERSRC)/wktmv.s
$(BINDIR)/od: $(OTHERSRC)/wktod.s $(BINDIR)/od: $(OTHERSRC)/wktod.s
$(AS) $(ASARGS) -o $(BINDIR)/od $(OTHERSRC)/wktod.s $(AS) $(ASARGS) -o $(BINDIR)/od $(OTHERSRC)/wktod.s
################
# replacement programs (no longer in build)
$(BINDIR)/pbsh: $(OTHERSRC)/pbsh.s
$(AS) $(ASARGS) -o $(BINDIR)/pbsh $(OTHERSRC)/pbsh.s
$(BINDIR)/wktcat: $(OTHERSRC)/wktcat.s
$(AS) $(ASARGS) -o $(BINDIR)/wktcat $(OTHERSRC)/wktcat.s
$(BINDIR)/wktcp: $(OTHERSRC)/wktcp.s
$(AS) $(ASARGS) -o $(BINDIR)/wktcp $(OTHERSRC)/wktcp.s
$(BINDIR)/wktln: $(OTHERSRC)/wktln.s
$(AS) $(ASARGS) -o $(BINDIR)/wktln $(OTHERSRC)/wktln.s
$(BINDIR)/wktls: $(OTHERSRC)/wktls.s
$(AS) $(ASARGS) -o $(BINDIR)/wktls $(OTHERSRC)/wktls.s
$(BINDIR)/lsd: $(OTHERSRC)/pblsd.s
$(AS) $(ASARGS) -o $(BINDIR)/lsd $(OTHERSRC)/pblsd.s
$(BINDIR)/lsl: $(OTHERSRC)/pblsd.s
$(AS) $(ASARGS) -o $(BINDIR)/lsl $(OTHERSRC)/pblsd.s
$(BINDIR)/wktstat: $(OTHERSRC)/wktstat.s
$(AS) $(ASARGS) -o $(BINDIR)/wktstat $(OTHERSRC)/wktstat.s
################
# Alternative init: no dd directory
$(BINDIR)/altinit: $(ALTSRC)/init.s
$(AS) $(ASARGS) -o $(BINDIR)/altinit $(ALTSRC)/init.s
$(BINDIR)/altmkdir: $(ALTSRC)/wktmkdir.s
$(AS) $(ASARGS) -o $(BINDIR)/altmkdir $(ALTSRC)/wktmkdir.s
# Alternative other commands: no dd, but . and ..
altothers: dirs cmd $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
$(BINDIR)/altls $(BINDIR)/mv $(BINDIR)/od
$(BINDIR)/altls: $(ALTSRC)/wktls.s
$(AS) $(ASARGS) -o $(BINDIR)/altls $(ALTSRC)/wktls.s
################################################################
tests: tests:
mkdir -p $(TESTDIR) mkdir -p $(TESTDIR)
$(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s $(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s
@@ -354,5 +250,3 @@ runtests: tests
$(A7OUT) $(TESTDIR)/octal_test $(A7OUT) $(TESTDIR)/octal_test
# $(A7OUT) $(TESTDIR)/testmul # $(A7OUT) $(TESTDIR)/testmul
# $(A7OUT) $(TESTDIR)/write_test # $(A7OUT) $(TESTDIR)/write_test
+4 -5
View File
@@ -9,8 +9,7 @@
# link l---- inumber # link l---- inumber
# #
# The top directory's name is ignored # The top directory's name is ignored
# inumbers are in decimal (-1 means previous file) # Numeric values are in decimal
# uids are in octal
# Contents of each directory ends with a $ on a line by itself # Contents of each directory ends with a $ on a line by itself
# Format was inspired by 6th Edition mkfs # Format was inspired by 6th Edition mkfs
# #
@@ -42,10 +41,10 @@
sh frwr- -1 bin/sh sh frwr- -1 bin/sh
stat frwr- -1 bin/stat stat frwr- -1 bin/stat
$ $
ken drwr- 12 ken drwr- 10
system l---- 3 system l---- 3
hello frwr- 12 fs/hello hello frwr- 10 fs/hello
$ $
dmr drwr- 14 dmr drwr- 12
system l---- 3 system l---- 3
$ $
+2 -1
View File
@@ -12,7 +12,8 @@ set tti unix
set rb ena set rb ena
att rb alt/image.fs att rb alt/image.fs
# enable TELNET in GRAPHICS-2 keyboard/display(!!) # uncomment to TELNET in GRAPHICS-2 keyboard/display(!!)
# (requires github.com/philbudne/simh)
set g2in ena set g2in ena
att -U g2in 12345 att -U g2in 12345
+4 -3
View File
@@ -1,10 +1,11 @@
Here is how to compile and run hello.b: Here is how to compile and run hello.b:
@ bc hello.b hello.s @ b hello.b hello.s
@ as ops.s bl.s hello.s bi.s @ ln dmr op.s
@ as op.s bl.s hello.s bi.s
I I
II II
ops.s op.s
bl.s bl.s
hello.s hello.s
bi.s bi.s
View File
+4 -3
View File
@@ -1,4 +1,5 @@
system:system:system:777777 system:system:system:777777
ken:ken:ken:12 ken:ken:ken:10
dmr:dmr:dmr:14 dmr:dmr:dmr:11
doug:doug:doug:15 bwk:bwk:bwk:12
doug:doug:doug:14
+1 -1
View File
@@ -1,5 +1,5 @@
rm op.s rm op.s
ln dmr op.s link dmr op.s
as sop.s op.s maksys.s as sop.s op.s maksys.s
rn a.out maksys rn a.out maksys
as sop.s op.s trysys.s as sop.s op.s trysys.s
+3 -12
View File
@@ -1,18 +1,14 @@
# detect OS # detect OS
UNAME=$(shell uname) UNAME=$(shell uname)
ifeq ($(UNAME), "Linux") ifeq ($(UNAME), Linux)
UNAME=LINUX UNAME=LINUX
else else
ifeq ($(UNAME), "Darwin") ifeq ($(UNAME), Darwin)
UNAME=DARWIN UNAME=DARWIN
else else
ifeq ($(UNAME), "FreeBSD") ifeq ($(UNAME), FreeBSD)
UNAME=FREEBSD UNAME=FREEBSD
else
ifeq ($(UNAME), "OpenBSD")
UNAME=OPENBSD
endif
endif endif
endif endif
endif endif
@@ -27,10 +23,6 @@ ifeq ($(UNAME), FREEBSD)
# FreeBSD # FreeBSD
CC=cc CC=cc
MAKE=gmake MAKE=gmake
ifeq ($(UNAME), OPENBSD)
# OpenBSD
CC=cc
MAKE=gmake
else else
ifeq ($(UNAME), DARWIN) ifeq ($(UNAME), DARWIN)
# Mac OS X # Mac OS X
@@ -41,4 +33,3 @@ else
endif endif
endif endif
endif endif
endif
+35 -37
View File
@@ -7,8 +7,7 @@
# link l---- inumber # link l---- inumber
# #
# The top directory's name is ignored # The top directory's name is ignored
# inumbers are in decimal (-1 means previous file) # Numeric values are in decimal
# uids are in octal
# Contents of each directory ends with a $ on a line by itself # Contents of each directory ends with a $ on a line by itself
# Format was inspired by 6th Edition mkfs # Format was inspired by 6th Edition mkfs
# #
@@ -21,9 +20,9 @@ dd drwr- -1 4
ttyout irwr- -1 11 ttyout irwr- -1 11
display irwr- -1 12 display irwr- -1 12
pptout irwr- -1 13 pptout irwr- -1 13
adm frwr- -1 bin/adm
password frw-- -1 fs/password password frw-- -1 fs/password
adm frwr- -1 bin/adm adm frwr- -1 bin/adm
ald frwr- -1 bin/ald
apr frwr- -1 bin/apr apr frwr- -1 bin/apr
as frwr- -1 bin/as as frwr- -1 bin/as
b frwr- -1 bin/b b frwr- -1 bin/b
@@ -51,7 +50,6 @@ dd drwr- -1 4
nm frwr- -1 bin/nm nm frwr- -1 bin/nm
od frwr- -1 bin/od od frwr- -1 bin/od
p frwr- -1 bin/p p frwr- -1 bin/p
psych frwr- -1 bin/psych
rm frwr- -1 bin/rm rm frwr- -1 bin/rm
rn frwr- -1 bin/rn rn frwr- -1 bin/rn
roff frwr- -1 bin/roff roff frwr- -1 bin/roff
@@ -61,44 +59,44 @@ dd drwr- -1 4
tm frwr- -1 bin/tm tm frwr- -1 bin/tm
ttt frwr- -1 bin/ttt ttt frwr- -1 bin/ttt
dttt l---- -1 dttt l---- -1
st frwr- -1 bin/st
un frwr- -1 bin/un un frwr- -1 bin/un
$ $
ken drwr- 12 ken drwr- 10
system l---- 3 system l---- 3
sop.s frwr- 12 ../src/sys/sop.s sop.s frwr- 10 ../src/sys/sop.s
s1.s frwr- 12 ../src/sys/s1.s s1.s frwr- 10 ../src/sys/s1.s
s2.s frwr- 12 ../src/sys/s2.s s2.s frwr- 10 ../src/sys/s2.s
s3.s frwr- 12 ../src/sys/s3.s s3.s frwr- 10 ../src/sys/s3.s
s4.s frwr- 12 ../src/sys/s4.s s4.s frwr- 10 ../src/sys/s4.s
s5.s frwr- 12 ../src/sys/s5.s s5.s frwr- 10 ../src/sys/s5.s
s6.s frwr- 12 ../src/sys/s6.s s6.s frwr- 10 ../src/sys/s6.s
s7.s frwr- 12 ../src/sys/s7.s s7.s frwr- 10 ../src/sys/s7.s
s8.s frwr- 12 ../src/sys/s8.s s8.s frwr- 10 ../src/sys/s8.s
maksys.s frwr- 12 ../src/sys/maksys.s maksys.s frwr- 10 ../src/sys/maksys.s
trysys.s frwr- 12 ../src/sys/trysys.s trysys.s frwr- 10 ../src/sys/trysys.s
sys.rc frwr- 12 fs/sys.rc sys.rc frwr- 10 fs/sys.rc
moostat frwr- 12 fs/moostat
$ $
dmr drwr- 14 dmr drwr- 11
system l---- 3 system l---- 3
as.s frwr- 14 ../src/cmd/as.s as.s frwr- 11 ../src/cmd/as.s
op.s frwr- 14 ../src/cmd/op.s op.s frwr- 11 ../src/cmd/op.s
b_readme frwr- 14 fs/b_readme
bi.s frwr- 14 ../src/cmd/bi.s
bl.s frwr- 14 ../src/cmd/bl.s
db.s frwr- 14 ../src/cmd/db.s
hello.b frwr- 14 ../src/other/hello.b
b.b frwr- 14 ../src/other/b.b
$ $
doug drwr- 15 bwk drwr- 12
system l---- 3 system l---- 3
t1.s frwr- 15 ../src/cmd/t1.s b_readme frwr- 12 fs/b_readme
t2.s frwr- 15 ../src/cmd/t2.s bi.s frwr- 12 ../src/cmd/bi.s
t3.s frwr- 15 ../src/cmd/t3.s bl.s frwr- 12 ../src/cmd/bl.s
t4.s frwr- 15 ../src/cmd/t4.s db.s frwr- 12 ../src/cmd/db.s
t5.s frwr- 15 ../src/cmd/t5.s hello.b frwr- 12 ../src/other/hello.b
t6.s frwr- 15 ../src/cmd/t6.s $
t7.s frwr- 15 ../src/cmd/t7.s doug drwr- 14
t8.s frwr- 15 ../src/cmd/t8.s system l---- 3
t1.s frwr- 14 ../src/cmd/t1.s
t2.s frwr- 14 ../src/cmd/t2.s
t3.s frwr- 14 ../src/cmd/t3.s
t4.s frwr- 14 ../src/cmd/t4.s
t5.s frwr- 14 ../src/cmd/t5.s
t6.s frwr- 14 ../src/cmd/t6.s
t7.s frwr- 14 ../src/cmd/t7.s
t8.s frwr- 14 ../src/cmd/t8.s
$ $
+8 -7
View File
@@ -3,27 +3,28 @@ set cpu eae
set cpu history=100 set cpu history=100
show cpu show cpu
; set up SIMH devices: # set up SIMH devices:
; UNIX character translations (CR to NL, ESC to ALTMODE): # UNIX character translations (CR to NL, ESC to ALTMODE):
set tti unix set tti unix
; RB09 fixed head disk: # RB09 fixed head disk:
set rb ena set rb ena
att rb image.fs att rb image.fs
; enable TELNET in GRAPHICS-2 keyboard/display(!!) # uncomment to TELNET in GRAPHICS-2 keyboard/display(!!)
set g2in ena set g2in ena
att -U g2in 12345 att -U g2in 12345
; disable hardware UNIX-7 doesn't know about: # disable hardware UNIX-7 doesn't know about:
set lpt disa set lpt disa
set drm disa set drm disa
set dt disa set dt disa
; show device settings: # show device settings:
show dev show dev
; load and run the paper tape bootstrap (loads system from disk) # load and run the paper tape bootstrap
# (loads system from disk)
load boot.rim 010000 load boot.rim 010000
go go
+1 -1
View File
@@ -13,7 +13,7 @@ DESCRIPTION Files are taken in pairs; the first is opened
.sp .sp
FILES -- FILES --
.sp .sp
SEE ALSO cat, pr, rn SEE ALSO cat, pr
.sp .sp
DIAGNOSTICS Error returns are checked at every system call, DIAGNOSTICS Error returns are checked at every system call,
and appropriate diagnostics are produced. and appropriate diagnostics are produced.
+119
View File
@@ -0,0 +1,119 @@
.oh '11/3/70''FILE SYSTEM(V)'
.ta 18 21 24
NAME format of file system
.sp
SYNOPSIS --
.sp
DESCRIPTION The RB09 fixed head disk has 8,000 64-word
blocks on each of its two surfaces. Unix uses
the second surface (physical blocks 8,000 to
15,999) and numbers them from logical block 0 to
logical block 7,999. The following discussion
refers to logical blocks.
.sp
The Unix filesystem is divided into 8,000 blocks
of 64 words per block. Block 0 is the "sysdata"
block. The first word points to the first block
of the free-storage map. Each block in the
free-storage map is structured as follows: the
first word is the block number of the next block
in the free-storage map, or zero if this is the
end of the free-storage map. The next nine words
hold free block numbers, or zero (no block
number).
.sp
Block 1 on the filesystem is unused. (?)
.sp
I-numbers begin at 1, and the storage for
i-nodes begins at block 2. Blocks 2 to 711
contain the i-nodes, with five consecutive
i-nodes per block. Certain i-nodes are reserved
for special files, directories and devices:
.sp
1 The core file written by "sys save" or a
bad system call
2 The "dd" directory directory
3 The "system" directory
6 The "ttyin" special file
7 The "keyboard" (graphic-2) special file
8 The "pptin" (paper tape reader) special
file
10 The "ttyout" special file
11 The "display" (graphic-2) special file
12 The "pptout" (paper tape punch) special
file
.sp
There is only one file system which is always
mounted; it resides on the RB disk. This device
is also used for swapping. The swap areas are at
the high blocks on this device: blocks 6,400 to
7,999. These blocks do not appear in the free
list.
.sp
Each i-node represents one file. The format of
an i-node is as follows, where the left column
represents the offset in words from the
beginning of the i-node:
.sp
0 flags (see below)
1 first indirect block or contents block
...
7 seventh indirect block or contents block
8 user ID of owner
9 link count
10 size in words
11 unique value assigned at creation
.sp
The flags are as follows:
.sp
400000 i-node is allocated
200000 large file
?????? allocated bit (always on)
000040 special file
000020 directory
000010 read, owner
000004 write, owner
000002 read, non-owner
000001 write, non-owner
.sp
The allocated bit (flag ??????) is believed even
if the i-node map says the i-node is free; thus
corruption of the map may cause i-nodes to
become unallocatable, but will not cause active
nodes to be reused.
.sp
Word number n of a file is accessed as follows:
n is divided by 64 to find its logical block
number (say b) in the file. If the file is small
(flag 200000 is 0), then b must be less than 7,
and the physical block number corresponding to b
is the bth entry in the address portion of the
i-node.
.sp
If the file is large, b is divided by 64 to
yield a number which must be less than 8 (or
the file is too large for UNIX to handle).
The corresponding slot in the i-node address
portion gives the physical block number of an
indirect block. The residue mod 64 gives a
word offset in the indirect block, and the
word found there is the physical address of
the block corresponding to b.
.sp
If block b in a file exists, it is not necessary
that all blocks less than b exist. A zero block
number either in the address words of the i-node
or in an indirect block indicates that the
corresponding block has never been allocated.
Such a missing block reads as if it contained
all zero words.
.sp
FILES --
.sp
SEE ALSO format of directories
.sp
DIAGNOSTICS --
.sp
BUGS --
.sp
OWNER ken
-138
View File
@@ -1,138 +0,0 @@
.oh '11/3/70''FILE SYSTEM(V)'
.ta 18 21 24
NAME format of file system
.sp
SYNOPSIS --
.sp
DESCRIPTION
.in 8
The RB09 fixed head disk has 8,000 64-word
blocks (100 tracks of 80 blocks)
on each of its two surfaces. The Unix filesystem
is stored in the first 80 tracks of
the second surface (physical blocks 8,000 to
14,399 -- physical tracks 100 to 179)
and numbers them from logical block 0 to
logical block 6,399.
.sp
The Unix filesystem is divided into 6,400 logical blocks
of 64 words per block. Block 0 is the "sysdata"
block. The first word points to the first block
of the free-storage map. Each block in the
free-storage map is structured as follows: the
first word is the block number of the next block
in the free-storage map, or zero if this is the
end of the free-storage map. The next nine words
hold free block numbers, or zero (no block
number).
.sp
Block 1 on the filesystem is unused. (?)
.sp
I-numbers begin at 1, and the storage for
i-nodes begins at block 2. Blocks 2 to 711
contain the i-nodes, with five 12-word
i-nodes per block. Certain i-nodes are reserved
for special files, directories and devices:
.sp
.nf
1 The core file written by "sys save"
or a bad system call
2 The "dd" directory directory
3 The "system" directory
6 The "ttyin" special file
7 The "keyboard" (GRAPHIC-2)
special file
8 The "pptin" (paper tape reader)
special file
10 The "ttyout" special file
11 The "display" (GRAPHIC-2)
special file
12 The "pptout" (paper tape punch)
special file
.fi
.sp
There is only one file system which is always
mounted; it resides on the RB disk.
.sp
The last twenty tracks of the second disk surface
are use for bootable images and swapping:
.sp
Each physical track from 180 to 189
contains a bootable system image of 3K words.
.sp
Each physical track from 190 to 199 is used to swap
a user process (4K words plus a 64-word swapable
"userdata" area).
.sp
Each i-node represents one file. The format of
an i-node is as follows, where the left column
represents the offset in words from the
beginning of the i-node:
.sp
.nf
0 flags (see below)
1 first indirect block or data block
...
7 seventh indirect block or data block
8 user ID of owner
9 link count
10 size in words
11 unique value assigned at creation
.sp
.in 8
The flags are as follows:
.sp
400000 i-node is allocated
200000 large file
?????? allocated bit (always on)
000040 special file
000020 directory
000010 read, owner
000004 write, owner
000002 read, non-owner
000001 write, non-owner
.fi
.in 8
.sp
The allocated bit (flag ??????) is believed even
if the i-node map says the i-node is free; thus
corruption of the map may cause i-nodes to
become unallocatable, but will not cause active
nodes to be reused.
.sp
Word number n of a file is accessed as follows:
n is divided by 64 to find its logical block
number (say b) in the file. If the file is small
(flag 200000 is 0), then b must be less than 7,
and the physical block number corresponding to b
is the bth entry in the address portion of the
i-node.
.sp
If the file is large, b is divided by 64 to
yield a number which must be less than 8 (or
the file is too large for UNIX to handle).
The corresponding slot in the i-node address
portion gives the physical block number of an
indirect block. The residue mod 64 gives a
word offset in the indirect block, and the
word found there is the physical address of
the block corresponding to b.
.sp
If block b in a file exists, it is not necessary
that all blocks less than b exist. A zero block
number either in the address words of the i-node
or in an indirect block indicates that the
corresponding block has never been allocated.
Such a missing block reads as if it contained
all zero words.
.in 0
.sp
FILES --
.sp
SEE ALSO dir(V)
.sp
DIAGNOSTICS --
.sp
BUGS --
.sp
OWNER ken
-36
View File
@@ -1,36 +0,0 @@
.oh '11/3/70''LINK(I)'
.ta 18 30
NAME link -- link to a file
.sp
.in 0
SYNOPSIS
.in 8
.ul
link
file
.sp
.ul
link
srcdir file
.sp
.ul
link
srcdir file name
.sp
.in 0
DESCRIPTION
.in 8
With one argument makes a link to file in system directory.
.sp
With two arguments, makes a link to file in srcdir.
.sp
With three arguments, make name a link to file in srcdir.
.sp
.in 0
FILES --
.sp
SEE ALSO ln
.sp
BUGS --
.sp
OWNER ken, dmr
+5 -5
View File
@@ -1,21 +1,21 @@
.oh '11/3/70''LN(I)' .oh '11/3/70''LN(I)'
.ta 18 30 .ta 18 30
NAME ln -- link files NAME ln -- link to a file
.sp .sp
SYNOPSIS SYNOPSIS
.ul .ul
ln ln
srcdir file... name1 name2
.sp .sp
DESCRIPTION make links in current dir to named files in srcdir DESCRIPTION ln adds another filename to the first filename
.sp .sp
FILES -- FILES --
.sp .sp
SEE ALSO link SEE ALSO --
.sp .sp
DIAGNOSTICS "twofiles" - please provide two filenames DIAGNOSTICS "twofiles" - please provide two filenames
"? file" - unable to make the link "? file" - unable to make the link
.sp .sp
BUGS -- BUGS --
.sp .sp
OWNER ken, dmr OWNER wkt
+15 -10
View File
@@ -2,19 +2,21 @@
.ta 18 21 24 .ta 18 21 24
NAME ls -- list contents of directory NAME ls -- list contents of directory
.sp .sp
SYNOPSIS ls [directory] SYNOPSIS ls [ -l ] directory
.sp .sp
DESCRIPTION DESCRIPTION
.ul .ul
ls ls
lists the contents of the current, lists the contents of the named directory
or named directory. under control of one option:
.sp .sp
.ul l list in long format, giving i-number,
list mode, owner, size in words, and name of
lists details in the format of each file. (see
.ul .ul
stat stat
for format of the
mode). Numeric values are in octal.
.sp .sp
FILES -- FILES --
.sp .sp
@@ -27,13 +29,16 @@ BUGS In a simulated environment, a filename larger
than eight characters will cause than eight characters will cause
.ul .ul
ls ls
to exit prematurely. to exit
prematurely.
.sp .sp
.ul .ul
ls ls
will try to open up a directory named ".." if will try to open up a directory named "." if
no directory is named. no directory is named. If the user desires this
functionality, they need to link "." to the
directory in question.
.sp .sp
OWNER ken, dmr OWNER wkt
-23
View File
@@ -1,23 +0,0 @@
.oh '11/3/70''RN(I)'
.ta 18 31
NAME rn -- rename files
.sp
SYNOPSIS
.ul
rn
from to ...
.sp
DESCRIPTION Files are taken in pairs; The file from
is renamed to to, and so on...
.sp
FILES --
.sp
SEE ALSO cp
.sp
DIAGNOSTICS
"? file" - either unable to remove or create
a file
.sp
BUGS The diagnostic is ambiguous.
.sp
OWNER ken, dmr
+35 -27
View File
@@ -10,44 +10,52 @@ name
DESCRIPTION DESCRIPTION
.ul .ul
stat stat
gives several kinds of information about one file. gives several kinds of information about
one file:
.sp .sp
.nf access mode
i-number number of links
flags owner
owner size in words
links name
size
.sp .sp
flag bits are: All information is self-explanatory except the
.nf mode. The mode is a five-character string whose
.in 8 characters mean the following:
40 special file
20 directory
10 read, owner
04 write, owner
02 read, non-owner
01 write, non-owner
.in 8
.sp .sp
All values are printed in octal. 1 s: file is small (smaller than 448 words)
.in 0 l: file is large
d: file is a directory
.sp
2 r: owner can read
-: owner cannot read
.sp
3 w: owner can write
-: owner cannot write
.sp
4 r: non-owner can read
-: non-owner cannot read
.sp
5 w: non-owner can write
-: non-owner cannot write
.sp
All numeric values are printed in octal.
.sp .sp
FILES -- FILES --
.sp .sp
SEE ALSO SEE ALSO
.in 8
.ul .ul
list ls
shows all files in a directory in the same format as with the -l option gives the same information
as
.ul .ul
stat. stat,
.in 0 except that it also shows the i-node
number for each file.
.sp .sp
DIAGNOSTICS "name ?" for any error. "nofiles" if no file DIAGNOSTICS "name ?" for any error. "nofiles" if no file
name is given. name is given.
.sp .sp
BUGS none BUGS none
.sp .sp
OWNER ken, dmr OWNER wkt
-10
View File
@@ -1,10 +0,0 @@
Misc documentation
==================
See also github wiki pages:
https://github.com/DoctorWkt/pdp7-unix/wiki/Links
https://github.com/DoctorWkt/pdp7-unix/wiki/roff-commands
dated:
https://github.com/DoctorWkt/pdp7-unix/wiki/Source-file-status-scoreboard
https://github.com/DoctorWkt/pdp7-unix/wiki/Unanswered-questions
+7 -104
View File
@@ -14,11 +14,10 @@ v means following moves are visible.
r means end, output label=x-b+number. r means end, output label=x-b+number.
All other commands are character pairs denoting y,x coordinates in a All other commands are character pairs denoting y,x coordinates in a
14x16 character raster. Draw a line to that coordinate. Vertical 12x14 character raster. Draw a line to that coordinate. Vertical
coordinates are a-p, and horizontal are a-n. aa is upper left and pn coordinates are a-l, and horizontal are a-m. aa is upper left and mn
is lower right. Characters reside on the base line from ma to mn is lower right. All characters end with a "x mn r" sequence to move
(characters like p and q descend below this line). All characters end to the beginning of the next character.
with a "x mn r" sequence to move to the beginning of the next character.
CAS OUTPUT CAS OUTPUT
@@ -28,29 +27,7 @@ The output for each character is:
The label x: The label x:
18-bit octal words. Each word is three 6-bit incremental moves. 18-bit octal words. Each word is three 6-bit incremental moves.
Each incremental move consists of three fields: a 2 bit distance field,
a 1 bit visibility field, a 3 bit direction field.
If the visibility field is a 0 nothing is drawn, if it is a 1 a line is
drawn. The distance field + 1 denotes how many pixels to move in a certain
direction. The 2 bit direction field is limited to values in the range 0..3,
but by adding 1, the actual distances denoted are in the range 1..4.
The 3 bit direction field with values in the range 0..7 is to be interpreted
according to this diagram and table:
y
^ value direction
7 0 1 ----- ---------
| 0 up
| 1 up right
| 2 right
6---+---2>x 3 down right
| 4 down
| 5 down left
| 6 left
5 4 3 7 up left
label=x-b+number. Number is 01, six bits saying how many moves, and label=x-b+number. Number is 01, six bits saying how many moves, and
10 zeroes. 10 zeroes.
@@ -72,30 +49,9 @@ Input:
mn mn
r r
This character is labeled "lbk" (left bracket). Move invisibly to This character is labelled "lbk" (left bracket). Move invisibly to
"ai" near upper right. Draw line left to "af". Draw down to "mf". "ai" near upper right. Draw line left to "af". Draw down to "mf".
Draw right to "mj". Invisibly move to "mn" beyond lower right. End. Draw right to "mj". Invisibly move to "mn" beoynd lower right. End.
This can be interpreted in a grid starting a location ma (row m, column a)
denoted by a 0, and each succeeding move indicated by an increasing number:
abcdefghijklmn
a.....2..1.....
b..............
c..............
d..............
e..............
f..............
g..............
h..............
i..............
j..............
k..............
l..............
m0....3...4...5
n..............
o..............
p..............
Output: Output:
@@ -113,56 +69,3 @@ means draw down four steps. 72 means draw left four steps. 62 means
move left four steps. move left four steps.
0236000 means there are 15 moves, or 6-bit bytes. 0236000 means there are 15 moves, or 6-bit bytes.
0236000 in binary is 010011110000000000, and shifting this value
10 bits to the right gives 01001111, where only the 6 least significant
bits indicate the number of moves, i.e. 001111 or 15 in decimal.
The following explanation separates out each move onto its own line.
Further it decodes each move into binary, and separates out and interprets
the three distance, visibility and direction fields. Finally each line
ends with a comment indicating which input command generated the output move:
move move move dist vis direc dist vis direc input
number octal binary binary binary binary decimal text text command
------ ----- ------ ------ ------ ------ ------- ---- ---- -------
1 001 000001 00 0 001 1 false up right ai
2 001 000001 00 0 001 1 false up right ai
3 001 000001 00 0 001 1 false up right ai
4 001 000001 00 0 001 1 false up right ai
5 001 000001 00 0 001 1 false up right ai
6 001 000001 00 0 001 1 false up right ai
7 001 000001 00 0 001 1 false up right ai
8 001 000001 00 0 001 1 false up right ai
9 060 110000 11 0 000 4 false up ai
a 056 101110 10 1 110 3 true left v af
b 074 111100 11 1 100 4 true down mf
c 074 111100 11 1 100 4 true down mf
d 074 111100 11 1 100 4 true down mf
e 072 111010 11 1 010 4 true right mj
f 062 110010 11 0 010 4 false right x mn
This can be interpreted on a grid by starting at ma (row n, column a)
denoted by a 0 and following the moves denoted by their corresponding
move number. Note that after the final move, f, the location being
outside of the character box corresponds to the location ma of the
next character to the right. To the right is the same character where
x:s denote drawn pixels and . denote undrawn pixels.
abcdefghijklmn abcdefghijklmn
a.....a..9..... a.....xxxx.....
b.............. b.....x........
c.............. c.....x........
d.............. d.....x........
e.....b..8..... e.....x........
f.......7...... f.....x........
g......6....... g.....x........
h.....5........ h.....x........
i....4c........ i.....x........
j...3.......... j.....x........
k..2........... k.....x........
l.1............ l.....x........
m0....d...e...f m.....xxxxx....
n.............. n..............
o.............. o..............
p.............. p..............
+2 -2
View File
@@ -8,8 +8,8 @@ https://www.tuhs.org/Archive/Distributions/Research/McIlroy_v0/
The files should be unaltered versions of the scanned pages. The files should be unaltered versions of the scanned pages.
Micro Focus owns the rights to the Unix source code, so these files are probably Novell owns the rights to the Unix source code, so these files are probably
(c) 1970 Micro Focus. They are certainly not under the GPLv3 license. (c) 1970 Novell. They are certainly not under the GPLv3 license.
For modified versions of these files, look in src/cmds and src/sys. For modified versions of these files, look in src/cmds and src/sys.
+1 -1
View File
@@ -593,7 +593,7 @@ transcd: 0
jms transch jms transch
isz c2 isz c2
jmp 1b jmp 1b
jmp transcd i jmp transch i
transch: 0 transch: 0
lmq lmq
+1 -6
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 7
" bc " bc
jmp start jmp start
@@ -61,7 +60,6 @@ trace: 0
jmp trace i jmp trace i
dtrace: 0 dtrace: 0
"** 06-5-12.pdf page 8
lac pc lac pc
dac 8 dac 8
lac 8 i lac 8 i
@@ -123,7 +121,6 @@ dspblk: 0
dac t1 dac t1
dzm t2 dzm t2
1: 1:
"** 06-5-12.pdf page 9
lac t1 lac t1
sna sna
jmp 1f jmp 1f
@@ -185,7 +182,6 @@ histog: 0
tad histbuf tad histbuf
dac t1 dac t1
isz t1 i isz t1 i
"** 06-5-12.pdf page 10
jmp histog i jmp histog i
jmp . jmp .
@@ -213,7 +209,7 @@ olddp: 0
dspbuf: 0 dspbuf: 0
dspbp: 0 dspbp: 0
instr: 0 instr: 0
pbs: 0 obs: 0
inslitr: n 5 inslitr: n 5
insasg: b 1 insasg: b 1
o17: 017 o17: 017
@@ -247,7 +243,6 @@ badsp:
badasgn: badasgn:
jms flush jms flush
lac d1 lac d1
"** 06-5-12.pdf page 11
sys write; mas; mass sys write; mas; mass
jmp stop jmp stop
mpc: mpc:
+2 -9
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 12
" bi " bi
start: start:
@@ -61,7 +60,6 @@ binop:
tad .+3 tad .+3
dac .+1 dac .+1
jmp .. i jmp .. i
"** 06-5-12.pdf page 13
jmp . i jmp . i
basg; bor; band; beq; bne; ble; blt; bge; bgt; brsh; blsh basg; bor; band; beq; bne; ble; blt; bge; bgt; brsh; blsh
badd; bmin; bmod; bmul; bdiv badd; bmin; bmod; bmul; bdiv
@@ -123,7 +121,6 @@ blt:
bge: bge:
lac t1 i lac t1 i
cma cma
"** 06-5-12.pdf page 14
tad t2 i tad t2 i
spa cla spa cla
lac d1 lac d1
@@ -185,7 +182,6 @@ bdiv:
consop: consop:
lac sp lac sp
"** 06-5-12.pdf page 15
tad d1 tad d1
dac sp i dac sp i
isz sp isz sp
@@ -247,7 +243,6 @@ call:
lac 8 i lac 8 i
dac t1 dac t1
lac t1 i lac t1 i
"** 06-5-12.pdf page 16
dac 9 i dac 9 i
isz 8 isz 8
-1 -1
@@ -308,7 +303,6 @@ goto:
tad t1 i tad t1 i
dac pc dac pc
jmp fetch jmp fetch
"** 06-5-12.pdf page 17
retrn: retrn:
-2 -2
@@ -371,7 +365,6 @@ unaop:
uadr; umin; uind; unot uadr; umin; uind; unot
uadr: uadr:
"** 06-5-12.pdf page 18
lac t1 lac t1
dac t3 i dac t3 i
jmp fetch jmp fetch
@@ -433,8 +426,8 @@ t4: 0
addr: 0 addr: 0
pc = 017 pc = 017
"** 06-5-12.pdf page 19
sp: stack sp: stack
dp: stack dp: stack
ap: stack ap: stack
stack: 0 stack: 0
+1 -5
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 3
" bl " bl
jmp start jmp start
@@ -61,7 +60,6 @@ getc: 0
lac cibufp lac cibufp
sad eibufp sad eibufp
jmp 1f jmp 1f
"** 06-5-12.pdf page 4
lac cibufp i lac cibufp i
and o777 and o777
dac iflg dac iflg
@@ -123,7 +121,6 @@ stop:
flush: 0 flush: 0
lac oflg lac oflg
sza sza
"** 06-5-12.pdf page 5
isz cobufp isz cobufp
lac cobufp lac cobufp
cma cma
@@ -185,7 +182,6 @@ initio: 0
.fin: 0 .fin: 0
.fout: 1 .fout: 1
eibufp: 0 eibufp: 0
"** 06-5-12.pdf page 6
cibufp: 0 cibufp: 0
iflg: 0 iflg: 0
eobufp: 0 eobufp: 0
@@ -195,4 +191,4 @@ lastv: 017770
o777: 0777 o777: 0777
d4:o4: 4 d4:o4: 4
d8: 8 d8: 8
-3
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 21
" cat " cat
lac 017777 i lac 017777 i
@@ -61,7 +60,6 @@ done:
and d1 and d1
sna cla sna cla
jmp 1f jmp 1f
"** 06-5-12.pdf page 22
jms putc jms putc
jmp done jmp done
1: 1:
@@ -123,7 +121,6 @@ putc: 0
sad d128 sad d128
skp skp
jmp putc i jmp putc i
"** 06-5-12.pdf page 23
lac fo lac fo
sys write; iopt+1; 64 sys write; iopt+1; 64
lac iopt lac iopt
+2 -8
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 25
" check " check
lac d1 lac d1
@@ -61,7 +60,6 @@ iloop:
lac iflags lac iflags
and o40 and o40
sza sza
"** 06-5-12.pdf page 26
jmp iloop jmp iloop
law idskps law idskps
dac t1 dac t1
@@ -123,7 +121,6 @@ dupcheck: 0
lac d1 lac d1
2: alss 0 2: alss 0
dac bit dac bit
"** 06-5-12.pdf page 27
lac i t6 lac i t6
and bit and bit
sza sza
@@ -173,7 +170,7 @@ print: 0
part2: part2:
lac icnt lac icnt
jms print jmp print
lac d1 lac d1
sys write; m3; m3s sys write; m3; m3s
lac licnt lac licnt
@@ -185,7 +182,6 @@ part2:
lac d1 lac d1
sys write; m5; m5s sys write; m5; m5s
lac blcnt lac blcnt
"** 06-5-12.pdf page 28
jms print jms print
lac d1 lac d1
sys write; m6; m6s sys write; m6; m6s
@@ -247,7 +243,6 @@ part3:
cla cla
llss 4 llss 4
tad alsscom tad alsscom
"** 06-5-12.pdf page 29
dac 2f dac 2f
lac d1 lac d1
2: alss 0 2: alss 0
@@ -309,7 +304,6 @@ t1: 0
t2: 0 t2: 0
t3: 0 t3: 0
t4: 0 t4: 0
"** 06-5-12.pdf page 30
t5: 0 t5: 0
t6: 0 t6: 0
@@ -327,4 +321,4 @@ linode: .=.+12
iflags = linode iflags = linode
idskps = iflags+1 idskps = iflags+1
usetab: .=.+500 usetab: .=.+500
prbuf: .=.+6 prbuf: .=.+6
-20
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 2
" db " db
narg = ..+07777 narg = ..+07777
@@ -61,7 +60,6 @@ wcorep: corename; 1
" "
lac o52012 lac o52012
jms wchar jms wchar
"** 07-13-19.pdf page 3
law dotdot law dotdot
dac nsearch dac nsearch
jms nlsearch jms nlsearch
@@ -123,7 +121,6 @@ cmd:
jmp saddress jmp saddress
sad o75 sad o75
jmp address jmp address
"** 07-13-19.pdf page 4
sad o57 sad o57
jmp octal jmp octal
sad o72 sad o72
@@ -185,7 +182,6 @@ saddress:
lac 9f lac 9f
dac curdot dac curdot
jmp mloop jmp mloop
"** 07-13-19.pdf page 5
9:0 9:0
" "
symbol: symbol:
@@ -247,7 +243,6 @@ print:
spa spa
jmp error jmp error
lac rcore lac rcore
"** 07-13-19.pdf page 6
sys read; inbuf; 64 sys read; inbuf; 64
spa spa
jmp error jmp error
@@ -309,7 +304,6 @@ prdec: "temp
proct:0 proct:0
jms octw jms octw
6 6
"** 07-13-19.pdf page 7
jmp i proct jmp i proct
" "
patch: patch:
@@ -371,7 +365,6 @@ getexp:0
xloop: xloop:
jms rch jms rch
lmq lmq
"** 07-13-19.pdf page 8
sad o44 sad o44
skp skp
jmp 1f jmp 1f
@@ -433,7 +426,6 @@ xloop:
lac o40 lac o40
sad rator sad rator
skp skp
"** 07-13-19.pdf page 9
jmp error jmp error
lacq lacq
dac rator dac rator
@@ -495,7 +487,6 @@ spcai:
lac d1 lac d1
dac reloc dac reloc
jmp i getspec jmp i getspec
"** 07-13-19.pdf page 10
" "
getsym:0 getsym:0
lmq lmq
@@ -557,7 +548,6 @@ skipt:
spa spa
jmp 2f jmp 2f
1: 1:
"** 07-13-19.pdf page 11
lac nchar1 lac nchar1
tad om101 tad om101
spa spa
@@ -619,7 +609,6 @@ num1:
jmp i getnum jmp i getnum
tad om10 tad om10
sma sma
"** 07-13-19.pdf page 12
jmp i getnum jmp i getnum
lac nchar1 lac nchar1
dzm nchar1 dzm nchar1
@@ -681,7 +670,6 @@ prsym:0
dac word dac word
dzm relflg dzm relflg
dzm relocflg dzm relocflg
"** 07-13-19.pdf page 13
dzm nsearch dzm nsearch
and o760000 and o760000
sad o760000 sad o760000
@@ -743,7 +731,6 @@ pr1:
tad d1 tad d1
dac addr dac addr
lac o55 lac o55
"** 07-13-19.pdf page 14
jms wchar jms wchar
jmp 2f jmp 2f
1: 1:
@@ -805,7 +792,6 @@ peae:
jmp i prsym jmp i prsym
1: 1:
law eaes law eaes
"** 07-13-19.pdf page 15
dac addr dac addr
jmp nfnd jmp nfnd
" "
@@ -867,7 +853,6 @@ pcal:
law syss law syss
jms wrname jms wrname
lac o40 lac o40
"** 07-13-19.pdf page 16
jms wchar jms wchar
lac addr lac addr
jms wrname jms wrname
@@ -929,7 +914,6 @@ nloop:
lacq lacq
tad d3 tad d3
dac np dac np
"** 07-13-19.pdf page 17
lac i np lac i np
sna sna
jmp nloop jmp nloop
@@ -991,7 +975,6 @@ testn:
skp skp
jmp nloop jmp nloop
isz minp isz minp
"** 07-13-19.pdf page 18
isz inbuf isz inbuf
isz value isz value
jmp 1b jmp 1b
@@ -1053,7 +1036,6 @@ nlerr:
" "
rch:0 rch:0
lac nchar1 lac nchar1
"** 07-13-19.pdf page 19
dzm nchar1 dzm nchar1
sza sza
jmp i rch jmp i rch
@@ -1115,7 +1097,6 @@ d12:12
d8:8 d8:8
d3:3 d3:3
o177:0177 o177:0177
"** 07-13-19.pdf page 20
o136: 0136 o136: 0136
o45: 045 o45: 045
sysflag: 0 sysflag: 0
@@ -1177,7 +1158,6 @@ nchar1:0
nchar:0 nchar:0
o177000:0177000 o177000:0177000
o56040:056040 o56040:056040
"** 07-13-19.pdf page 21
nsearch:0 nsearch:0
word:0 word:0
relflg:0 relflg:0
+2 -7
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 23
" dmabs " dmabs
lac o17 lac o17
@@ -61,7 +60,6 @@ dump2:
dump3: dump3:
-1 -1
tad bufp tad bufp
"** 07-13-19.pdf page 24
dac 8 dac 8
-64 -64
dac c1 dac c1
@@ -123,7 +121,6 @@ dump4:
done: done:
lac tracmd lac tracmd
jms put jms put
"** 07-13-19.pdf page 25
cla cla
jms put jms put
lac oldsum lac oldsum
@@ -185,7 +182,6 @@ boot:
2: 2:
jms get1-boot+org jms get1-boot+org
dac cmd-boot+org dac cmd-boot+org
"** 07-13-19.pdf page 26
jms get1-boot+org jms get1-boot+org
cma cma
dac cnt-boot+org dac cnt-boot+org
@@ -235,7 +231,7 @@ mes:
comand: 0 comand: 0
tracmd: 0 tracmd: 0
d1: 1 d1: 1
o17777: 017777 .17777: 017777
o77: 077 o77: 077
o200: 0200 o200: 0200
o300: 0300 o300: 0300
@@ -247,7 +243,6 @@ punout: <pp>;<to>;<ut>;040040
o17: 017 o17: 017
fi: 0 fi: 0
"** 07-13-19.pdf page 27
fo: 0 fo: 0
count: 0 count: 0
oldsum: 0 oldsum: 0
@@ -258,4 +253,4 @@ initcmd: dac 0
c1: 0 c1: 0
buf: buf:
iot = 0700000 iot = 0700000
+4 -12
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 30
" ds " ds
lac 017777 i lac 017777 i
@@ -61,13 +60,12 @@ loop:
lac i1 i lac i1 i
sad ddfilp i sad ddfilp i
jmp 2f jmp 2f
"** 07-13-19.pdf page 31
isz i1 isz i1
isz c1 isz c1
jmp 1b jmp 1b
lac ddfilp lac ddfilp
tad d1 tad i1
dac i1 dac i1
lac i1 i lac i1 i
dac .+3 dac .+3
@@ -111,7 +109,7 @@ loop:
dzm fflg dzm fflg
law fbuf law fbuf
dac i2 dac i2
-1 r1
tad nfiles tad nfiles
cma cma
dac c2 dac c2
@@ -122,11 +120,10 @@ loop:
sad i2 i sad i2 i
skp skp
jmp 3f jmp 3f
"** 07-13-19.pdf page 32
-1 -1
tad i1 tad i1
dac i3 dac i3
lac i3 i iac i3 i
dac c3 dac c3
law fbuf law fbuf
dac i3 dac i3
@@ -184,7 +181,6 @@ loop:
jms putname; scrname jms putname; scrname
jms putname; dd jms putname; dd
law 012 law 012
"** 07-13-19.pdf page 33
jms putc jms putc
3: 3:
@@ -246,7 +242,6 @@ longout: 0
lac statbuf+10 lac statbuf+10
jms octal; -5 jms octal; -5
jmp longout i jmp longout i
"** 07-13-19.pdf page 34
readdir: 0 readdir: 0
law 012 law 012
@@ -308,7 +303,6 @@ readdir: 0
lac i1 lac i1
dac 8 dac 8
lac 8 i lac 8 i
"** 07-13-19.pdf page 35
dac fsopt i dac fsopt i
isz fsopt isz fsopt
lac 8 i lac 8 i
@@ -370,7 +364,6 @@ octal: 0
jmp 1b jmp 1b
lac octal i lac octal i
dac c dac c
"** 07-13-19.pdf page 36
1: 1:
ecla llss 3 ecla llss 3
tad o60 tad o60
@@ -432,7 +425,6 @@ putc: 0
spa spa
jmp 1f jmp 1f
lac 2f i lac 2f i
"** 07-13-19.pdf page 37
xor 2f+1 xor 2f+1
jmp 3f jmp 3f
1: 1:
@@ -494,7 +486,6 @@ ddfilp: .=.+1
ddfiles: .=.+1 ddfiles: .=.+1
statbuf: .=.+13 statbuf: .=.+13
c: .=.+1 c: .=.+1
"** 07-13-19.pdf page 38
i1: .=.+1 i1: .=.+1
i2: .=.+1 i2: .=.+1
i3: .=.+1 i3: .=.+1
@@ -507,3 +498,4 @@ fsopt: .=.+1
fsobuf: .=.+64 fsobuf: .=.+64
dbuf: .=.+100 dbuf: .=.+100
fbuf: fbuf:
+1 -3
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 42
" dskio " dskio
dskrd0: 0 dskrd0: 0
@@ -61,7 +60,6 @@ iskio: 0
dssf dssf
jmp .-1 jmp .-1
dsrs dsrs
"** 07-13-19.pdf page 43
sma sma
jmp 1f jmp 1f
isz 3f isz 3f
@@ -77,4 +75,4 @@ o200000: 0200000
dskbufp: dskbuf dskbufp: dskbuf
side: .=.+1 side: .=.+1
dskbuf: .=.+640 dskbuf: .=.+640
+1 -2
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 41
" dskres " dskres
iof iof
@@ -24,4 +23,4 @@
track: 0 track: 0
c1: 0 c1: 0
d10: 10 d10: 10
-1
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 40
" dsksav " dsksav
iof iof
+3 -6
View File
@@ -1,7 +1,6 @@
"** 08-rest.pdf page 8 "** 08-rest.pdf page 8
"[handwritten page number top right of scan - 1] "[handwritten page number top right of scan - 1]
" ed1 " ed1
lac d1 lac d1
sys write; 1f; 3 sys write; 1f; 3
lac o17 lac o17
@@ -33,7 +32,6 @@
jmp advanc jmp advanc
1: 1:
<ed>; <it>; 012 <ed>; <it>; 012
advanc: advanc:
jms rline jms rline
lac linep lac linep
@@ -94,7 +92,6 @@ comand:
sad o75 sad o75
jmp ceq jmp ceq
jmp error jmp error
ca: ca:
jms newline jms newline
jms setfl jms setfl
@@ -152,7 +149,7 @@ cp1:
lac d1 lac d1
sys write; line; 2: 0 sys write; line; 2: 0
lac addr1 lac addr1
sad addr2 sad addr1
jmp advanc jmp advanc
tad d1 tad d1
dac addr1 dac addr1
@@ -219,7 +216,6 @@ cr:
isz c1 isz c1
jmp 2b jmp 2b
jmp 1b jmp 1b
cw: cw:
jms setfl jms setfl
lac i addr1 lac i addr1
@@ -250,7 +246,7 @@ cw:
sna sna
jmp 3f jmp 3f
isz num isz num
jms putsc; tal1 jmp putsc; tal1
isz c2 isz c2
"** 08-rest.pdf page 12 "** 08-rest.pdf page 12
"[handwritten page number top right of scan - 5] "[handwritten page number top right of scan - 5]
@@ -714,6 +710,7 @@ addline: 0
jmp 1b jmp 1b
jmp i addline jmp i addline
getdsk: 0 "[the entire getdsk procedure was surrounded getdsk: 0 "[the entire getdsk procedure was surrounded
and o776000 " by a box that was Xed out]: and o776000 " by a box that was Xed out]:
sad diskin " -- sad diskin " --
+3 -4
View File
@@ -81,7 +81,6 @@ cs:
skp skp
jmp 3b jmp 3b
jms addline jms addline
2: 2:
lac addr1 lac addr1
sad addr2 sad addr2
@@ -202,7 +201,7 @@ cadvanc:
"sad o52 "sad o52
"jmp clsure "jmp clsure
dac 1f dac 1f
jms comp jmp comp
1; jms matchar; 1: 0; 0 1; jms matchar; 1: 0; 0
jmp cadvanc jmp cadvanc
@@ -342,7 +341,7 @@ found: 0
jmp 2f jmp 2f
jmp 3f jmp 3f
1: "??? 1: "???
lac lchrno lac charno
cma cma
tad charno tad charno
spa spa
@@ -516,5 +515,5 @@ line: .=.+64
nlist: .=.+50 nlist: .=.+50
clist: .=.+50 clist: .=.+50
compbuf: .=.+100 compbuf: .=.+100
dskbuf: .=.+1024 "[line crossed out - scan markup] dskbuf: .=.+1 "[line crossed out - scan markup]
lnodes: .=.+1000 lnodes: .=.+1000
+29 -30
View File
@@ -1,5 +1,4 @@
"** 09-1-35.pdf page 1 "** 09-1-35.pdf page 1
"[handwritten in the top center of scan - fop.s ]
jms = 0100000 jms = 0100000
" "
q:0 q:0
@@ -87,49 +86,49 @@ fdv = jms q
lac hms lac hms
sna sna
sys save sys save
ral "[box drawn around instruction - scan markup] ral
dac 2f "[separate box around the three dac instructions - scan markup] dac 2f
dac 3f dac 3f
dac 4f dac 4f
-1 -1
tad hexp "[-\ - scan markup] tad hexp
cma "[ | delta aep??? - scan markup] cma
tad aexp "[ | - scan markup] tad aexp
dac aexp "[-/ / Ams \ - scan markup] dac aexp
lac ans "[hand written to the right: Rem | --- | Hls??? - scan markup] lac ans
lmq "[ \ Hms / ----- - scan markup] lmq
lac ams "[circle around ams ---------- Hms - scan markup] lac ams
sna cll "[ Hms - scan markup] sna cll
jmp 8f jmp 8f
div div
2:0 2:0
szl szl
sys save sys save
dac ce10 "[arrow pointing from ce10 to "REm" +-----+-----+ - scan markup] dac ce10
lacq "[ handwritten to the right: | A |+ B | - scan markup] lacq
dac 5f "[circle around 5f +-----+-----+ - scan markup] dac 5f
lac ce10 "[ | C |+ D | - scan markup] lac ce10
frdiv "[ +-----+-----+ - scan markup] frdiv
3:0 "[line from 3:0 to a circled "Hms" - scan markup] 3:0
szl szl
sys save sys save
lacq lacq
dac ce10 "[line from ce10 to text "Q1" - scan markup] dac ce10
lac hls lac hls
and o377777 and o377777
frdiv "[ X - scan markup] frdiv
4:0 "[handwritten to the right: ----- - scan markup] 4:0
szl "[ A+B - scan markup] szl
sys save sys save
lacq lacq
dac 2b "[circle around 2b with arrow pointing to the right dac 2b
spa cla spa cla
"** 09-1-35.pdf page 3 "** 09-1-35.pdf page 3
-1 "[vertical line to the right of instructions... - scan markup] -1
tad 2b tad 2b
cll "[underlined ...vertical line ends here - scan markup] cll
mul mul
5:0 "[line from 5:0 to "Q" - scan markup] 5:0
dzm 2b dzm 2b
spa spa
isz 2b isz 2b
@@ -140,11 +139,11 @@ fdv = jms q
isz 3b isz 3b
skp skp
isz 2b isz 2b
lac ce10 "[lac ce10 circled - scan markup] lac ce10
lmq lmq
lac 3b lac 3b
sna sna
jmp 6f "[arrow pointing down starts to the right of 6f - scan markup] jmp 6f
cma cma
tad d1 tad d1
stl stl
@@ -152,7 +151,7 @@ fdv = jms q
lmq lmq
szl szl
isz 2b isz 2b
6:lac 2b "[arrow above points to between this instruction and the next one - scan markup] 6:lac 2b
sma sma
tad d1 tad d1
tad 5b tad 5b
@@ -725,7 +724,7 @@ sqrt = jms q
xor o200000 xor o200000
xor o400000 xor o400000
dac 1f dac 1f
lac ams "[a centered dot drawn after ams - scan markup] lac ams
frdiv; 1:.. frdiv; 1:..
szl szl
clq clq
@@ -779,7 +778,7 @@ sres: 0;0;0
rsign: 0 rsign: 0
sign: 0 sign: 0
fp1: 1;0200000;0 fp1: 1;0200000; 0
o400000: 0400000 o400000: 0400000
o640500: 0640500 o640500: 0640500
+7 -12
View File
@@ -1,20 +1,19 @@
" init " init
"** 07-13-19.pdf page 47
-1 -1
sys intrp sys intrp
jms init1 jms init1
jms init2 jms init2
l: 1:
sys rmes sys rmes
sad pid1 sad pid1
jmp 1f jmp 1f
sad pid2 sad pid2
jms init2 jms init2
jmp l jmp 1
1: 1:
jms init1 jms init1
jmp l jmp 1
init1: 0 init1: 0
sys fork sys fork
@@ -53,7 +52,7 @@ login:
dac 9 dac 9
2: 2:
lac 8 i lac 8 i
sad o12 sac o12
lac o72 lac o72
sad 9 i sad 9 i
skp skp
@@ -61,7 +60,6 @@ login:
sad o72 sad o72
skp skp
jmp 2b jmp 2b
"** 07-13-19.pdf page 48
lac 9 i lac 9 i
sad o72 sad o72
jmp 1f jmp 1f
@@ -122,7 +120,6 @@ login:
cll; als 3 cll; als 3
omq omq
dac nchar dac nchar
"** 07-13-19.pdf page 49
jmp 1b jmp 1b
2: 2:
lac nchar lac nchar
@@ -184,7 +181,6 @@ rline: 0
sad 8 sad 8
jmp 1b jmp 1b
-1 -1
"** 07-13-19.pdf page 50
tad 8 tad 8
dac 8 dac 8
jmp 1b jmp 1b
@@ -229,7 +225,7 @@ gchar: 0
lac bufp lac bufp
dac tal dac tal
lac d2 lac d2
sys read; buf; 64 sys tead; buf; 64
sna sna
jmp error jmp error
jmp gchar+1 jmp gchar+1
@@ -242,11 +238,10 @@ error:
sys exit sys exit
m1: m1:
012;<lo>;<gi>;<n;<:;< 012; <lo>;<gi>;<n;<:;<
m1s = .-m1 m1s = .-m1
m2: m2:
<?; 012 <?; 012
"** 07-13-19.pdf page 51
m2s = .-m2 m2s = .-m2
m3: m3:
<pa>;<ss>;<wo>;<rd>;<: 040 <pa>;<ss>;<wo>;<rd>;<: 040
@@ -274,7 +269,7 @@ password:
d1: 1 d1: 1
o43: 043 o43: 043
o100: 0100 o100: 0100
o400000: 0400000 o400000; 0400000
d2: 2 d2: 2
o12: 012 o12: 012
om60: -060 om60: -060
+6 -5
View File
@@ -8,9 +8,9 @@
spa; jmp error; dac track spa; jmp error; dac track
tad dm10; sma; jmp error tad dm10; sma; jmp error
sys open; a.out; 0 sysopen; a.out; 0
spa; jmp error spa; jmp error
sys read; bufp: buf; 3072 sys read; bufp; buf; 3072
sad .-1 sad .-1
jmp error jmp error
@@ -18,7 +18,7 @@
-3072; dslw -3072; dslw
lac bufp; dslm lac bufp; dslm
lac track; alss 8; xor o300000; dsld lac track; alss 8; xor o300000; dsld
lac o3000; dsls lac o30000; dsls
dssf; jmp .-1 dssf; jmp .-1
dsrs; spa; jmp error dsrs; spa; jmp error
-1024; dslw -1024; dslw
@@ -35,10 +35,10 @@ error:
1: 077077;012 1: 077077;012
dm10: -10 dm10: -10
d5: 5 dm5: 5
om60: -060 om60: -060
o300000: 0300000 o300000: 0300000
o300110: 0300110 o300100: 0300110
d8: 8 d8: 8
d3072: 3072 d3072: 3072
o3000: 03000 o3000: 03000
@@ -49,3 +49,4 @@ a.out:
track: .=.+1 track: .=.+1
buf: buf:
+1 -1
View File
@@ -181,7 +181,7 @@ loop:
dac ball1+vx dac ball1+vx
2: 2:
lac toptest lac toptest
tad ball1+y tad ball1+vy
spa spa
jmp 2f jmp 2f
jms pockettb jms pockettb
+18 -18
View File
@@ -9,24 +9,24 @@
tad d1 tad d1
dac .pbp1 dac .pbp1
restart: restart:
fld; arg1 "[ g = arg1 - scan markup] fld; arg1
fst; g "[ fact = arg2 - scan markup] fst; g
fld; arg2 "[ d = 1.0 - scan markup] fld; arg2
fst; fact "[ z = 0 - scan markup] fst; fact
fld; fp01 "[ oldx = 0 - scan markup] fld; fp01
fst; d "[ oldy = 0 - scan markup] fst; d
jms capture "[loop: - scan markup] jms capture
-100 "[ b = z - 110. - scan markup] -100
dac j "[ ---------- - scan markup] dac j
fld; fp0 "[ radians - scan markup] fld; fp0
fst; z "[ z = z + g - scan markup] fst; z
fst; oldx "[ g = -g * fact - scan markup] fst; oldx
fst; oldy "[ fact = 1 / fact - scan markup] fst; oldy
lac o400000 "[ xx = 500. * d * sin(b + pi/2) - scan markup] lac o400000
dac i 11 "[ ni() - scan markup] dac i 11
dac i 11 "[ yy = 500. * d * sin(b) - scan markup] dac i 11
lac setx "[ ni() - scan markup] lac setx
dac i 10 "[ goto loop " an arrow points up to loop: above - scan markup] dac i 10
lac sety lac sety
dac i 10 dac i 10
+2 -3
View File
@@ -116,7 +116,7 @@
lac u.base lac u.base
jms iget jms iget
lac ii lac ii
dac d.i dzm d.i
jms copy; name; d.name; 4 jms copy; name; d.name; 4
lac i.uniq lac i.uniq
dac d.uniq dac d.uniq
@@ -134,7 +134,7 @@
lac d1 lac d1
dac mode dac mode
jms access jms access
dzm d.i dac d.i
jms dput jms dput
lac u.base lac u.base
jms iget jms iget
@@ -166,7 +166,6 @@
dac mode dac mode
jms access jms access
jms copy; 1:0; d.name; 4 jms copy; 1:0; d.name; 4
jms dput
jmp okexit jmp okexit
.time: .time:
+2 -5
View File
@@ -70,7 +70,7 @@ lookfor: 0
isz u.rq+8 isz u.rq+8
dzm u.intflg dzm u.intflg
jmp sysexit jmp sysexit
t = t+1 t= t+1
badcal: badcal:
clon clon
@@ -258,10 +258,6 @@ rkbdi:
sad o134 sad o134
skp skp
jmp 2f jmp 2f
lacq
xor o40
lmq
jmp 2f
1: 1:
lacq lacq
xor o20 xor o20
@@ -295,6 +291,7 @@ wdspo:
jms swap jms swap
jmp wdspo jmp wdspo
rppti: rppti:
lac d4 lac d4
jms getchar jms getchar
+1 -1
View File
@@ -317,7 +317,7 @@ cskp:
lac 9f+t+3 lac 9f+t+3
jms dskwr jms dskwr
4: 4:
"** 01-s1.pdf page 39 "** 01-s1.pdf page 38
lac 9f+t+2 lac 9f+t+2
jmp iread i jmp iread i
3: 3:
+2 -2
View File
@@ -92,9 +92,9 @@ dsprestart:
dac .dsptm dac .dsptm
jmp piret jmp piret
1: sma ral 1: sna ral
jmp .+3 jmp .+3
raef dpcf
jmp piret jmp piret
sma sma
jmp 1f jmp 1f
+4 -4
View File
@@ -95,7 +95,7 @@ dm1: -1
9: .=.+t 9: .=.+t
c1: .=.+1 c1: .=.+1
q1: q2;q2+98 q1: q2;q2+90 "** ?? 98 ??
.=.+14 .=.+14
q2: q2:
.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0 .+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0
@@ -107,7 +107,7 @@ dsploc: .=.+1
dsplno: .=.+1 dsplno: .=.+1
dspbuf: dspbuf:
0065057;0147740;0160000 0065057;0147740;0160000
. = . + 30 .=.+30
coldentry: coldentry:
dzm 0100 " not re-entrant dzm 0100 " not re-entrant
caf caf
@@ -178,7 +178,7 @@ ulist:
userdata: userdata:
u.ac: 0 u.ac: 0
u.mq: 0 u.mq: 0
u.rg: .=.+9 u.rq: .=.+9
u.uid: -1 u.uid: -1
u.pid: 1 u.pid: 1
u.cdir: 3 u.cdir: 3
@@ -200,7 +200,7 @@ inode:
i.nlks: .=.+1 i.nlks: .=.+1
i.size: .=.+1 i.size: .=.+1
i.uniq: .=.+1 i.uniq: .=.+1
. = inode+12 .= inode+12
di: .=.+1 di: .=.+1
dnode: dnode:
d.i: .=.+1 d.i: .=.+1
+7 -6
View File
@@ -25,27 +25,26 @@ sma = 0740100
sza = 0740200 sza = 0740200
snl = 0740400 snl = 0740400
skp = 0741000 skp = 0741000
spa = 0741100
sna = 0741200 sna = 0741200
szl = 0741400 szl = 0741400
rtl = 0742010 rtl = 0742010
rtr = 0742020 rtr = 0742020
cll = 0744000 cil = 0744000
rcl = 0744010 rcl = 0744010
rcr = 0744020 rcr = 0744020
cla = 0750000 cia = 0750000
lrs = 0640500 lrs = 0640500
lrss = 0660500 lrss = 0660500
lls = 0640600 lls = 0640600
llss = 0660600 llss = 0660600
als = 0640700 als = 0640700
alss = 0660700 alss = 0660700
mul = 0653122 mul = 0653323
idiv = 0653323 idiv = 0653323
lacq = 0641002 lacq = 0641002
clq = 0650000 clq = 0650000
omq = 0640002 omq = 0650002
cmq = 0640004 cmq = 0650004
lmq = 0652000 lmq = 0652000
dscs = 0707141 dscs = 0707141
@@ -61,6 +60,7 @@ ion = 0700042
caf = 0703302 caf = 0703302
clon = 0700044 clon = 0700044
clsf = 0700001 clsf = 0700001
"** 01-s1.pdf page 63 "** 01-s1.pdf page 63
clof = 0700004 clof = 0700004
ksf = 0700301 ksf = 0700301
@@ -94,3 +94,4 @@ dpcf = 0704761
dprc = 0704712 dprc = 0704712
crsf = 0706701 crsf = 0706701
crrb = 0706712 crrb = 0706712
+13 -13
View File
@@ -3,7 +3,7 @@
t = 0 t = 0
start: "[------ stuff for gravity - scan markup] start:
law 13 law 13
sys sysloc sys sysloc
dac .pbson dac .pbson
@@ -40,9 +40,9 @@ start: "[------ stuff for gravity - scan markup]
dzm .pbsint dzm .pbsint
dzm forflg dzm forflg
dzm bacflg dzm bacflg
dzm dspflg "[line connecting this instruction to... - scan markup] dzm dspflg
dzm locflg dzm locflg
dzm locpar "[... this instruction - scan markup] dzm locpar
lac d1 lac d1
dac par dac par
jms dispname jms dispname
@@ -68,13 +68,13 @@ start: "[------ stuff for gravity - scan markup]
loop: loop:
law dspl-1 law dspl-1
dac clistp dac clistp
jms contrl "[arrow from below points to this instruction - scan markup] jms contrl
lac par lac par
jms absxy jms absxy
jms shipxy jms shipxy
lac goflg lac goflg
spa spa
jmp loop3 "[long dash after loop3 - scan markup] jmp loop3
fld; fpzero fld; fpzero
fst; ax fst; ax
fst; ay fst; ay
@@ -107,8 +107,8 @@ loop2:
sma sma
jms updshp jms updshp
loop3: loop3:
fld; horizv "[a box enclosing all code from loop3 to loop4 - scan markup] fld; horizv
lac scale "[arrow drawn from box up to location above - scan markup] lac scale
cma cma
tad vscale tad vscale
tad aexp tad aexp
@@ -116,12 +116,12 @@ loop3:
jms inscr jms inscr
jmp loop4 jmp loop4
tad o141577 tad o141577
dac i clistp "[crossed out with an arrow pointint to "dac dspvel" - scan markup] dac i clistp
lac o164372 "[crossed out - scan markup] lac o164372
dac clistp i "[crossed out - scan markup] dac clistp i
cla "[crossed out - scan markup] cla
jms dsplanet "[crossed out - scan markup] jms dsplanet
loop4: "[inside a drawn box - scan markup] loop4:
sys time "put delay here..... sys time "put delay here.....
"** 12-92-119.pdf page 3 "** 12-92-119.pdf page 3
dzm dispcl dzm dispcl
+1 -1
View File
@@ -26,7 +26,7 @@ updshp: 0
sma sma
jmp .+3 jmp .+3
2: 2:
lac accflg "[arrow pointing here from the text "how to set?" - scan markup] lac accflg
sma sma
jmp .+3 jmp .+3
fad; maxa fad; maxa
+19 -19
View File
@@ -6,27 +6,27 @@ displa: 0
sad cplan sad cplan
skp skp
jmp 2f jmp 2f
lac locflg "[arrow points here from the text "how to set?" - scan markup] lac locflg
sma sma
jmp 1f jmp 1f
fld; cphi "[-\ - scan markup] fld; cphi
fmp; absy "[ | - scan markup] fmp; absy
fst; ftmp1 "[ | - scan markup] fst; ftmp1
fld; sphi "[ | - scan markup] fld; sphi
fmp; absx "[ | - scan markup] fmp; absx
fad; ftmp1 "[ | - scan markup] fad; ftmp1
fdv; dpar "[ | - scan markup] fdv; dpar
fst; stheta "[ \ lock calculation - scan markup] fst; stheta
fld; sphi "[ / - scan markup] fld; sphi
fmp; absy "[ | - scan markup] fmp; absy
fng "[ | - scan markup] fng
fst; ftmp1 "[ | - scan markup] fst; ftmp1
fld; cphi "[ | - scan markup] fld; cphi
fmp; absx "[ | - scan markup] fmp; absx
fad; ftmp1 "[ | - scan markup] fad; ftmp1
fdv; dpar "[ | - scan markup] fdv; dpar
fst; ctheta "[ | - scan markup] fst; ctheta
jmp 2f "[-/ - scan markup] jmp 2f
1: 1:
fld; sphi fld; sphi
fst; stheta fst; stheta
+2 -2
View File
@@ -152,7 +152,7 @@ dssca:
dsety 255 dsety 255
vecy 767 vecy 767
dsetx 127 dsetx 127
dsety 639 "[--- - scan markup] dsety 639
vecx 767 "[an arrow starts between vecx and dspl, it points to the right - scan markup] vecx 767
dspl: dspl:
0400000 0400000
+18 -25
View File
@@ -1,30 +1,29 @@
"** 01-s1.pdf page 57 -- system assembly map "** 01-s1.pdf page 57 -- system assembly map
. 004671 r . 004671 r
.ac 004102 r .ac 004012 r
.chown 000426 r .chown 000426 r
.close 000725 r
.capt 000404 r .capt 000404 r
.creat 000665 r .creat 000665 r
.chdir 000622 r .chdir 000622 r
.chmod 000414 r .chmod 000414 r
.dskb 004105 r .dskb 004105 r
.dspb 005547 r .dspb 005547 r
.dsptm 004104 r .dsptm 004104 r
.dske 004106 r .dske 004106 r
.exit 001170 r .exit 001170 r
.fork 001116 r .fork 001116 r
.getuid 000433 r .getuid 000433 r
.halt 001343 r .halt 001343 r
.int1 004100 r .int1 004100 r
.insys 004077 r .insys 004077 r
.int2 004101 r .int2 004101 r
.intrp 000257 r .intrp 000257 r
.link 000474 r .link 000474 r
.lpba 005550 r .lpba 005550 r
.open 000633 r .open 000633 r
.rmes 001204 r .rmes 001204 r
.rele 000410 r .rele 000410 r
.rename 000574 r .rename 000547 r
.read 000731 r .read 000731 r
.smes 001232 r .smes 001232 r
.savblk 004103 r .savblk 004103 r
@@ -46,7 +45,7 @@ badcal 001153 r
betwen 001654 r betwen 001654 r
c1 004270 r c1 004270 r
chkint 000320 r chkint 000320 r
chkint1 001546 r chkink1 001546 r
char 005522 r char 005522 r
cnop 003453 r cnop 003453 r
coldentr 004520 r coldentr 004520 r
@@ -61,7 +60,7 @@ d.name 005761 r
d.uniq 005765 r d.uniq 005765 r
d.i 005760 r d.i 005760 r
"** 01-s1.pdf page 58 "** 01-s1.pdf page 58
d0 004127 r d0 004127 r
d10 004141 r d10 004141 r
d1 004130 r d1 004130 r
d2 004131 r d2 004131 r
@@ -70,7 +69,7 @@ d3 004132 r
d4 004133 r d4 004133 r
d5 004134 r d5 004134 r
d6 004135 r d6 004135 r
d65 004152 r d65 004155 r
d7999 004166 r d7999 004166 r
d7 004136 r d7 004136 r
d8 004137 r d8 004137 r
@@ -96,7 +95,7 @@ dskrd 002127 r
dsktrans 002231 r dsktrans 002231 r
dsploc 004455 r dsploc 004455 r
dslot 002474 r dslot 002474 r
dsplno 004456 r dspino 004456 r
dspbufp3 004116 r dspbufp3 004116 r
dspbufp 005506 r dspbufp 005506 r
dspresta 003523 r dspresta 003523 r
@@ -106,11 +105,6 @@ dskwr 002157 r
dspput 002551 r dspput 002551 r
dspleft 002573 r dspleft 002573 r
dspbuf 004457 r dspbuf 004457 r
dskswap 002300 r
dspinit 002617 r
dspnl 002605 r
edskbsp 005504 r
edspbuf 004115 r
error 001542 r error 001542 r
exitrw 001041 r exitrw 001041 r
f.badd 005771 r f.badd 005771 r
@@ -122,8 +116,8 @@ fget 002371 r
finac 003401 r finac 003401 r
fnode 005770 r fnode 005770 r
"** 01-s1.pdf page 59 "** 01-s1.pdf page 59
forall 002423 r forall 002434 r
fput 002413 r fput 003413 r
free 001615 r free 001615 r
getchar 001756 r getchar 001756 r
getw 004635 r getw 004635 r
@@ -176,11 +170,11 @@ o100000 004177 r
o140000 004200 r o140000 004200 r
o14 004142 r o14 004142 r
o15 004143 r o15 004143 r
o155 004157 r 0155 004157 r
o2000 004164 r o2000 004164 r
o200001 004262 r o200001 004262 r
o20001 004172 r o20001 004172 r
o20 004145 r 020 004145 r
o212 004161 r o212 004161 r
o200000 004201 r o200000 004201 r
"** 01-s1.pdf page 60 "** 01-s1.pdf page 60
@@ -189,7 +183,6 @@ o33 004146 r
o300000 004203 r o300000 004203 r
o4000 004165 r o4000 004165 r
o40000 004173 r o40000 004173 r
o40001 004174 r
o40 004147 r o40 004147 r
o400000 004204 r o400000 004204 r
o500000 004205 r o500000 004205 r
@@ -198,7 +191,7 @@ o577777 004206 r
o600000 004207 r o600000 004207 r
o640000 004210 r o640000 004210 r
o777 004163 r o777 004163 r
o77 004151 r o77 004157 r
o70000 004175 r o70000 004175 r
o77777 004176 r o77777 004176 r
o777760 004213 r o777760 004213 r
@@ -259,8 +252,8 @@ u.limit 005664 r
u.cdir 005657 r u.cdir 005657 r
u.count 005663 r u.count 005663 r
u.base 005662 r u.base 005662 r
u.rg 005644 r u.rq 005644 r
ulist 005572 r ulsit 005562 r
uniqpid 005524 r uniqpid 005524 r
uquant 005505 r uquant 005505 r
userdata 005642 r userdata 005642 r
+1 -1
View File
@@ -258,7 +258,7 @@ pbadr: .=.+1
blink: .=.+1 blink: .=.+1
blk1: .=.+1 blk1: .=.+1
blk2: .=.+1 blk2: .=.+1
9: .=.+t 9: .=.+1
stack: stack:
dnop = 040040 dnop = 040040
+1 -1
View File
@@ -37,7 +37,7 @@ error:
mes: mes:
077; 012 077; 012
n.out: n.out:
<n.>;<ou>;<t 040;040040 <n.>;<ou>;<t 040; 040040
d1: 1 d1: 1
d6: 6 d6: 6
View File
-10
View File
@@ -1,4 +1,3 @@
"** 05-1-4.pdf page 2
" adm " adm
lac 017777 i lac 017777 i
@@ -61,7 +60,6 @@ floop1:
dac fi dac fi
-1 -1
"** 05-1-4.pdf page 3
tad name tad name
dac 8 dac 8
-4 -4
@@ -123,7 +121,6 @@ eof:
dac buf+3 " final check sum dac buf+3 " final check sum
jms putcard jms putcard
jmp floop jmp floop
"** 05-1-4.pdf page 4
getword: 0 getword: 0
lac ipt lac ipt
@@ -185,7 +182,6 @@ putcard: 0
jmp floop jmp floop
"** 05-1-4.pdf page 5
ferror: ferror:
lac name lac name
dac 1f dac 1f
@@ -247,7 +243,6 @@ disflg: 0
flush: 0 flush: 0
lac noc lac noc
sna sna
"** 05-1-4.pdf page 6
jmp flush i jmp flush i
law 0104 law 0104
jms message; tbuf jms message; tbuf
@@ -309,7 +304,6 @@ putw: 0
1: 0 1: 0
putc: 0 putc: 0
"** 05-1-4.pdf page 7
and o177 and o177
dac opt i dac opt i
-0141 -0141
@@ -370,7 +364,6 @@ connect: 0
and ilock and ilock
sna sna
jmp 1b jmp 1b
"** 05-1-4.pdf page 8
law 041 law 041
dac echoch dac echoch
law 0102 law 0102
@@ -432,7 +425,6 @@ retry:
jms transch jms transch
isz c2 isz c2
jmp 1b jmp 1b
"** 05-1-4.pdf page 9
" put out etx character " put out etx character
2: 2:
@@ -494,7 +486,6 @@ retry:
lac opch lac opch
sad o122 sad o122
jmp i message jmp i message
"** 05-1-4.pdf page 10
lac disflg lac disflg
sna sna
jmp discon jmp discon
@@ -556,7 +547,6 @@ d14: 14
o400000: 0400000 o400000: 0400000
o577777: 0577777 o577777: 0577777
o200500: 0200500 o200500: 0200500
"** 05-1-4.pdf page 11
o122: 0122 o122: 0122
o3: 3 o3: 3
o2: 2 o2: 2
+1 -11
View File
@@ -79,7 +79,7 @@ cloop:
jmp 1f jmp 1f
dac 0f dac 0f
lac fo lac fo
sys write; obuf; 0:.. sys write; obuf; 0;..
1: 1:
lac fo lac fo
sys close sys close
@@ -229,16 +229,6 @@ putword: 0
jmp putword i jmp putword i
jmp putword i jmp putword i
ferror:
lac buf
dac 1f
lac d1
sys write; 1:..; 4
lac d1
sys write; 1f; 1
jmp loop
1: 077012
d1: 1 d1: 1
d2048: 2048 d2048: 2048
d14: 14 d14: 14
+1 -1
View File
@@ -593,7 +593,7 @@ transcd: 0
jms transch jms transch
isz c2 isz c2
jmp 1b jmp 1b
jmp transcd i jmp transch i
transch: 0 transch: 0
lmq lmq
+1 -6
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 7
" bc " bc
jmp start jmp start
@@ -61,7 +60,6 @@ trace: 0
jmp trace i jmp trace i
dtrace: 0 dtrace: 0
"** 06-5-12.pdf page 8
lac pc lac pc
dac 8 dac 8
lac 8 i lac 8 i
@@ -123,7 +121,6 @@ dspblk: 0
dac t1 dac t1
dzm t2 dzm t2
1: 1:
"** 06-5-12.pdf page 9
lac t1 lac t1
sna sna
jmp 1f jmp 1f
@@ -185,7 +182,6 @@ histog: 0
tad histbuf tad histbuf
dac t1 dac t1
isz t1 i isz t1 i
"** 06-5-12.pdf page 10
jmp histog i jmp histog i
jmp . jmp .
@@ -213,7 +209,7 @@ olddp: 0
dspbuf: 0 dspbuf: 0
dspbp: 0 dspbp: 0
instr: 0 instr: 0
pbs: 0 obs: 0
inslitr: n 5 inslitr: n 5
insasg: b 1 insasg: b 1
o17: 017 o17: 017
@@ -247,7 +243,6 @@ badsp:
badasgn: badasgn:
jms flush jms flush
lac d1 lac d1
"** 06-5-12.pdf page 11
sys write; mas; mass sys write; mas; mass
jmp stop jmp stop
mpc: mpc:
-8
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 12
" bi " bi
start: start:
@@ -61,7 +60,6 @@ binop:
tad .+3 tad .+3
dac .+1 dac .+1
jmp .. i jmp .. i
"** 06-5-12.pdf page 13
jmp . i jmp . i
basg; bor; band; beq; bne; ble; blt; bge; bgt; brsh; blsh basg; bor; band; beq; bne; ble; blt; bge; bgt; brsh; blsh
badd; bmin; bmod; bmul; bdiv badd; bmin; bmod; bmul; bdiv
@@ -123,7 +121,6 @@ blt:
bge: bge:
lac t1 i lac t1 i
cma cma
"** 06-5-12.pdf page 14
tad t2 i tad t2 i
spa cla spa cla
lac d1 lac d1
@@ -185,7 +182,6 @@ bdiv:
consop: consop:
lac sp lac sp
"** 06-5-12.pdf page 15
tad d1 tad d1
dac sp i dac sp i
isz sp isz sp
@@ -247,7 +243,6 @@ call:
lac 8 i lac 8 i
dac t1 dac t1
lac t1 i lac t1 i
"** 06-5-12.pdf page 16
dac 9 i dac 9 i
isz 8 isz 8
-1 -1
@@ -308,7 +303,6 @@ goto:
tad t1 i tad t1 i
dac pc dac pc
jmp fetch jmp fetch
"** 06-5-12.pdf page 17
retrn: retrn:
-2 -2
@@ -371,7 +365,6 @@ unaop:
uadr; umin; uind; unot uadr; umin; uind; unot
uadr: uadr:
"** 06-5-12.pdf page 18
lac t1 lac t1
dac t3 i dac t3 i
jmp fetch jmp fetch
@@ -434,7 +427,6 @@ addr: 0
pc = 017 pc = 017
"** 06-5-12.pdf page 19
sp: stack sp: stack
dp: stack dp: stack
ap: stack ap: stack
-4
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 3
" bl " bl
jmp start jmp start
@@ -61,7 +60,6 @@ getc: 0
lac cibufp lac cibufp
sad eibufp sad eibufp
jmp 1f jmp 1f
"** 06-5-12.pdf page 4
lac cibufp i lac cibufp i
and o777 and o777
dac iflg dac iflg
@@ -123,7 +121,6 @@ stop:
flush: 0 flush: 0
lac oflg lac oflg
sza sza
"** 06-5-12.pdf page 5
isz cobufp isz cobufp
lac cobufp lac cobufp
cma cma
@@ -185,7 +182,6 @@ initio: 0
.fin: 0 .fin: 0
.fout: 1 .fout: 1
eibufp: 0 eibufp: 0
"** 06-5-12.pdf page 6
cibufp: 0 cibufp: 0
iflg: 0 iflg: 0
eobufp: 0 eobufp: 0
+551
View File
@@ -0,0 +1,551 @@
:ca
v
af
nl
x
hd
v
hi
x
mn
r
:cb
x
ga
v
gi
ik
kk
mi
ma
aa
ai
ck
ek
gi
x
mn
r
:cc
x
kk
v
mi
mc
ka
ca
ac
ai
dl
x
mn
r
:cd
v
aa
ai
ck
kk
mi
ma
x
mn
r
:ce
x
mk
v
ma
aa
ak
x
gh
v
ga
x
mn
r
:cf
v
aa
ak
x
gh
v
ga
x
mn
r
:cg
x
gf
v
gk
nk
x
kk
v
mi
mc
ka
ca
ac
ai
dl
x
mn
r
:ch
x
aa
v
na
x
gb
v
gk
x
ak
v
nk
x
mn
r
:ci
x
md
v
mi
x
lf
v
af
x
ad
v
ai
x
mn
r
:cj
x
ka
v
mc
mg
ki
ai
x
ag
v
al
x
mn
r
:ck
x
aa
v
na
x
ak
v
ia
x
mk
v
fe
x
mn
r
:cl
x
aa
v
ma
mk
x
mn
r
:cm
v
aa
hf
ak
nk
x
mn
r
:cn
x
ak
v
mk
aa
na
x
mn
r
:co
x
ai
v
ch
ei
ck
ai
ac
ca
ka
mc
mi
kk
ck
x
mn
r
:cp
v
aa
ai
ck
ek
gi
ga
x
mn
r
:cq
x
mc
v
ka
ca
ac
ai
ck
kk
mi
mc
x
jh
v
nl
x
mn
r
:cr
v
aa
ai
ck
ek
gi
ga
x
mk
v
gf
x
mn
r
:cs
x
ka
v
mc
mi
kk
ik
gi
gc
ea
ca
ac
ai
dl
x
mn
r
:ct
x
aa
v
al
x
mf
v
af
x
mn
r
:cu
x
aa
v
ka
mc
mi
kk
x
ak
v
lk
x
mn
r
:cv
x
aa
v
mf
x
ak
v
mf
x
mn
r
:cw
x
aa
v
mc
af
x
ak
v
mi
af
x
mn
r
:cx
v
gf
x
ak
v
gf
x
aa
v
nl
x
mn
r
:cy
x
aa
v
if
x
ak
v
if
nf
x
mn
r
:cz
x
aa
v
ak
ma
ml
x
mn
r
:c0
x
ck
v
ai
ac
ca
ka
mc
mi
kk
ck
x
mn
r
:c1
x
ce
v
af
mf
x
md
v
mi
x
mn
r
:c2
x
ca
v
ac
ai
ck
ek
gi
gc
ia
ma
ml
x
mn
r
:c3
x
aa
v
ak
fe
fi
hk
kk
mi
mc
x
ka
v
nd
x
mn
r
:c4
x
mh
v
ah
ia
il
x
mn
r
:c5
x
ak
v
aa
fa
fi
hk
kk
mi
mc
x
ka
v
nd
x
mn
r
:c6
x
ck
v
ai
ac
ca
ka
mc
mi
kk
hk
fi
fc
ha
x
mn
r
:c7
x
aa
v
ak
nb
x
mn
r
:c8
x
gc
v
ea
ca
ac
ai
ck
ek
gi
gc
ia
ka
mc
mi
kk
ik
gi
x
mn
r
:c9
x
ka
v
mc
mi
kk
ck
ai
ac
ca
fa
hc
hi
fk
x
mn
r
-3
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 21
" cat: cat arg1 [arg2 ...] " cat: cat arg1 [arg2 ...]
" Load the pointer pointer in 017777 to see if we have any arguments " Load the pointer pointer in 017777 to see if we have any arguments
@@ -64,7 +63,6 @@ done:
and d1 and d1
sna cla sna cla
jmp 1f jmp 1f
"** 06-5-12.pdf page 22
jms putc " Store the character in the buffer jms putc " Store the character in the buffer
jmp done " and loop back jmp done " and loop back
1: 1:
@@ -128,7 +126,6 @@ putc: 0
sad d128 sad d128
skp skp
jmp putc i " No, so return (more room still in the buffer) jmp putc i " No, so return (more room still in the buffer)
"** 06-5-12.pdf page 23
lac fo " Load fd1 (i.e stdout) lac fo " Load fd1 (i.e stdout)
sys write; iopt+1; 64 " and write out the 64 words in the buffer sys write; iopt+1; 64 " and write out the 64 words in the buffer
lac iopt lac iopt
+1 -7
View File
@@ -1,4 +1,3 @@
"** 06-5-12.pdf page 25
" check " check
lac d1 lac d1
@@ -61,7 +60,6 @@ iloop:
lac iflags lac iflags
and o40 and o40
sza sza
"** 06-5-12.pdf page 26
jmp iloop jmp iloop
law idskps law idskps
dac t1 dac t1
@@ -123,7 +121,6 @@ dupcheck: 0
lac d1 lac d1
2: alss 0 2: alss 0
dac bit dac bit
"** 06-5-12.pdf page 27
lac i t6 lac i t6
and bit and bit
sza sza
@@ -173,7 +170,7 @@ print: 0
part2: part2:
lac icnt lac icnt
jms print jmp print
lac d1 lac d1
sys write; m3; m3s sys write; m3; m3s
lac licnt lac licnt
@@ -185,7 +182,6 @@ part2:
lac d1 lac d1
sys write; m5; m5s sys write; m5; m5s
lac blcnt lac blcnt
"** 06-5-12.pdf page 28
jms print jms print
lac d1 lac d1
sys write; m6; m6s sys write; m6; m6s
@@ -247,7 +243,6 @@ part3:
cla cla
llss 4 llss 4
tad alsscom tad alsscom
"** 06-5-12.pdf page 29
dac 2f dac 2f
lac d1 lac d1
2: alss 0 2: alss 0
@@ -309,7 +304,6 @@ t1: 0
t2: 0 t2: 0
t3: 0 t3: 0
t4: 0 t4: 0
"** 06-5-12.pdf page 30
t5: 0 t5: 0
t6: 0 t6: 0
-20
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 2
" db " db
"** pages 2-21 of 07-13-19.pdf "** pages 2-21 of 07-13-19.pdf
" Usage: db [ corefile [ namelist ] ] " Usage: db [ corefile [ namelist ] ]
@@ -63,7 +62,6 @@ wcorep: corename; 1
" "
lac o52012 " prompt: "*\n" lac o52012 " prompt: "*\n"
jms wchar jms wchar
"** 07-13-19.pdf page 3
law dotdot law dotdot
dac nsearch dac nsearch
jms nlsearch jms nlsearch
@@ -125,7 +123,6 @@ cmd:
jmp saddress jmp saddress
sad o75 " '='? sad o75 " '='?
jmp address jmp address
"** 07-13-19.pdf page 4
sad o57 " '/'? sad o57 " '/'?
jmp octal jmp octal
sad o72 " ':'? sad o72 " ':'?
@@ -187,7 +184,6 @@ saddress:
lac 9f lac 9f
dac curdot dac curdot
jmp mloop jmp mloop
"** 07-13-19.pdf page 5
9:0 9:0
" "
symbol: symbol:
@@ -249,7 +245,6 @@ print:
spa spa
jmp error jmp error
lac rcore lac rcore
"** 07-13-19.pdf page 6
sys read; inbuf; 64 sys read; inbuf; 64
spa spa
jmp error jmp error
@@ -311,7 +306,6 @@ prdec: "temp
proct:0 proct:0
jms octw jms octw
6 6
"** 07-13-19.pdf page 7
jmp i proct jmp i proct
" "
patch: patch:
@@ -373,7 +367,6 @@ getexp:0
xloop: xloop:
jms rch jms rch
lmq lmq
"** 07-13-19.pdf page 8
sad o044 sad o044
skp skp
jmp 1f jmp 1f
@@ -435,7 +428,6 @@ xloop:
lac o40 lac o40
sad rator sad rator
skp skp
"** 07-13-19.pdf page 9
jmp error jmp error
lacq lacq
dac rator dac rator
@@ -497,7 +489,6 @@ spcai:
lac d1 lac d1
dac reloc dac reloc
jmp i getspec jmp i getspec
"** 07-13-19.pdf page 10
" "
getsym:0 getsym:0
lmq lmq
@@ -559,7 +550,6 @@ skipt:
spa spa
jmp 2f " lc letter jmp 2f " lc letter
1: 1:
"** 07-13-19.pdf page 11
lac nchar1 lac nchar1
tad om101 tad om101
spa spa
@@ -621,7 +611,6 @@ num1:
jmp i getnum jmp i getnum
tad om10 tad om10
sma sma
"** 07-13-19.pdf page 12
jmp i getnum jmp i getnum
lac nchar1 lac nchar1
dzm nchar1 dzm nchar1
@@ -683,7 +672,6 @@ prsym:0 " print symbolic instruction
dac word dac word
dzm relflg dzm relflg
dzm relocflg dzm relocflg
"** 07-13-19.pdf page 13
dzm nsearch dzm nsearch
and o760000 and o760000
sad o760000 sad o760000
@@ -745,7 +733,6 @@ pr1:
tad d1 tad d1
dac addr dac addr
lac o55 lac o55
"** 07-13-19.pdf page 14
jms wchar jms wchar
jmp 2f jmp 2f
1: 1:
@@ -807,7 +794,6 @@ peae: " print EAE instruction
jmp i prsym jmp i prsym
1: 1:
law eaes law eaes
"** 07-13-19.pdf page 15
dac addr dac addr
jmp nfnd jmp nfnd
" "
@@ -869,7 +855,6 @@ pcal:
law syss law syss
jms wrname jms wrname
lac o40 lac o40
"** 07-13-19.pdf page 16
jms wchar jms wchar
lac addr lac addr
jms wrname jms wrname
@@ -931,7 +916,6 @@ nloop:
lacq lacq
tad d3 tad d3
dac np dac np
"** 07-13-19.pdf page 17
lac i np lac i np
sna sna
jmp nloop jmp nloop
@@ -993,7 +977,6 @@ testn:
skp skp
jmp nloop jmp nloop
isz minp isz minp
"** 07-13-19.pdf page 18
isz inbuf isz inbuf
isz value isz value
jmp 1b jmp 1b
@@ -1055,7 +1038,6 @@ nlerr:
" "
rch:0 rch:0
lac nchar1 lac nchar1
"** 07-13-19.pdf page 19
dzm nchar1 dzm nchar1
sza sza
jmp i rch jmp i rch
@@ -1117,7 +1099,6 @@ d12:12
d8:8 d8:8
d3:3 d3:3
o177:0177 o177:0177
"** 07-13-19.pdf page 20
o136: 0136 o136: 0136
o45: 045 o45: 045
sysflag: 0 sysflag: 0
@@ -1179,7 +1160,6 @@ nchar1:0
nchar:0 nchar:0
o177000:0177000 o177000:0177000
o56040:056040 " ". " o56040:056040 " ". "
"** 07-13-19.pdf page 21
nsearch:0 nsearch:0
word:0 word:0
relflg:0 relflg:0
-5
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 23
" dmabs " dmabs
" takes a list of files on command line and punches out each " takes a list of files on command line and punches out each
@@ -75,7 +74,6 @@ dump2: " (label not used)
dump3: " block loop dump3: " block loop
-1 " reset i8 to buffer -1 " reset i8 to buffer
tad bufp tad bufp
"** 07-13-19.pdf page 24
dac 8 dac 8
-64 " get count -64 " get count
dac c1 dac c1
@@ -137,7 +135,6 @@ dump4: " end of block
done: " here at end of input file done: " here at end of input file
lac tracmd " get transfer command (jmp) lac tracmd " get transfer command (jmp)
jms put " write to tape jms put " write to tape
"** 07-13-19.pdf page 25
cla " write a zero word cla " write a zero word
jms put jms put
lac oldsum " get checksum lac oldsum " get checksum
@@ -199,7 +196,6 @@ boot:
2: 2:
jms get1-boot+org " get command word from tape jms get1-boot+org " get command word from tape
dac cmd-boot+org dac cmd-boot+org
"** 07-13-19.pdf page 26
jms get1-boot+org " get count from tape jms get1-boot+org " get count from tape
cma cma
dac cnt-boot+org " store complemented (incremented below) dac cnt-boot+org " store complemented (incremented below)
@@ -261,7 +257,6 @@ punout: <pp>;<to>;<ut>;040040
o17: 017 o17: 017
fi: 0 fi: 0
"** 07-13-19.pdf page 27
fo: 0 fo: 0
count: 0 count: 0
oldsum: 0 oldsum: 0
+3 -10
View File
@@ -1,4 +1,3 @@
"** 07-13-19.pdf page 30
" ds " ds
lac 017777 i lac 017777 i
@@ -66,13 +65,12 @@ loop:
lac i1 i lac i1 i
sad ddfilp i sad ddfilp i
jmp 2f jmp 2f
"** 07-13-19.pdf page 31
isz i1 isz i1
isz c1 isz c1
jmp 1b jmp 1b
lac ddfilp lac ddfilp
tad d1 tad i1
dac i1 dac i1
lac i1 i lac i1 i
dac .+3 dac .+3
@@ -129,7 +127,6 @@ loop:
sad i2 i sad i2 i
skp skp
jmp 3f jmp 3f
"** 07-13-19.pdf page 32
-1 -1
tad i1 tad i1
dac i3 dac i3
@@ -192,7 +189,6 @@ loop:
jms putname; scrname jms putname; scrname
jms putname; dd jms putname; dd
law 012 law 012
"** 07-13-19.pdf page 33
jms putc jms putc
3: 3:
@@ -254,7 +250,7 @@ longout: 0
lac statbuf+10 lac statbuf+10
jms octal; -5 jms octal; -5
jmp longout i jmp longout i
"** 07-13-19.pdf page 34
readdir: 0 readdir: 0
law 012 law 012
jms putc jms putc
@@ -317,7 +313,6 @@ readdir: 0
lac i1 lac i1
dac 8 dac 8
lac 8 i lac 8 i
"** 07-13-19.pdf page 35
dac fsopt i dac fsopt i
isz fsopt isz fsopt
lac 8 i lac 8 i
@@ -382,7 +377,7 @@ octal: 0
lac octal i " Save the actual number of print digits into c lac octal i " Save the actual number of print digits into c
dac c " as a negative number. dac c " as a negative number.
1: 1:
ecla cla
llss 3 " Shift 3 more bits into AC llss 3 " Shift 3 more bits into AC
tad o60 " Add AC to ASCII '0' tad o60 " Add AC to ASCII '0'
jms putc " and print out the digit jms putc " and print out the digit
@@ -444,7 +439,6 @@ putc: 0
spa " If the bit was set, we already have one spa " If the bit was set, we already have one
jmp 1f " character at 2f+1. If no previous character, jmp 1f " character at 2f+1. If no previous character,
lac 2f i " merge the old and new character together lac 2f i " merge the old and new character together
"** 07-13-19.pdf page 37
xor 2f+1 xor 2f+1
jmp 3f " and go to the "save it in buffer" code jmp 3f " and go to the "save it in buffer" code
1: 1:
@@ -507,7 +501,6 @@ ddfilp: .=.+1
ddfiles: .=.+1 ddfiles: .=.+1
statbuf: .=.+13 statbuf: .=.+13
c: .=.+1 c: .=.+1
"** 07-13-19.pdf page 38
i1: .=.+1 i1: .=.+1
i2: .=.+1 i2: .=.+1
i3: .=.+1 i3: .=.+1
+47 -90
View File
@@ -1,121 +1,78 @@
"** 07-13-19.pdf page 42
" dskio " dskio
" Reads 10 blocks from side 0 at block address AC into buffer dskbuf
dskrd0: 0 dskrd0: 0
dzm side " set side to 0 dzm side
jms dskio; 02000 " read 10 blocks starting at block AC on side 0 jms dskio; 02000
jmp i dskrd0 " return to caller jmp i dskrd0
" Writes 10 blocks from buffer dskbuf onto side 0 at block address AC
dskwr0: 0 dskwr0: 0
dzm side " set side to 0 dzm side
jms dskio; 03000 " write 10 blocks tarting at block AC on side 0 jms dskio; 03000
jmp i dskwr0 " return to caller jmp i dskwr0
" Reads 10 blocks from side 1 at block address AC into buffer dskbuf
dskrd1: 0 dskrd1: 0
lmq " set side to 1 lmq
lac o200000 lac o200000
dac side dac side
lacq lacq
jms dskio; 02000 " read 10 blocks starting at block AC on side 1 jms dskio; 02000
jmp i dskrd1 " return to caller jmp i dskrd1
" Writes 10 blocks from buffer dskbuf onto side 1 at block address AC
dskwr1: 0 dskwr1: 0
lmq " Set side to 1 lmq
lac o200000 lac o200000
dac side dac side
lacq lacq
jms dskio; 03000 " write 10 blocks starting at block AC on side 1 jms dskio; 03000
jmp i dskwr1 " return to caller jmp i dskwr1
" dskio depends on the DSLS_BITS after jump to subroutine:
" jms dskio; DSLS_BITS
" DSLS_BITS 02000 causes a read, 03000 causes a write.
"
" In both cases 10 blocks worth of data is either transferred from
" disk into dskbuf (read), or transferred from dskbuf onto the disk
" (write). A block is the same as a segment, each comprising 64 words.
"
" The location on disk is controlled by the variable "side" and the
" value in AC, representing the number of blocks from the start
" of the side.
"
" dskio takes the block address passed in AC, divides it by 80
" to get the track address, and as a remainder the segment address.
" Both are then re-encoded as BCD, shifted to the correct bit
" positions (explained below) and ORed together with the value of
" the "side" variable (representing the hundreds flag in the disk
" address). This disk address is then passed on to the disk just
" before starting the transfer in chunks of 10 segments each.
"
" The disk address for RB09 disks is formatted like this:
"
" * Bit 0 not used
" * Bit 1 hundreds flag for track address
" * Bits 2-5 Tens digit for track address as BCD
" * Bits 6-9 Units digit for track address as BCD
" * Bits 10-13 Tens digit for segment address as BCD
" * Bits 14-17 Units digit for segment address as BCD
"
" If the disk indicates an error the transfer is attempted 10 times
" before dskio gives up and halts the program.
dskio: 0 dskio: 0
cll; idiv; 80 " compute binary track and segment addresses cll; idiv; 80
dac 2f " store binary segment address dac 2f
lacq " get binary track address back into AC lacq
idiv; 10 " compute BCD track address from binary track address idiv; 10
dac 3f dac 3f
lls 22 lls 22
xor 3f " OR together Tens and Units digits of BCD track address xor 3f
als 8 " shift BCD track address to bit position in disk address als 8
dac 3f " store BCD track address dac 3f
lac 2f " load binary segment address lac 2f
idiv; 10 " compute BCD segment address from binary segment address idiv; 10
dac 2f dac 2f
lls 22 lls 22
xor 2f " OR together Tens and Units digits of BCD segment address xor 2f
xor 3f " OR together track and segment addresses xor 3f
xor side " OR together side, track and segment addresses xor side
" to make the complete disk address dac 2f
dac 2f " store disk address -10
-10 " do at most 10 transfer attempts
dac 3f dac 3f
1: 1:
dscs " clear disk status dscs
-640 " prepare transfer of 10 segments (10 blocks) -640
dslw dslw
lac dskbufp " load pointer to dskbuf into MAC lac dskbufp
dslm dslm
lac 2f " load previously computed disk address lac 2f
dsld dsld
lac dskio i " load disk status register (one bit is the read/write flag) lac dskio i
dsls dsls
dssf " wait for ERROR/DONE dssf
jmp .-1 jmp .-1
"** 07-13-19.pdf page 43 dsrs
dsrs " read disk status into AC, bit 0 indicates errors sma
sma " if bit 0 of AC is set, AC is negative. jmp 1f
" if AC is negative, continue below and do another isz 3f
" transfer attempt... jmp 1b
jmp 1f " ...otherwise jump to the subroutine exit code below hlt
isz 3f " increment transfer attempts, and...
jmp 1b " ...retry if more attempts remain
hlt " when no more attempts remain, stop program due to
" persistent disk error
1: 1:
isz dskio " skip over argument passed to dskio isz dskio
jmp i dskio " return to caller jmp i dskio
2: 0
3: 0
2: 0 " local variable storing first binary segment address, o200000: 0200000
" then disk address dskbufp: dskbuf
3: 0 " local variable storing first BCD track address,
" then loop counter
o200000: 0200000 " bit corresponding to set Hundreds flag in disk address side: .=.+1
dskbufp: dskbuf " pointer to transfer buffer dskbuf: .=.+640
side: .=.+1 " which side to access
dskbuf: .=.+640 " transfer buffer for 10 blocks
+14 -21
View File
@@ -1,33 +1,26 @@
"** 07-13-19.pdf page 41
" dskres " dskres
" Copies the entire file system (except system image and iof
" swap area) from side 0 of the disk onto same location hlt
" on side 1. dzm track
" -640
" I.e. copies the first 6400 blocks from side 0 to side 1.
iof " disable interrupts
hlt " halt the computer!
dzm track " start copying from block address 0
-640 " transfer 640 chunks of 10 blocks each
dac c1 dac c1
1: 1:
lac track " read chunk of blocks starting at block "track" on side 0 lac track
jms dskrd0 jms dskrd0
lac track " write chunk of blocks starting at block "track" on side 1 lac track
jms dskwr1 jms dskwr1
lac track " proceed to next chunk (of 10 blocks) lac track
tad d10 tad d10
dac track dac track
isz c1 " increment chunks transferred, if there are chunks remaining isz c1
jmp 1b " ...loop and transfer the next chunk jmp 1b
hlt " ...otherwise halt the computer! hlt
sys exit " call exit system call sys exit
track: 0 " block address of chunk to transfer track: 0
c1: 0 " number of chunks remaining c1: 0
d10: 10 d10: 10
+13 -20
View File
@@ -1,33 +1,26 @@
"** 07-13-19.pdf page 40
" dsksav " dsksav
" Copies the entire file system (except system image and iof
" swap area) from side 1 of the disk onto same location hlt
" on side 0. dzm track
" -640
" I.e. copies the first 6400 blocks from side 1 to side 0.
iof " disable interrupts
hlt " halt the computer!
dzm track " start copying from block address 0
-640 " transfer 640 chunks of 10 blocks each
dac c1 dac c1
1: 1:
lac track " read chunk of blocks starting at block "track" on side 1 lac track
jms dskrd1 jms dskrd1
lac track " write chunk of blocks starting at block "track" on side 0 lac track
jms dskwr0 jms dskwr0
lac track " proceed to next chunk (of 10 blocks) lac track
tad d10 tad d10
dac track dac track
isz c1 " increment chunks transferred, if there chunks remaining isz c1
jmp 1b " ...loop and transfer the next chunk jmp 1b
hlt " ...otherwise halt the computer! hlt
sys exit " call exit system call sys exit
track: 0 " block address of chunk to transfer track: 0
c1: 0 " number of chunks remaining c1: 0
d10: 10 d10: 10
+2 -5
View File
@@ -1,7 +1,6 @@
"** 08-rest.pdf page 8 "** 08-rest.pdf page 8
"[handwritten page number top right of scan - 1] "[handwritten page number top right of scan - 1]
" ed1 " ed1
lac d1 lac d1
sys write; 1f; 3 " say hello sys write; 1f; 3 " say hello
lac o17 lac o17
@@ -33,7 +32,6 @@
jmp advanc jmp advanc
1: 1:
<ed>; <it>; 012 <ed>; <it>; 012
advanc: advanc:
jms rline jms rline
lac linep lac linep
@@ -94,7 +92,6 @@ comand:
sad o75 " =? sad o75 " =?
jmp ceq jmp ceq
jmp error jmp error
ca: " a(ppend) ca: " a(ppend)
jms newline jms newline
jms setfl jms setfl
@@ -152,7 +149,7 @@ cp1:
lac d1 lac d1
sys write; line; 2: 0 sys write; line; 2: 0
lac addr1 lac addr1
sad addr2 sad addr1
jmp advanc jmp advanc
tad d1 tad d1
dac addr1 dac addr1
@@ -219,7 +216,6 @@ cr: " r(ead)
isz c1 isz c1
jmp 2b jmp 2b
jmp 1b jmp 1b
cw: " w(rite) cw: " w(rite)
jms setfl jms setfl
lac i addr1 lac i addr1
@@ -714,6 +710,7 @@ addline: 0
jmp 1b jmp 1b
jmp i addline jmp i addline
getdsk: 0 "[the entire getdsk procedure was surrounded getdsk: 0 "[the entire getdsk procedure was surrounded
and o776000 " by a box that was Xed out]: and o776000 " by a box that was Xed out]:
sad diskin " -- sad diskin " --
+1 -2
View File
@@ -81,7 +81,6 @@ cs:
skp skp
jmp 3b jmp 3b
jms addline jms addline
2: 2:
lac addr1 lac addr1
sad addr2 sad addr2
@@ -342,7 +341,7 @@ found: 0
jmp 2f jmp 2f
jmp 3f jmp 3f
1: "??? 1: "???
lac lchrno lac charno
cma cma
tad charno tad charno
spa spa
+29 -30
View File
@@ -1,5 +1,4 @@
"** 09-1-35.pdf page 1 "** 09-1-35.pdf page 1
"[handwritten in the top center of scan - fop.s ]
jms = 0100000 jms = 0100000
" "
q:0 q:0
@@ -87,49 +86,49 @@ fdv = jms q
lac hms lac hms
sna sna
sys save sys save
ral "[box drawn around instruction - scan markup] ral
dac 2f "[separate box around the three dac instructions - scan markup] dac 2f
dac 3f dac 3f
dac 4f dac 4f
-1 -1
tad hexp "[-\ - scan markup] tad hexp
cma "[ | delta aep??? - scan markup] cma
tad aexp "[ | - scan markup] tad aexp
dac aexp "[-/ / Ams \ - scan markup] dac aexp
lac ans "[hand written to the right: Rem | --- | Hls??? - scan markup] lac ans
lmq "[ \ Hms / ----- - scan markup] lmq
lac ams "[circle around ams ---------- Hms - scan markup] lac ams
sna cll "[ Hms - scan markup] sna cll
jmp 8f jmp 8f
div div
2:0 2:0
szl szl
sys save sys save
dac ce10 "[arrow pointing from ce10 to "REm" +-----+-----+ - scan markup] dac ce10
lacq "[ handwritten to the right: | A |+ B | - scan markup] lacq
dac 5f "[circle around 5f +-----+-----+ - scan markup] dac 5f
lac ce10 "[ | C |+ D | - scan markup] lac ce10
frdiv "[ +-----+-----+ - scan markup] frdiv
3:0 "[line from 3:0 to a circled "Hms" - scan markup] 3:0
szl szl
sys save sys save
lacq lacq
dac ce10 "[line from ce10 to text "Q1" - scan markup] dac ce10
lac hls lac hls
and o377777 and o377777
frdiv "[ X - scan markup] frdiv
4:0 "[handwritten to the right: ----- - scan markup] 4:0
szl "[ A+B - scan markup] szl
sys save sys save
lacq lacq
dac 2b "[circle around 2b with arrow pointing to the right dac 2b
spa cla spa cla
"** 09-1-35.pdf page 3 "** 09-1-35.pdf page 3
-1 "[vertical line to the right of instructions... - scan markup] -1
tad 2b tad 2b
cll "[underlined ...vertical line ends here - scan markup] cll
mul mul
5:0 "[line from 5:0 to "Q" - scan markup] 5:0
dzm 2b dzm 2b
spa spa
isz 2b isz 2b
@@ -140,11 +139,11 @@ fdv = jms q
isz 3b isz 3b
skp skp
isz 2b isz 2b
lac ce10 "[lac ce10 circled - scan markup] lac ce10
lmq lmq
lac 3b lac 3b
sna sna
jmp 6f "[arrow pointing down starts to the right of 6f - scan markup] jmp 6f
cma cma
tad d1 tad d1
stl stl
@@ -152,7 +151,7 @@ fdv = jms q
lmq lmq
szl szl
isz 2b isz 2b
6:lac 2b "[arrow above points to between this instruction and the next one - scan markup] 6:lac 2b
sma sma
tad d1 tad d1
tad 5b tad 5b
@@ -725,7 +724,7 @@ sqrt = jms q
xor o200000 xor o200000
xor o400000 xor o400000
dac 1f dac 1f
lac ams "[a centered dot drawn after ams - scan markup] lac ams
frdiv; 1:.. frdiv; 1:..
szl szl
clq clq
@@ -779,7 +778,7 @@ sres: 0;0;0
rsign: 0 rsign: 0
sign: 0 sign: 0
fp1: 1;0200000;0 fp1: 1;0200000; 0
o400000: 0400000 o400000: 0400000
o640500: 0640500 o640500: 0640500
-5
View File
@@ -1,5 +1,4 @@
" init " init
"** 07-13-19.pdf page 47
-1 -1
sys intrp sys intrp
@@ -61,7 +60,6 @@ login:
sad o72 sad o72
skp skp
jmp 2b jmp 2b
"** 07-13-19.pdf page 48
lac 9 i lac 9 i
sad o72 sad o72
jmp 1f jmp 1f
@@ -122,7 +120,6 @@ login:
cll; als 3 cll; als 3
omq omq
dac nchar dac nchar
"** 07-13-19.pdf page 49
jmp 1b jmp 1b
2: 2:
lac nchar lac nchar
@@ -185,7 +182,6 @@ rline: 0
sad 8 sad 8
jmp 1b " and loop back jmp 1b " and loop back
-1 -1
"** 07-13-19.pdf page 50
tad 8 " Otherwise, move the pointer in location 8 back one tad 8 " Otherwise, move the pointer in location 8 back one
dac 8 dac 8
jmp 1b " and loop back jmp 1b " and loop back
@@ -247,7 +243,6 @@ m1:
m1s = .-m1 m1s = .-m1
m2: m2:
<?; 012 <?; 012
"** 07-13-19.pdf page 51
m2s = .-m2 m2s = .-m2
m3: m3:
<pa>;<ss>;<wo>;<rd>;<: 040 <pa>;<ss>;<wo>;<rd>;<: 040
+1 -1
View File
@@ -181,7 +181,7 @@ loop:
dac ball1+vx dac ball1+vx
2: 2:
lac toptest lac toptest
tad ball1+y tad ball1+vy
spa spa
jmp 2f jmp 2f
jms pockettb jms pockettb
+22 -23
View File
@@ -9,24 +9,24 @@
tad d1 tad d1
dac .pbp1 dac .pbp1
restart: restart:
fld; arg1 "[ g = arg1 - scan markup] fld; arg1
fst; g "[ fact = arg2 - scan markup] fst; g
fld; arg2 "[ d = 1.0 - scan markup] fld; arg2
fst; fact "[ z = 0 - scan markup] fst; fact
fld; fp01 "[ oldx = 0 - scan markup] fld; fp01
fst; d "[ oldy = 0 - scan markup] fst; d
jms capture "[loop: - scan markup] jms capture
-100 "[ b = z - 110. - scan markup] -100
dac j "[ ---------- - scan markup] dac j
fld; fp0 "[ radians - scan markup] fld; fp0
fst; z "[ z = z + g - scan markup] fst; z
fst; oldx "[ g = -g * fact - scan markup] fst; oldx
fst; oldy "[ fact = 1 / fact - scan markup] fst; oldy
lac o400000 "[ exex = 500. * d * sin(b + pi/2) - scan markup] lac o400000
dac i 11 "[ ni() - scan markup] dac i 11
dac i 11 "[ yy = 500. * d * sin(b) - scan markup] dac i 11
lac setx "[ ni() - scan markup] lac setx
dac i 10 "[ goto loop " an arrow points up to loop: above - scan markup] dac i 10
lac sety lac sety
dac i 10 dac i 10
@@ -51,7 +51,7 @@ loop:
sin sin
fmp; d fmp; d
fmp; fp500 fmp; fp500
fst; exex fst; xx
jms in jms in
jmp done jmp done
fld; b fld; b
@@ -67,7 +67,7 @@ loop:
dac i 11 dac i 11
fld; oldx fld; oldx
fng fng
fad; exex fad; xx
fix fix
spa spa
xor o775777 xor o775777
@@ -81,7 +81,7 @@ loop:
xor o775777 xor o775777
tad vecy tad vecy
dac i 10 dac i 10
fld; exex fld; xx
fst; oldx fst; oldx
fld; yy fld; yy
fst; oldy fst; oldy
@@ -261,7 +261,7 @@ release: 0
char: 0 char: 0
stick: 0 stick: 0
exex: 0; 0; 0 xx: 0; 0; 0
oldx: 0; 0; 0 oldx: 0; 0; 0
yy: 0; 0; 0 yy: 0; 0; 0
oldy: 0;0 0; 0 oldy: 0;0 0; 0
@@ -277,7 +277,6 @@ o177777: 0177777
o12000: 012000 o12000: 012000
o61000: 061000 o61000: 061000
om60: -060 om60: -060
d1: 1
d13: 13 d13: 13
d500: 500 d500: 500
o141000: 0141000 o141000: 0141000
-551
View File
@@ -1,554 +1,3 @@
:ca
v
af
nl
x
hd
v
hi
x
mn
r
:cb
x
ga
v
gi
ik
kk
mi
ma
aa
ai
ck
ek
gi
x
mn
r
:cc
x
kk
v
mi
mc
ka
ca
ac
ai
dl
x
mn
r
:cd
v
aa
ai
ck
kk
mi
ma
x
mn
r
:ce
x
mk
v
ma
aa
ak
x
gh
v
ga
x
mn
r
:cf
v
aa
ak
x
gh
v
ga
x
mn
r
:cg
x
gf
v
gk
nk
x
kk
v
mi
mc
ka
ca
ac
ai
dl
x
mn
r
:ch
x
aa
v
na
x
gb
v
gk
x
ak
v
nk
x
mn
r
:ci
x
md
v
mi
x
lf
v
af
x
ad
v
ai
x
mn
r
:cj
x
ka
v
mc
mg
ki
ai
x
ag
v
al
x
mn
r
:ck
x
aa
v
na
x
ak
v
ia
x
mk
v
fe
x
mn
r
:cl
x
aa
v
ma
mk
x
mn
r
:cm
v
aa
hf
ak
nk
x
mn
r
:cn
x
ak
v
mk
aa
na
x
mn
r
:co
x
ai
v
ch
ei
ck
ai
ac
ca
ka
mc
mi
kk
ck
x
mn
r
:cp
v
aa
ai
ck
ek
gi
ga
x
mn
r
:cq
x
mc
v
ka
ca
ac
ai
ck
kk
mi
mc
x
jh
v
nl
x
mn
r
:cr
v
aa
ai
ck
ek
gi
ga
x
mk
v
gf
x
mn
r
:cs
x
ka
v
mc
mi
kk
ik
gi
gc
ea
ca
ac
ai
dl
x
mn
r
:ct
x
aa
v
al
x
mf
v
af
x
mn
r
:cu
x
aa
v
ka
mc
mi
kk
x
ak
v
lk
x
mn
r
:cv
x
aa
v
mf
x
ak
v
mf
x
mn
r
:cw
x
aa
v
mc
af
x
ak
v
mi
af
x
mn
r
:cx
v
gf
x
ak
v
gf
x
aa
v
nl
x
mn
r
:cy
x
aa
v
if
x
ak
v
if
nf
x
mn
r
:cz
x
aa
v
ak
ma
ml
x
mn
r
:c0
x
ck
v
ai
ac
ca
ka
mc
mi
kk
ck
x
mn
r
:c1
x
ce
v
af
mf
x
md
v
mi
x
mn
r
:c2
x
ca
v
ac
ai
ck
ek
gi
gc
ia
ma
ml
x
mn
r
:c3
x
aa
v
ak
fe
fi
hk
kk
mi
mc
x
ka
v
nd
x
mn
r
:c4
x
mh
v
ah
ia
il
x
mn
r
:c5
x
ak
v
aa
fa
fi
hk
kk
mi
mc
x
ka
v
nd
x
mn
r
:c6
x
ck
v
ai
ac
ca
ka
mc
mi
kk
hk
fi
fc
ha
x
mn
r
:c7
x
aa
v
ak
nb
x
mn
r
:c8
x
gc
v
ea
ca
ac
ai
ck
ek
gi
gc
ia
ka
mc
mi
kk
ik
gi
x
mn
r
:c9
x
ka
v
mc
mi
kk
ck
ai
ac
ca
fa
hc
hi
fk
x
mn
r
:la :la
x x
fb fb
+103 -103
View File
@@ -3,18 +3,18 @@
t = 0 t = 0
start: "[------ stuff for gravity - scan markup] start:
law 13 " 13 = pbsflgs law 13
sys sysloc " get pbsflgs location sys sysloc
dac .pbson " store in .pbson dac .pbson
lac pww lac pww
dac 1f dac 1f
dac 2f dac 2f
lac pw lac pw
dac 3f dac 3f
-32 -32
dac cplan " cplan = -32 dac cplan
4: " while (cplan != 0) { 4:
fld; 1:0 fld; 1:0
fmp; 2:0 fmp; 2:0
-1 -1
@@ -22,7 +22,7 @@ start: "[------ stuff for gravity - scan markup]
dac aexp dac aexp
fng fng
fad; fpone fad; fpone
fst; 3:0 " pw[i] = - (pww[i] * pww[i]) / 2 + 1 fst; 3:0
lac 1b lac 1b
tad d3 tad d3
dac 1b dac 1b
@@ -30,36 +30,36 @@ start: "[------ stuff for gravity - scan markup]
lac 3b lac 3b
tad d3 tad d3
dac 3b dac 3b
isz cplan " cplan++ isz cplan
jmp 4b " } jmp 4b
law dspl-1 law dspl-1
dac clistp dac clistp
dac lanflg " lanflg = true dac lanflg
dzm crflg " crflg = false dzm crflg
dzm goflg " goflg = false dzm goflg
dzm .pbsint " pbsint = 0 dzm .pbsint
dzm forflg " forflg = false dzm forflg
dzm bacflg " bacflg = false dzm bacflg
dzm dspflg "[line connecting this instruction to... - scan markup] dzm dspflg
dzm locflg " locflg = false dzm locflg
dzm locpar "[... this instruction - scan markup] dzm locpar
lac d1 lac d1
dac par " par = 1 dac par
jms dispname " dispname() jms dispname
fld; prsq+4 fld; prsq+4
sqrt sqrt
fst; rpar " rpar = sqrt(prsq[par]) fst; rpar
fst; y " y = rpar fst; y
fst; oy " oy = y fst; oy
fld; fpone fld; fpone
fst; sphi " sphi = 1 fst; sphi
fst; stheta " stehta = sphi fst; stheta
jms dspsca " dspsca() jms dspsca
fld; fpzero fld; fpzero
fst; x " x = 0 fst; x
fst; ox " ox = x fst; ox
fst; cphi " cphi = ox fst; cphi
fst; ctheta " ctheta = cphi fst; ctheta
law displist law displist
"** 12-92-119.pdf page 2 "** 12-92-119.pdf page 2
sys capt sys capt
@@ -68,174 +68,174 @@ start: "[------ stuff for gravity - scan markup]
loop: loop:
law dspl-1 law dspl-1
dac clistp dac clistp
jms contrl "[arrow from below points to this instruction - scan markup] jms contrl
lac par lac par
jms absxy " absxy(par) jms absxy
jms shipxy " shipxy() jms shipxy
lac goflg lac goflg
spa spa
jmp loop3 "[long dash after loop3 - scan markup] if (!goflg) { jmp loop3
fld; fpzero fld; fpzero
fst; ax " ax = 0 fst; ax
fst; ay " ay = 0 fst; ay
fst; maxa " maxa = 0 fst; maxa
lac nplan " AC = nplan lac nplan
skp skp
loop1: loop1:
lac cplan " AC = cplan lac cplan
tad dm1 " AC-- tad dm1
spa spa
jmp loop2 " while (AC >= 0) { jmp loop2
dac cplan " cplan = AC dac cplan
tad fppar tad fppar
dac fcplan dac fcplan
lac i fcplan lac i fcplan
dac fcplan dac fcplan
jms updacc " updacc() jms updacc
jms displa " displa() jms displa
lac cplan lac cplan
sza sza
jms updpln " if (cplan) updpln() jms updpln
lac cplan lac cplan
and o7 and o7
sad o7 sad o7
jms contrl " if (cplan & 7 == 7) contrl() jms contrl
jmp loop1 " } jmp loop1
loop2: loop2:
lac lanflg lac lanflg
sma sma
jms updshp " if (!lanflg) updshp() jms updshp
loop3: " } loop3:
fld; horizv "[a box enclosing all code from loop3 to loop4 - scan markup] fld; horizv
lac scale "[arrow drawn from box up to location above - scan markup] lac scale
cma cma
tad vscale tad vscale
tad aexp tad aexp
dac aexp dac aexp
jms inscr jms inscr
jmp loop4 " if ((AC = inscr(horizv / 2**(vscale-scale-1)))) { jmp loop4
tad o141577 tad o141577
dac i clistp "[crossed out with an arrow pointint to "dac dspvel" - scan markup] dac i clistp
lac o164372 "[crossed out - scan markup] lac o164372
dac clistp i "[crossed out - scan markup] dac clistp i
cla "[crossed out - scan markup] cla
jms dsplanet "[crossed out - scan markup] dsplanet(0) jms dsplanet
loop4: "[inside a drawn box - scan markup] } loop4:
sys time "put delay here..... sys time "put delay here.....
"** 12-92-119.pdf page 3 "** 12-92-119.pdf page 3
dzm dispcl " dispcl = "" dzm dispcl
lac crflg lac crflg
sma sma
jmp 1f " if (crflg) jmp 1f
lac o20714 "cl lac o20714 "cl
dac dispcl " dispcl = "CL" dac dispcl
jmp 2f jmp 2f
1: 1:
lac lanflg lac lanflg
sma sma
jmp 2f " else if (lanflg) jmp 2f
lac o114 "l lac o114 "l
dac dispcl " dispcl = "L" dac dispcl
2: 2:
lac dhalt lac dhalt
dac i clistp dac i clistp
jmp loop " check 2-display question jmp loop " check 2-display question
contrl: 0 contrl: 0
lac i .pbson " load push button flags lac i .pbson
xor .pbsint xor .pbsint
and .pbson i " AC = (.pbson ^ .pbsint) & .pbson and .pbson i
sna sna
jmp noneon " if (AC) { jmp noneon
lmq lmq
spa ral spa ral
sys exit " if (pbson[0]) exit() sys exit
sma sma
jmp 1f " if (pbson[1]) { jmp 1f
dzm goflg " goflg = false dzm goflg
dzm crflg " crflg = false dzm crflg
1: " } 1:
lacq lacq
als 6 als 6
sma ral sma ral
jmp 1f " if (pbson[6]) { jmp 1f
spa spa
jmp noneon " if (!pbson[7]) { jmp noneon
isz scale " scale++ isz scale
nop nop
jms dspsca "uprange jms dspsca "uprange
jmp noneon " } jmp noneon
1: " } 1:
sma sma
jmp noneon " if (pbson[7]) { jmp noneon
-1 -1
tad scale tad scale
dac scale " scale-- dac scale
jms dspsca "downrange jms dspsca "downrange
noneon: " } } noneon:
dzm forflg " forflg = false dzm forflg
dzm bacflg " bacflg = false dzm bacflg
lac i .pbson lac i .pbson
dac .pbsint dac .pbsint
als 2 als 2
sma sma
jmp 1f " if (pbson[2]) { jmp 1f
lac dhalt lac dhalt
dac forflg " forflg = true dac forflg
lac goflg lac goflg
sma sma
"** 12-92-119.pdf page 4 "** 12-92-119.pdf page 4
dzm lanflg " if (!goflg) lanflg = false dzm lanflg
1: " } 1:
lac i .pbson lac i .pbson
als 3 als 3
sma sma
jmp 1f " if (pbson[3]) { jmp 1f
lac dhalt lac dhalt
dac bacflg " bacflg = true dac bacflg
lac goflg lac goflg
sma sma
dzm lanflg " if (!goflg) lanflg = false dzm lanflg
1: " } 1:
lac i .pbson lac i .pbson
als 4 als 4
sma sma
jmp 1f " if (pbson[4]) { jmp 1f
ral ral
spa spa
jmp i contrl " if (pbson[5]) return jmp i contrl
dzm 9f+t " 9f+t = false dzm 9f+t
jmp 2f jmp 2f
1: " } else { 1:
ral ral
sma sma
jmp i contrl " if (!pbson[5]) return jmp i contrl
lac dhalt lac dhalt
dac 9f+t " 9f+t = true dac 9f+t
2: " } 2:
fld; cphi fld; cphi
fmp; sdphi fmp; sdphi
lac 9f+t lac 9f+t
sma sma
fng fng
fst; ftmp1 " ftmp1 = cphi * sdphi * (9f+t ? 1 : -1) fst; ftmp1
fld; sphi fld; sphi
fmp; cdphi fmp; cdphi
fad; ftmp1 fad; ftmp1
fst; ftmp2 " ftmp2 = sphi * cdphi + ftmp1 fst; ftmp2
fld; sphi fld; sphi
fmp; sdphi fmp; sdphi
lac 9f+t lac 9f+t
spa spa
fng fng
fst; ftmp1 " ftmp1 = sphi * sdphi * (9f+t ? -1 : 1) fst; ftmp1
fld; cphi fld; cphi
fmp; cdphi fmp; cdphi
fad; ftmp1 fad; ftmp1
fst; cphi " cphi = cphi * cdphi + ftmp1 fst; cphi
fld; ftmp2 fld; ftmp2
fst; sphi " sphi = ftmp2 fst; sphi
jmp i contrl jmp i contrl
t = t+1 t = t+1
@@ -244,10 +244,10 @@ shipxy: 0
fld; absx fld; absx
fad; x fad; x
fng fng
fst; shipx " shipx = -(absx + x) fst; shipx
fld; absy fld; absy
fad; y fad; y
"** 12-92-119.pdf page 5 "** 12-92-119.pdf page 5
fng fng
fst; shipy " shipy = -(absy + y) fst; shipy
jmp i shipxy jmp i shipxy
+67 -67
View File
@@ -9,32 +9,32 @@ absv: 0
dzm absy+1 dzm absy+1
dzm absy+2 dzm absy+2
1: 1:
dac absi " absi = AC dac absi
sna sna
jmp i absv " while (absi) { jmp i absv
tad fppar tad fppar
dac 9f+t dac 9f+t
jms invert " invert(absi) -> ftmp1 = px[absi], ftmp2 = py[absi] jms invert
fld; ftmp1 fld; ftmp1
fng fng
fad; absx fad; absx
fst; absx " absx -= ftmp1 fst; absx
fld; ftmp2 fld; ftmp2
fng fng
fad; absy fad; absy
fst; absy " absy -= ftmp2 fst; absy
jms invert " invert(absi) -> ftmp1 = px[absi], ftmp2 = py[absi] jms invert
fld; ftmp1 fld; ftmp1
fad; absx fad; absx
fst; absx " absx += ftmp1 fst; absx
fld; ftmp2 fld; ftmp2
fad; absy fad; absy
fst; absy " absy += ftmp2 fst; absy
lac absi lac absi
tad ppar tad ppar
dac 9f+t dac 9f+t
lac i 9f+t " absi = ppar[absi] lac i 9f+t
jmp 1b " } jmp 1b
invert: 0 invert: 0
lac i 9f+t lac i 9f+t
@@ -50,12 +50,12 @@ invert: 0
dac 4f dac 4f
fld; 1:.. fld; 1:..
fng fng
fst; 2:.. " pww[par] = -pww[par] fst; 2:..
jms updpln " updpln() jms updpln
fld; 3:.. fld; 3:..
fst; ftmp1 " ftmp1 = px[par] fst; ftmp1
fld; 4:.. fld; 4:..
fst; ftmp2 " ftmp2 = py[par] fst; ftmp2
jmp i invert jmp i invert
t = t+1 t = t+1
@@ -82,122 +82,122 @@ updpln: 0
dac 8f dac 8f
fld; 1:.. fld; 1:..
fst; ftmp1 " ftmp1 = px[fcplan] fst; ftmp1
fmp; 2:.. fmp; 2:..
fst; ftmp2 " ftmp2 = ftmp1 * pw[fcplan] fst; ftmp2
fld; 3:.. fld; 3:..
fmp; 4:.. fmp; 4:..
fng fng
fad; ftmp2 fad; ftmp2
fst; 5:.. " px[fcplan] = - (py[fcplan] * pww[fcplan]) + ftmp2 fst; 5:..
fld; 6:.. fld; 6:..
fmp; 7:.. fmp; 7:..
fst; ftmp2 " ftmp2 = py[fcplan] * pw[fcplan] fst; ftmp2
fld; ftmp1 fld; ftmp1
fmp; 8:.. fmp; 8:..
fad; ftmp2 fad; ftmp2
fst; 0:.. " py[fcplan] = ftmp1 * pww[fcplan] + ftmp2 fst; 0:..
jmp updpln i jmp updpln i
updacc: 0 " update acceleration updacc: 0
lac cplan lac cplan
sad par sad par
jmp upda2 " if (cplan != par) { jmp upda2
jms absxy " absxy(cplan) jms absxy
fld; absx fld; absx
fad; shipx " FAC = absx + shipx fad; shipx
jmp 1f " } else { jmp 1f
upda2: upda2:
fld; x fld; x
fng " FAC = -x fng
1: " } 1:
fst; absx " absx = FAC fst; absx
fmp; absx fmp; absx
fst; ftmp1 " ftmp1 = absx * absx fst; ftmp1
lac cplan lac cplan
sad par sad par
jmp 1f " if (cplan != par) jmp 1f
fld; absy fld; absy
fad; shipy " FAC = absy + shipy fad; shipy
jmp 2f jmp 2f
1: 1:
fld; y fld; y
fng " else FAC = -y fng
"** 12-92-119.pdf page 8 "** 12-92-119.pdf page 8
2: 2:
fst; absy fst; absy
fmp; absy fmp; absy
fad; ftmp1 fad; ftmp1
fst; dtmp1 " dtmp1 = absy * absy + ftmp1 fst; dtmp1
sqrt sqrt
fst; dpar " dpar = sqrt(dtmp1) fst; dpar
lac cplan lac cplan
sad par sad par
skp skp
jmp upda5 " if (cplan == par) { jmp upda5
fld; ox fld; ox
fng fng
fad; x fad; x
fst; ftmp1 " ftmp1 = -ox + x fst; ftmp1
fmp; y fmp; y
fst; horizv " horizv = ftmp1 * y fst; horizv
fld; y fld; y
fng fng
fad; oy fad; oy
fst; ftmp2 " ftmp2 = -y + oy fst; ftmp2
fmp; x fmp; x
fad; horizv fad; horizv
fdv; dpar fdv; dpar
fst; horizv " horizv = (ftmp2 * x + horizv) / dpar fst; horizv
fld; dpar fld; dpar
fcp; rpar fcp; rpar
sma sma
jmp upda5 " if (dpar < rpar) { jmp upda5
lac lanflg lac lanflg
spa spa
jmp upda5 " if (!lanflg) { jmp upda5
fld; ftmp1 fld; ftmp1
fmp; ftmp1 fmp; ftmp1
fst; ftmp1 " ftmp1 *= ftmp1 fst; ftmp1
fld; ftmp2 fld; ftmp2
fmp; ftmp2 fmp; ftmp2
fad; ftmp1 fad; ftmp1
fcp; crash fcp; crash
spa spa
jmp 1f " if (ftmp2 * ftmp2 + ftmp1 > crash) { jmp 1f
lac dhalt lac dhalt
dac goflg " goflg = true dac goflg
dac crflg " crflg = true dac crflg
1: " } 1:
lac dhalt lac dhalt
dac lanflg " lanflg = true dac lanflg
fld; rpar fld; rpar
fdv; dpar fdv; dpar
fst; ftmp1 " ftmp1 = rpar / dpar fst; ftmp1
fmp; x fmp; x
fst; x " x *= ftmp1 fst; x
fst; ox " ox = x fst; ox
fld; ftmp1 fld; ftmp1
fmp; y fmp; y
fst; y " y *= ftmp1 fst; y
fst; oy " oy = y fst; oy
lac par lac par
jms absxy " absxy(par) jms absxy
jms shipxy " shipxy() jms shipxy
jmp upda2 " } } } jmp upda2
"** 12-92-119.pdf page 9 "** 12-92-119.pdf page 9
upda5: upda5:
fcp; fardst fcp; fardst
spa spa
jmp 1f " if (dpar > fardst) { jmp 1f
lac cplan lac cplan
sna sna
jmp 1f " if (cplan) { jmp 1f
lac dhalt lac dhalt
dac grvflg " grvflg = true dac grvflg
jmp i updacc " return jmp i updacc
1: " } } 1:
dzm grvflg " grvflg = false dzm grvflg
lac fcplan lac fcplan
tad accl tad accl
dac 1f dac 1f
@@ -205,18 +205,18 @@ upda5:
fdv; dtmp1 fdv; dtmp1
fcp; maxa fcp; maxa
spa spa
jmp 2f " if (accl[fcplan] / dtmp1 > maxa) { jmp 2f
fst; maxa " maxa = accl[fcplan] / dtmp1 fst; maxa
lac cplan lac cplan
dac maxj " maxj = cplan dac maxj
2: " } 2:
fdv; dpar fdv; dpar
fst; ftmp1 " ftmp1 = (accl[fcplan] / dtmp1) / dpar fst; ftmp1
fmp; absx fmp; absx
fad; ax fad; ax
fst; ax " ax += ftmp1 * absx fst; ax
fld; ftmp1 fld; ftmp1
fmp; absy fmp; absy
fad; ay fad; ay
fst; ay " ay += ftmp1 * absy fst; ay
jmp i updacc jmp i updacc
+60 -60
View File
@@ -7,111 +7,111 @@ updshp: 0
jmp .+4 jmp .+4
lac bacflg lac bacflg
sma sma
jmp 3f " if (forflg || bacflg) { jmp 3f
fld; ascale " FAC = ascale fld; ascale
lac forflg lac forflg
sma sma
jmp 1f jmp 1f
lac bacflg lac bacflg
sma sma
jmp 1f+1 jmp 1f+1
fld; fpzero " if (forflg && bacflg) FAC = 0 fld; fpzero
jmp 2f jmp 2f
1: 1:
fng " if (!forflg) FAC = -FAC fng
lac scale lac scale
tad aexp tad aexp
dac aexp " FAC = FAC * 2**scale dac aexp
lac forflg lac forflg
sma sma
jmp .+3 jmp .+3
2: 2:
lac accflg "[arrow pointing here from the text "how to set?" - scan markup] lac accflg
sma sma
jmp .+3 jmp .+3
fad; maxa " if (accflg) FAC += maxa fad; maxa
fng " FAC = -FAC fng
fst; ftmp1 fst; ftmp1
fmp; ctheta fmp; ctheta
fad; ax fad; ax
fst; ax " ax += ftmp1 * ctheta fst; ax
fld; ftmp1 fld; ftmp1
fmp; stheta fmp; stheta
fad; ay fad; ay
fst; ay " ay += ftmp1 * stheta fst; ay
3: " } 3:
fld; ox fld; ox
fng fng
fad; ax fad; ax
fst; ftmp1 " ftmp1 = -ox + ax fst; ftmp1
fld; x fld; x
lac aexp lac aexp
tad d1 tad d1
dac aexp dac aexp
fad; ftmp1 fad; ftmp1
fst; ftmp1 " ftmp1 += x*2 fst; ftmp1
fld; x fld; x
fst; ox " ox = x fst; ox
fld; ftmp1 fld; ftmp1
fst; x " x = ftmp1 fst; x
fld; oy fld; oy
fng fng
fad; ay fad; ay
fst; ftmp1 " ftmp1 = -oy + ay fst; ftmp1
fld; y fld; y
lac aexp lac aexp
tad d1 tad d1
"** 12-92-119.pdf page 11 "** 12-92-119.pdf page 11
dac aexp dac aexp
fad; ftmp1 fad; ftmp1
fst; ftmp1 " ftmp1 += y*2 fst; ftmp1
fld; y fld; y
fst; oy " oy = y fst; oy
fld; ftmp1 fld; ftmp1
fst; y " y = ftmp1 fst; y
lac par lac par
sad maxj sad maxj
jmp i updshp " if (par == maxj) return jmp i updshp
jms absxy " absxy(par) jms absxy
jms shipxy " shipxy() jms shipxy
lac par lac par
jms absv " absv(par) jms absv
fld; ox fld; ox
fng fng
fad; x fad; x
fad; absx fad; absx
fst; ox " ox = -ox + x + absx fst; ox
fld; oy fld; oy
fng fng
fad; y fad; y
fad; absy fad; absy
fst; oy " oy = -oy + y + absy fst; oy
lac maxj lac maxj
dac par " par = maxj dac par
jms absv " absv(par) jms absv
fld; ox fld; ox
fng fng
fad; absx fad; absx
fst; ox " ox = -ox + absx fst; ox
fld; oy fld; oy
fng fng
fad; absy fad; absy
fst; oy " oy = -oy + absy fst; oy
lac par lac par
jms absxy " absxy(par) jms absxy
fld; absx fld; absx
fad; shipx fad; shipx
fng fng
fst; x " x = -(absx + shipx) fst; x
fad; ox fad; ox
fst; ox " ox += x fst; ox
fld; absy fld; absy
fad; shipy fad; shipy
fng fng
fst; y " y = -(absy + shipy) fst; y
fadins: " fad instruction fadins:
fad; oy fad; oy
fst; oy " oy += y fst; oy
lac par lac par
tad fppar tad fppar
dac 1f dac 1f
@@ -120,69 +120,69 @@ fadins: " fad instruction
dac 1f dac 1f
fld; 1:.. fld; 1:..
sqrt sqrt
fst; rpar " rpar = sqrt(prsq[par]) fst; rpar
jms dspsca " dspsca() jms dspsca
lac par lac par
"** 12-92-119.pdf page 12 "** 12-92-119.pdf page 12
jms dispname " dispname(par) jms dispname
jmp i updshp jmp i updshp
inscr: 0 " in screen inscr: 0
fng fng
fix " AC = (int) -FAC fix
tad d383 " AC += 383 tad d383
spa spa
jmp i inscr " if (AC < 0) return jmp i inscr
tad dm768 " AC -= 768 tad dm768
sma " if (AC >= 0) return sma
jmp i inscr jmp i inscr
isz inscr isz inscr
jmp i inscr " return AC jmp i inscr
absxy: 0 absxy: 0
sna sna
jmp 7f " if (AC) { jmp 7f
lmq lmq
lac fldins lac fldins
dac 2f-1 " C(2f-1) = fld dac 2f-1
dac 4f-1 " C(4f-1) = fld dac 4f-1
lacq lacq
1: " while (true) { 1:
dac absi " absi = AC dac absi
sna sna
jmp i absxy " if (!absi) return jmp i absxy
tad fppar tad fppar
dac 9f+t dac 9f+t
lac i 9f+t lac i 9f+t
5: 5:
tad px tad px
dac 2f dac 2f
fldins: " fld instruction fldins:
fld; absx fld; absx
fad; 2:.. fad; 2:..
fst; absx " if (i==0) absx = px[absi]; else absx += px[absi] fst; absx
lac i 9f+t lac i 9f+t
6: 6:
tad py tad py
dac 4f dac 4f
fld; absy fld; absy
fad; 4:.. fad; 4:..
fst; absy " if (i==0) absy = py[absi]; else absy += py[absi] fst; absy
lac fadins lac fadins
dac 2b-1 dac 2b-1
dac 4b-1 dac 4b-1
lac absi lac absi
tad ppar tad ppar
dac 9f+t dac 9f+t
lac i 9f+t " AC = ppar[absi] lac i 9f+t
jmp 1b " } jmp 1b
7: " } else { 7:
dzm absx " absx = 0 dzm absx
dzm absx+1 dzm absx+1
dzm absx+2 dzm absx+2
dzm absy " absy = 0 dzm absy
dzm absy+1 dzm absy+1
dzm absy+2 dzm absy+2
jmp i absxy " } jmp i absxy
"** 12-92-119.pdf page 13 "** 12-92-119.pdf page 13
t = t+1 t = t+1
+91 -91
View File
@@ -5,37 +5,37 @@ displa: 0
lac locpar lac locpar
sad cplan sad cplan
skp skp
jmp 2f " if (cplan == locpar) { jmp 2f
lac locflg "[arrow points here from the text "how to set?" - scan markup] lac locflg
sma sma
jmp 1f " if (locflg) { jmp 1f
fld; cphi "[-\ - scan markup]
fmp; absy "[ | - scan markup]
fst; ftmp1 "[ | - scan markup] ftmp1 = cphi * absy
fld; sphi "[ | - scan markup]
fmp; absx "[ | - scan markup]
fad; ftmp1 "[ | - scan markup]
fdv; dpar "[ | - scan markup]
fst; stheta "[ \ lock calculation - scan markup] stheta = (sphi * absx + ftmp1) / dpar
fld; sphi "[ / - scan markup]
fmp; absy "[ | - scan markup]
fng "[ | - scan markup]
fst; ftmp1 "[ | - scan markup] ftmp1 = - (sphi * absy)
fld; cphi "[ | - scan markup]
fmp; absx "[ | - scan markup]
fad; ftmp1 "[ | - scan markup]
fdv; dpar "[ | - scan markup]
fst; ctheta "[ | - scan markup] ctheta = (cphi * absx + ftmp1) / dpar
jmp 2f "[-/ - scan markup]
1: " } else {
fld; sphi
fst; stheta " stheta = sphi
fld; cphi fld; cphi
fst; ctheta " ctheta = cphi fmp; absy
2: " } } fst; ftmp1
fld; sphi
fmp; absx
fad; ftmp1
fdv; dpar
fst; stheta
fld; sphi
fmp; absy
fng
fst; ftmp1
fld; cphi
fmp; absx
fad; ftmp1
fdv; dpar
fst; ctheta
jmp 2f
1:
fld; sphi
fst; stheta
fld; cphi
fst; ctheta
2:
fld; absx fld; absx
sfmp; ctheta sfmp; ctheta
fst; ftmp1 " ftmp1 = absx * ctheta fst; ftmp1
fld; absy fld; absy
sfmp; stheta sfmp; stheta
fad; ftmp1 fad; ftmp1
@@ -44,30 +44,30 @@ displa: 0
tad scale tad scale
cma cma
dac aexp dac aexp
fst; spy " spy = (absy * stheta + ftmp1) / 2**scale fst; spy
dzm inflg " inflg = false dzm inflg
jms inscr jms inscr
jmp 1f " if ((AC = inscr(spy))) { jmp 1f
tad o145777 tad o145777
dac clistp i dac clistp i
jms rotx " rotx() jms rotx
lac dhalt lac dhalt
dac inflg " inflg = true dac inflg
jms inscr jms inscr
jmp 1f " if ((AC = inscr(spx))) { jmp 1f
tad o161577 tad o161577
dac i clistp dac i clistp
lac cplan lac cplan
jms dsplanet " dsplanet(cplan) jms dsplanet
1: " } } 1:
jms drcirc " drcirc() jms drcirc
"** 12-92-119.pdf page 15 "** 12-92-119.pdf page 15
jmp i displa jmp i displa
rotx: 0 rotx: 0
fld; absx fld; absx
sfmp; stheta sfmp; stheta
fst; ftmp1 " ftmp1 = absx * stheta fst; ftmp1
fld; absy fld; absy
sfmp; ctheta sfmp; ctheta
fng fng
@@ -77,70 +77,70 @@ rotx: 0
tad scale tad scale
cma cma
dac aexp dac aexp
fst; spx " spx = (-(absy * ctheta) + ftmp1) / 2**scale fst; spx
jmp i rotx jmp i rotx
surf: 0 surf: 0
-1 -1
tad setx tad setx
cma cma
dac tsetx " tsetx = -setx dac tsetx
lac setx lac setx
tad o141577 tad o141577
dac i clistp dac i clistp
-1 -1
tad sety tad sety
cma cma
dac tsety " tsety = -sety dac tsety
lac sety lac sety
tad o165777 tad o165777
dac clistp i dac clistp i
lac narcs lac narcs
dac nt " nt = narcs dac nt
fld; wx fld; wx
fst; twx " twx = wx fst; twx
fld; wy fld; wy
fst; twy " twy = wy fst; twy
fld; v fld; v
fng fng
fst; v " v = -v fst; v
2: " while (nt != 0) { 2:
fld; v fld; v
sfmp; twy sfmp; twy
fng fng
fst; ftmp1 " ftmp1 = -(v * twy) fst; ftmp1
fld; vv fld; vv
sfmp; twx sfmp; twx
fad; ftmp1 fad; ftmp1
fst; ftmp2 " ftmp2 = vv * twx + ftmp1 fst; ftmp2
fld; v fld; v
sfmp; twx sfmp; twx
fst; ftmp1 " ftmp1 = v * twx fst; ftmp1
fld; vv fld; vv
sfmp; twy sfmp; twy
fad; ftmp1 fad; ftmp1
fst; twy " twy = vv * twy + ftmp1 fst; twy
fad; spy fad; spy
jms inscr jms inscr
jmp 1f " if (!(AC = inscr(twy + spy))) return false jmp 1f
"** 12-92-119.pdf page 16 "** 12-92-119.pdf page 16
tad tsety tad tsety
dac dely " dely = AC + tsety dac dely
cma cma
tad d1 tad d1
tad tsety tad tsety
dac tsety " tsety -= dely dac tsety
fld; ftmp2 fld; ftmp2
fst; twx " twx = ftmp2 fst; twx
fad; spx fad; spx
jms inscr jms inscr
jmp 1f " if (!(AC = inscr(twx + spx))) return false jmp 1f
tad tsetx tad tsetx
dac delx " delx = res + tsetx dac delx
cma cma
tad d1 tad d1
tad tsetx tad tsetx
dac tsetx " tsetx -= delx dac tsetx
lac delx lac delx
sma sma
jmp .+3 jmp .+3
@@ -156,17 +156,17 @@ surf: 0
tad delx tad delx
tad o220000 tad o220000
dac i clistp dac i clistp
isz nt " nt++ isz nt
jmp 2b " } jmp 2b
jmp i surf " return true jmp i surf
1: 1:
isz surf isz surf
jmp i surf jmp i surf
drcirc: 0 " draw circle drcirc: 0
lac grvflg lac grvflg
spa spa
jmp i drcirc " if (grvflg) return jmp i drcirc
lac fcplan lac fcplan
tad prsq tad prsq
dac .+2 dac .+2
@@ -177,79 +177,79 @@ drcirc: 0 " draw circle
tad scale tad scale
cma cma
dac aexp dac aexp
fst; dtmp1 " dtmp1 = sqrt(prsq[fcplan]) / (2**scale) fst; dtmp1
fcp; thrs fcp; thrs
spa spa
jmp i drcirc " if (dtmp1 < thrs) return jmp i drcirc
fng fng
lac dpar lac dpar
cma cma
tad scale tad scale
"** 12-92-119.pdf page 17 "** 12-92-119.pdf page 17
cma cma
dac dpar " dpar /= (2**scale) dac dpar
fad; dpar fad; dpar
sfdv; dpar sfdv; dpar
fst; dtmp2 " dtmp2 = (-dtmp1 + dpar) / dpar fst; dtmp2
sfmp; spy sfmp; spy
fst; wy " wy = dtmp2 * spy fst; wy
jms inscr " if (!(AC = inscr(wy))) jms inscr
jmp i drcirc " return jmp i drcirc
dac sety " sety = AC dac sety
lac inflg lac inflg
sma sma
jms rotx " if (!inflg) rotx() jms rotx
fld; dtmp2 fld; dtmp2
sfmp; spx sfmp; spx
fst; wx " wx = dtmp2 * spx fst; wx
jms inscr " if (!(AC = inscr(wx))) jms inscr
jmp i drcirc " return jmp i drcirc
dac setx " setx = AC dac setx
fld; spy fld; spy
fng fng
fad; wy fad; wy
fst; wy " wy -= spy fst; wy
fld; spx fld; spx
fng fng
fad; wx fad; wx
fst; wx " wx -= spx fst; wx
fld; dtmp1 fld; dtmp1
sfmp; pid10 " FAC = dtmp1 * pid10 sfmp; pid10
fcp; f400 fcp; f400
spa spa
jmp 1f " if (FAC > 400) { jmp 1f
lac d400 lac d400
dac narcs " narcs = 400 dac narcs
jmp 2f " } else { jmp 2f
1: 1:
fix " AC = (int) FAC fix
tad dm20 tad dm20
spa spa
cla " if (AC - 20 < 0) AC = 0 cla
tad d20 " AC += 20 tad d20
dac narcs " narcs = AC dac narcs
flt " } flt
2: 2:
fst; dtmp1 fst; dtmp1
-1 -1
tad narcs tad narcs
cma cma
dac narcs " narcs = -narcs dac narcs
fld; f2pi fld; f2pi
sfdv; dtmp1 sfdv; dtmp1
fst; v " v = f2pi / dtmp1 fst; v
sfmp; v sfmp; v
-1 -1
tad aexp tad aexp
dac aexp dac aexp
fng fng
fad; fpone fad; fpone
fst; vv " vv = -(v*v)/2 + 1 fst; vv
lac o40004 " intens 0 lac o40004
dac i clistp dac i clistp
"** 12-92-119.pdf page 18 "** 12-92-119.pdf page 18
jms surf jms surf
jmp i drcirc " if (surf()) return jmp i drcirc
jms surf jms surf
jmp i drcirc " if (surf()) return jmp i drcirc
jmp i drcirc jmp i drcirc
+15 -15
View File
@@ -1,11 +1,11 @@
"** 12-92-119.pdf page 19 "** 12-92-119.pdf page 19
" space travel 5 " space travel 5
dsplanet: 0 " display planet center dsplanet: 0
tad points " add points address to ac (planet index) tad points
dac 9f+t dac 9f+t
lac i 9f+t lac i 9f+t
dac i clistp " set planet brightness dac i clistp
lac o246256 lac o246256
dac i clistp dac i clistp
lac o253052 lac o253052
@@ -14,8 +14,8 @@ dsplanet: 0 " display planet center
dac i clistp dac i clistp
jmp dsplanet i jmp dsplanet i
dispname: 0 " display planet name dispname: 0
tad names " add names address to ac (planet index) tad names
dac 9f+t dac 9f+t
lac i 9f+t lac i 9f+t
tad dm1 tad dm1
@@ -50,26 +50,26 @@ dispname: 0 " display planet name
t = t+2 t = t+2
dspsca: 0 " display scale dspsca: 0
lac scale " AC = scale lac scale
sma sma
jmp 1f " if (scale < 0) { jmp 1f
lac o55 "- lac o55 "-
dac dssca " dssca[0] = '-' dac dssca
-1 -1
tad scale tad scale
cma " AC = -AC cma
jmp 2f jmp 2f
1: " } else { 1:
"** 12-92-119.pdf page 20 "** 12-92-119.pdf page 20
lac o53 "+ lac o53 "+
dac dssca " dssca[0] = '+' dac dssca
lac scale lac scale
2: " } 2:
cll; idiv; 10 cll; idiv; 10
tad o60 tad o60
dac dssca+2 " dssca[2] = (AC % 10) + '0' dac dssca+2
lacq lacq
tad o60 tad o60
dac dssca+1 " dssca[1] = (AC / 10) + '0' dac dssca+1
jmp i dspsca jmp i dspsca
+6 -6
View File
@@ -69,7 +69,7 @@ umbriel: <um>;<br>;<ie>;<l
uranus: <ur>;<an>;<us>;0 uranus: <ur>;<an>;<us>;0
venus: <ve>;<nu>;<s venus: <ve>;<nu>;<s
points: .+1 " planet center point brightness points: .+1
br3 br3
br2 br2
br0 br0
@@ -109,13 +109,13 @@ fppar: .+1
48;51;54;57;60;63;66;69 48;51;54;57;60;63;66;69
72;75;78;81;84;87;90;93 72;75;78;81;84;87;90;93
ppar: .+1 " planet orbits (indices) ppar: .+1
0;0;036;015;01;016;031;031 0;0;036;015;01;016;031;031
015;015;031;031;015;0;0;0 015;015;031;031;015;0;0;0
031;036;0;022;036;016;031;0 031;036;0;022;036;016;031;0
031;0;031;031;022;036;0;0 031;0;031;031;022;036;0;0
prsq: .+1 " planet radius squared relative to earth (radius 1) prsq: .+1
016;0272245;075341 016;0272245;075341
1;0200000;0 1;0200000;0
-07;0244122;0506362 -07;0244122;0506362
@@ -150,7 +150,7 @@ prsq: .+1 " planet radius squared relative to earth (radius 1)
05;0206115;0 05;0206115;0
0;0362406;0 0;0362406;0
accl: .+1 " mass of each planet times gravitational constant accl: .+1
0;0204365;0 0;0204365;0
-023;0320324;0 -023;0320324;0
-036;0227207;0 -036;0227207;0
@@ -184,7 +184,7 @@ accl: .+1 " mass of each planet times gravitational constant
-017;0275653;0 -017;0275653;0
-023;0252667;0 -023;0252667;0
px: .+1 " planet x position relative to orbit (unit=earth radius) px: .+1
"** 12-92-119.pdf page 24 "** 12-92-119.pdf page 24
0;000000;0 0;000000;0
015;0620356;0 015;0620356;0
@@ -219,7 +219,7 @@ px: .+1 " planet x position relative to orbit (unit=earth radius)
023;0650051;0 023;0650051;0
016;0233751;0 016;0233751;0
py: .+1 " planet y position relative to orbit (unit=earth radius) py: .+1
000;0000000;0 000;0000000;0
017;0664054;0 017;0664054;0
002;0662035;0 002;0662035;0
+53 -53
View File
@@ -2,81 +2,81 @@
" space travel 7 " space travel 7
clistp = 017 clistp = 017
br0 = 040004 " intens 0 br0 = 040004
br1 = 040005 " intens 1 br1 = 040005
br2 = 040006 " intens 2 br2 = 040006
br3 = 040007 " intens 3 br3 = 040007
d10: 10 d10: 10
d3: 3 d3: 3
o246256: 0246256 " incr n=1 dir=1 (NE), n=2 dir=6 (W) o246256: 0246256
o253052: 0253052 " incr n=2 dir=4 (S), n=2 dir=2 (E) o253052: 0253052
o246036: 0246036 " incr n=1 dir=0 (N), n=1 dir=6 (W) o246036: 0246036
o177: 0177 " 7-bit mask (127) o177: 0177
nplan: 32 " number of planets nplan: 32
d1: 1 d1: 1
d20: 20 d20: 20
dm1: -1 dm1: -1
o141577: 0141577 " dsetx 895 (view right) o141577: 0141577
o161577: 0161577 " dsetx (delay) 895 (view right) o161577: 0161577
o164372: 0164372 " dsety (delay) 250 (view bottom) o164372: 0164372
o114: 0114 " ascii L o114: 0114
o20714: 020714 " ascii "CL" o20714: 020714
d383: 383 " 895 (view right) - 512 (scope width / 2) d383: 383
dm768: -768 " 127 (view left) - 895 (view right) dm768: -768
o145777: 0145777 " dsety 1023 (view top) o145777: 0145777
o165777: 0165777 " dsety (delay) 1023 (view top) o165777: 0165777
o7: 7 o7: 7
o60: 060 o60: 060
o55: 055 o55: 055
o53: 053 o53: 053
o41: 041 o41: 041
o220000: 0220000 " short vec vis o220000: 0220000
d400: 400 d400: 400
dm20: -20 dm20: -20
o40004: 040004 o40004: 040004
fardst: 020;0200000; 0 " fardst = 32768 fardst: 020;0200000; 0
f2pi: 03;0311037;552421 " 2 * pi, missing octal prefix f2pi: 03;0311037;552421
pid10: -01;0240662;756647 " pi / 10, missing octal prefix pid10: -01;0240662;756647
thrs: 02;0200000;0 " threshold = 2.0 thrs: 02;0200000;0
f400: 011;0310000;0 f400: 011;0310000;0
crash: -028;0200000;0 " crash ~ 0 crash: -028;0200000;0
stheta: 01;0200000;0 stheta: 01;0200000;0
ctheta: 0;0;0 ctheta: 0;0;0
fpzero: 0;0;0 fpzero: 0;0;0
scale: 0 scale: 0
vscale: 6 vscale: 6
ascale: -1 " loaded as a float = -1;0777773;0253436 ~ -0.5 ascale: -1
sdphi: -05;0253436;0700177 " sin(1.2 deg) sdphi: -05;0253436;0700177
cdphi: 000;0377743;0201725 " cos(1.2 deg) cdphi: 000;0377743;0201725
dhalt: 0400000 dhalt: 0400000
fpone: 01;0200000;0 fpone: 01;0200000;0
9: .=.+t 9: .=.+t
horizv: .=.+3 " horizontal velocity horizv: .=.+3
.pbson: .=.+1 .pbson: .=.+1
.pbsint: .=.+1 .pbsint: .=.+1
dspflg: .=.+1 dspflg: .=.+1
par: .=.+1 " current planet par: .=.+1
absi: .=.+1 absi: .=.+1
absx: .=.+3 absx: .=.+3
"** 12-92-119.pdf page 27 "** 12-92-119.pdf page 27
absy: .=.+3 absy: .=.+3
v: .=.+3 v: .=.+3
vv: .=.+3 vv: .=.+3
spx: .=.+3 " screen position x spx: .=.+3
spy: .=.+3 " screen position y spy: .=.+3
wx: .=.+3 wx: .=.+3
wy: .=.+3 wy: .=.+3
twx: .=.+3 twx: .=.+3
twy: .=.+3 twy: .=.+3
setx: .=.+1 setx: .=.+1
sety: .=.+1 sety: .=.+1
narcs: .=.+1 " number of arcs narcs: .=.+1
nt: .=.+1 nt: .=.+1
inflg: .=.+1 inflg: .=.+1
grvflg: .=.+1 " gravity flag grvflg: .=.+1
dtmp1: .=.+3 dtmp1: .=.+3
dtmp2: .=.+3 dtmp2: .=.+3
delx: .=.+1 delx: .=.+1
@@ -85,26 +85,26 @@ tsetx: .=.+1
tsety: .=.+1 tsety: .=.+1
accflg: .=.+1 accflg: .=.+1
locpar: .=.+1 locpar: .=.+1
crflg: .=.+1 " crash landing flag crflg: .=.+1
rpar: .=.+3 " planet radius rpar: .=.+3
dpar: .=.+3 " distance to planet dpar: .=.+3
ax: .=.+3 ax: .=.+3
ay: .=.+3 ay: .=.+3
maxa: .=.+3 " strongest gravity acceleration maxa: .=.+3
maxj: .=.+1 " index of planet with strongest gravity maxj: .=.+1
dcplan: .=.+1 dcplan: .=.+1
fcplan: .=.+1 " floating point count planet (float index) fcplan: .=.+1
cplan: .=.+1 " count planet (index) cplan: .=.+1
shipx: .=.+3 shipx: .=.+3
shipy: .=.+3 shipy: .=.+3
x: .=.+3 " x position relative to planet x: .=.+3
y: .=.+3 " y position relative to planet y: .=.+3
ox: .=.+3 ox: .=.+3
oy: .=.+3 oy: .=.+3
lanflg: .=.+1 " landing flag lanflg: .=.+1
goflg: .=.+1 " game over flag goflg: .=.+1
forflg: .=.+1 " forward flag forflg: .=.+1
bacflg: .=.+1 " backward flag bacflg: .=.+1
sphi: .=.+3 sphi: .=.+3
cphi: .=.+3 cphi: .=.+3
ftmp1: .=.+3 ftmp1: .=.+3
@@ -116,21 +116,21 @@ dsety = 0164000
vecx = 0120000 vecx = 0120000
vecy = 0124000 vecy = 0124000
m = 02000 m = 02000
displist: " display list displist:
075057 "scale 1 intens 3 blink on lp 0 sym 0 075057 "scale 1 intens 3 blink on lp 0 sym 0
dsetx 800 dsetx 800
dsety 20 dsety 20
dispcl: " display L/CL dispcl:
0 0
060004 "intens 0 blink off 060004 "intens 0 blink off
"** 12-92-119.pdf page 28 "** 12-92-119.pdf page 28
dsetx 0 dsetx 0
dsety 20 dsety 20
namedsp: " display name namedsp:
.=.+10 .=.+10
dsetx 400 dsetx 400
dsety 20 dsety 20
dssca: " display scale dssca:
.=.+3 .=.+3
040040 "scale 0 040040 "scale 0
dsetx 127 dsetx 127
@@ -152,7 +152,7 @@ dssca: " display scale
dsety 255 dsety 255
vecy 767 vecy 767
dsetx 127 dsetx 127
dsety 639 "[--- - scan markup] dsety 639
vecx 767 "[an arrow starts between vecx and dspl, it points to the right - scan markup] vecx 767
dspl: " display planets dspl:
0400000 0400000
+23 -30
View File
@@ -1,10 +1,4 @@
"** 13-120-147.pdf page 5 "** 13-120-147.pdf page 5
" TMG
" console switches:
" bit 0: do not save/dump core!!
" bit 15: trace first recognition or generate instruction & halt
" bit 16: trace all generation instructions
" bit 17: trace all recognition instructions
t=0 t=0
main: main:
lac 017777 i lac 017777 i
@@ -29,16 +23,16 @@ main:
jms advance; jmp 1f jms advance; jmp 1f
jmp rinterp jmp rinterp
0:lac 2f " get EOS 0:lac 2f
jms obuild " add to obuf jms obuild
1:lac owrite " here on retreat 1:lac owrite
spa " anything in obuf? spa
jmp 0b " no, put EOS jmp 0b
jms oflush " flush buffered output jms oflush
las " get switches las
spa " high bit set? spa
sys exit " yes: exit sys exit
sys save " no, dump core!!!! sys save
2:o777 2:o777
@@ -46,23 +40,22 @@ main:
"puts out and octal strin g from symtab entry "puts out and octal strin g from symtab entry
symoct: " BUILTIN: (output last symtab ent in octal?) symoct:
lac equ lac equ
add equbot add equbot
dac 9f+t " save temp pointer dac 9f+t
lac 1f " fetch "gf" (execute native code) inst below lac 1f
jms twoktab; lac 9f+t i " second word is contents of word *temp jms twoktab; lac 9f+t i
" first word of "two word ktab" entry: 1:gf .+1 x
1:gf .+1 x " invoke native code (below), and exit lac ii
lac ii " fetch instruction pointer dac 8
dac 8 " save in auto-increment register 8 lac 8 i
lac 8 i " fetch word after *ii add symbot
add symbot " use as offset into symtab dac 9f+t
dac 9f+t " save in temp
2:lac 9f+t i " fetch symtab word *temp 2:lac 9f+t i
jms putoct " output octal jms putoct
lac onenl " output newline lac onenl
jms obuild jms obuild
lac 9f+t i lac 9f+t i
and o600600 and o600600
+228 -286
View File
@@ -1,112 +1,96 @@
"** 13-120-147.pdf page 7 "** 13-120-147.pdf page 7
" recognition stack frame advance " recognition stack frame advance
" push stack frame: called in both recognition and generation
" (despite above comment).
" recognition frame size is 6, generation frame size is 4.
" 0: pointer to previous frame
" 1: jmp instr from after "jms advance" (for retreat/return)
" 2: saved ii (inst ptr)
" 3: saved ignore/env
" 4: saved j (always overwritten by nframe in recog. mode)
" 5: saved k
advance:0 advance:0
lac frame " get frame pointer lac frame
dac 8 " save in auto-increment register 8 dac 8
lac advance i " get (retreat) instruction after "jms advance" lac advance i
dac 8 i " save at offset 1 dac 8 i
lac ii " instruction pointer lac ii
dac 8 i " save at offset 2 dac 8 i
lac ignore " ignore mask pointer (env in recog. mode?) lac ignore
dac 8 i " save at offset 3 dac 8 i
lac j " input char pointer lac j
dac 8 i " save at offset 4 dac 8 i
lac k " result pointer lac k
dac 8 i " save at offset 5 dac 8 i
lac frame " save current frame pointer lac frame
dac nframe i " at nframe offset zero dac nframe i
lac nframe lac nframe
dac frame " set frame pointer to nframe (new frame) dac frame
add dffrmsz " add current frame size add dffrmsz
dac nframe " set new new frame pointer dac nframe
dac nframe " AGAIN??!! dac nframe
jms between; add rbot; add rtop " check for overflow jms between; add rbot; add rtop
jms halt jms halt
isz advance " skip instruction after jms isz advance
jmp advance i " return jmp advance i
" Here on failure/backup (w/ fflag set to 760000)
" AND at (successful) end of rule
" (exit/indirect bit set on last instr).
" Always restores j/k on failure:
" (no such thing as "failure" in generation mode(?))
retreat: retreat:
dzm junk dzm junk
lac gflag " in generation mode? lac gflag
sza sza
jmp 1f " yes, skip bundling jmp 1f
jms bundlep " no, bundle jms bundlep
dac junk " save pointer (may be zero if no result) dac junk
1:lac frame 1:lac frame
dac nframe " reset nframe to current frame pointer dac nframe
lac frame i " fetch prev. frame pointer from current frame lac frame i
dac frame " pop current frame dac frame
dac 8 " save in (pre) auto-increment register 8 dac 8
lac 8 i " restore saved instruction lac 8 i
dac 3f "retrun address dac 3f "retrun address
lac 8 i lac 8 i
dac ii " restore saved instruction pointer dac ii
lac 8 i lac 8 i
dac ignore " restore saved ignore ("env" in gen mode???) dac ignore
lac fflag " get failure flag lac fflag
sna " any bits set? sna
jmp 2f " no, skip jmp 2f
lac 8 i "restore j and k on failure lac 8 i "restore j and k on failure
dac j dac j
lac 8 i lac 8 i
dac k dac k
2:lac junk " get bundle/result(s) 2:lac junk
sna " got anything? sna
jmp 3f " no jmp 3f
dac nframe i "stass reslts dac nframe i "stass reslts
isz nframe isz nframe
3:jmp " (jump following original "jms advance" call) 3:jmp
" bundle up results and return single pointer to them in ac " bundle up results and return single pointer to them in ac
" return 0 if no results " return 0 if no results
"** 13-120-147.pdf page 8 "** 13-120-147.pdf page 8
bundlep:0 bundlep:0
lac fflag " check failure flag lac fflag
sza " clear? sza
jmp 2f "no results on failure jmp 2f "no results on failure
jms nframe0 " yes: get initial nframe pointer jms nframe0
dac 9f+t " save dac 9f+t
cma " get negative, minus one cma
tad nframe " add current value tad nframe
cma " get nframe0 - nframe! (-N or zero) cma
dac 9f+t+1 " save dac 9f+t+1
sma " negative result? sma
jmp 2f " no, no change jmp 2f
sad m1 " -1 (one result) sad m1
jmp 3f "only one result, no bundling necessary jmp 3f "only one result, no bundling necessary
lac 9f+t " get initial nframe lac 9f+t
tad m1 " decrement tad m1
dac 8 " save in (pre-)auto-increment reg. 8 dac 8
1:lac 8 i " fetch result 1:lac 8 i
jms kput " save in ktab jms kput
isz 9f+t+1 " increment negative count until zero isz 9f+t+1
jmp 1b " more left, continue jmp 1b
lac k "make up result pointer lac k "make up result pointer
add l.gk " return as gk instruction add l.gk
jmp bundlep i jmp bundlep i
2:cla " here with no results, return zero 2:cla
jmp bundlep i jmp bundlep i
3:lac 9f+t i " here with one result, fetch it 3:lac 9f+t i
jmp bundlep i jmp bundlep i
t=t+1 "where to find results t=t+1 "where to find results
t=t+1 "negative of result count t=t+1 "negative of result count
@@ -114,58 +98,54 @@ t=t+1 "negative of result count
" the main interpreter loop " the main interpreter loop
" locate original value of nframe for present stack level. " locate original value of nframe for present stack level.
nframe0:0 nframe0:0
jms s1get; add d.ii " fetch instr. at saved intruction pointer jms s1get; add d.ii
dac junk dac junk
lac junk i " fetch word referenced by instruction lac junk i
dac junk dac junk
lac junk i " fetch word referenced by that word!! lac junk i
and opmask " get instruction portion and opmask
sad l.rw " is it an "rw" instruction? sad l.rw
jmp 1f " yes. jmp 1f
lac refrsz " no, use recog frame size as offset lac refrsz
jmp 2f jmp 2f
1:lac junk i " get contents of word ref'ed by rw instr 1:lac junk i
and o17777 " get rw instr address portion (offset) and o17777
2:add frame " make nframe pointer 2:add frame
jmp nframe0 i " return jmp nframe0 i
" halt on various error conditions:
" various table overflows
" console switch 15 set (trace and halt)
" invalid recognize/generate opcodes
halt:0 halt:0
lac 1f lac 1f
jms obuild " output "\n?" jms obuild
lac halt lac halt
jms putoct " output return address in octal jms putoct
lac onenl lac onenl
jms obuild " output newline jms obuild
xct rstack+1 " execute retreat jump from initial advance?! xct rstack+1
1:.+1;012077;end " "\n?"; end=-1 -- two 0777 EOSes 1:.+1;012077;end
"** 13-120-147.pdf page 9 "** 13-120-147.pdf page 9
rinterp: " recognition mode interpreter rinterp:
las "trace check las "trace check
and d5 and d5
sna sna
jmp .+3 jmp .+3
lac bugr lac bugr
jms bug " trace jms bug
lac fflag " fetch failure flag lac fflag
ral " rotate top bit into LINK ral
lac ii i " fetch current instruction lac ii i
and opmask " get opcode and opmask
sad l.ra " "ra" (conditional branch on LINK set/fail)? sad l.ra
jmp rera " yes jmp rera
sad l.rb " "rb" (conditional branch on LINK clear/succ)? sad l.rb
jmp rerb " yes jmp rerb
szl " LINK set (failure)? szl
jmp retreat " yes: retreat!! jmp retreat
lrs 14 " no: shift opcode bits down lrs 14
and o17 " isolate opcode bits and o17
add rbranch " create indirect jmp thru rbranch tabe add rbranch
dac .+1 " save as next dac .+1
jmp jmp
rbranch: rbranch:
@@ -173,7 +153,7 @@ rbranch:
reno reno
rerx rerx
rerc rerc
regc " opcode is "rt"! regc
rerf rerf
rerw rerw
rera rera
@@ -187,112 +167,104 @@ rbranch:
reuu reuu
reuu reuu
reuu: " recognition unused operation reuu:
jms halt " halt jms halt
rerb: " recognition "rb" instruction rerb:
cml " complement LINK bit cml
rera: " recognition "ra" instruction rera:
dzm fflag " clear failure flag dzm fflag
snl " LINK bit set? snl
jmp goon " no: continue (w/ exit check) jmp goon
jms aget " yes: fetch address part jms aget
dac ii " save as new instruction pointer dac ii
jmp rinterp " go on (w/o exit check) jmp rinterp
backup: " here on failure from "rx", eof, char builtins backup:
lac jsav lac jsav
dac j dac j
nuts: " here on failure from find/prev builtins nuts:
" (could possibly be used as a "fail" builtin?) law
law " get 0760000
"** 13-120-147.pdf page 10 "** 13-120-147.pdf page 10
dac fflag " set failure flag dac fflag
reno: " recognition no(op) instruction reno:
goon: " "go on" on success from recog. builtins, ops goon:
lac ii i " fetch current instruction lac ii i
isz ii " advance instruction pointer isz ii
and exitmask " was exit (indirect) bit set on prev instr? and exitmask
sza sza
jmp retreat " yes, retreat/return jmp retreat
jmp rinterp " no, go on jmp rinterp
rerw: " recognition rw instr (nframe0 looks for one!) rerw:
jms aget " get address portion of instruction jms aget
add frame " use as frame size add frame
dac nframe " set nframe pointer dac nframe
jmp goon jmp goon
rerc: " recognition rc (call tmg code) instruction rerc:
jms advance; jmp goon " push new frame, continue on retreat jms advance; jmp goon
jms aget " get address from instruction jms aget
dac ii " use as new instruction pointer dac ii
jmp rinterp " go on (w/o exit check) jmp rinterp
gegf: " gen. "gf" intr (invoke builtin func) gegf:
rerf: " recognition rf inst (invoke builtin func) rerf:
jms aget " get address from instruction jms aget
add ljmp " make into abs jmp to native code add ljmp
dac .+1 dac .+1
jmp " go to native code jmp
rerx: " recognition rx instruction (compare lit str) rerx:
lac j lac j
dac jsav " save j (input char pointer) in jsav dac jsav
jms aget " get address from instruction jms aget
1:dac 9f+t 1:dac 9f+t
jms lchar " get lit character jms lchar
sad o777 " EOS? sad o777
jmp goon " yes, continue (success) jmp goon
dac 9f+t+1 " no, save char dac 9f+t+1
jms getj " get next input char jms getj
sad 9f+t+1 " as expected? sad 9f+t+1
jmp 2f " yes jmp 2f
jmp backup " no: restore j and fail. jmp backup
2:lac 9f+t " continue matching (increment lit ptr) 2:lac 9f+t
add o400000 add o400000
jmp 1b jmp 1b
t=t+1 "address of next comparison char t=t+1 "address of next comparison char
t=t+1 "character itself t=t+1 "character itself
aget:0 " fetch address portion of current instruction aget:0
lac ii i lac ii i
and o17777 and o17777
jmp aget i jmp aget i
" Places copy of instruction with exit bit set on stack. regc:
" Interpreted as a "gc" instruction (see note at gegc). lac ii i
regc: " recognition "rt" instruction [sic] and o757777
lac ii i " fetch instruction word xor exitmask
and o757777 " clear exit bit dac nframe i
xor exitmask " set (toggle) exit bit
dac nframe i " push @nframe
"** 13-120-147.pdf page 11 "** 13-120-147.pdf page 11
isz nframe " advance nframe pointer isz nframe
jmp goon " succeed jmp goon
" push result in AC at "k" (kbuf)
" called from bundlep and twice from twoktab (two word ktab entry)
" returns w/ AC unmodified, k contains index of new entry
kput:0 kput:0
isz k isz k
dac junk1 dac junk1
lac k lac k
jms between; add d0; add kmax jms between; add d0; add kmax
jms halt " halt on ktab overflow jms halt
add kbot add kbot
dac junk dac junk
lac junk1 lac junk1
dac junk i dac junk i
jmp kput i jmp kput i
" fetch word from current frame using "add offset" following jms.
" Only used by parsedo, to restore k.
s0get:0 s0get:0
lac frame lac frame
xct s0get i xct s0get i
@@ -301,8 +273,6 @@ s0get:0
isz s0get isz s0get
jmp s0get i jmp s0get i
" fetch word via ptr in current frame using "add offset" following jms.
" Only used by nframe0, w/ "ii" instruction pointer
s1get:0 s1get:0
lac frame i lac frame i
xct s1get i xct s1get i
@@ -311,8 +281,6 @@ s1get:0
isz s1get isz s1get
jmp s1get i jmp s1get i
" set word in current frame using "add offset" following jms.
" Only used by "gk" instruction to set "ii"
s0put:0 s0put:0
lmq lmq
lac frame lac frame
@@ -325,145 +293,119 @@ s0put:0
" here is the generaion interpreter " here is the generaion interpreter
" the k table cant move while its active " the k table cant move while its active
geno: " gen. noop instruction geno:
ggoon: " "go on" from gen. builtins, ops ggoon:
lac ii i " fetch prev instr lac ii i
isz ii " increment isz ii
and exitmask " isolate exit bit and exitmask
sza sza
jmp retreat " exit bit set, return. jmp retreat
ginterp: ginterp:
las "trace check las "trace check
and d6 and d6
sna sna
jmp .+3 jmp .+3
lac bugg lac bugg
jms bug " trace jms bug
lac ii i " fetch current instruction lac ii i
lrss 14 " shift down to opcode lrss 14
and o7 " get low 3 of opcode and o7
"** 13-120-147.pdf page 12 "** 13-120-147.pdf page 12
add gbranch " make indirect branch thru gbranch table add gbranch
dac .+1 " save as next instruction dac .+1
jmp jmp
gbranch: gbranch:
jmp .+1 i jmp .+1 i
geno geno
gegx gegx
geuu " was once "gz" (in bugg tab) geuu
gegc gegc
gegf gegf
gegk gegk
gegp gegp
gegq gegq
geuu: " gen. ununimplemented instruction geuu:
jms halt jms halt
" pdp-11 analog is .txs? output string gegx:
gegx: " gen. "gx" instruction lac ii i
lac ii i " fetch instruction and o417777
and o417777 " extract character address jms obuild
jms obuild " copy to output jmp ggoon
jmp ggoon " continue (checking for exit)
" pdp-11 analog may be .tq: load translation parameter ($1, $2)?? gegq:
" manual says: jms advance; jmp ggoon
" A translation rule may have parameters, and if it
" does, their number is declared by a parenthesized
" integer prefixed to its body.
gegq: " gen. "gq" instruction
jms advance; jmp ggoon " push state
lac env lac env
add d.ii " get addr of env->ii add d.ii
dac junk dac junk
jms aget " get address portion of gq instruction jms aget
add junk i " add value at *env->ii add junk i
dac junk dac junk
lac junk i " fetch *(*env->ii + aget()) lac junk i
dac ii " save param list ptr as instruction pointer?
lac env
add d.env " get addr env->env
dac junk
lac junk i " fetch env->env
dac env " restore env ptr (pop env)
jmp ginterp " go on (w/o exit check)
" pdp-11 analog is .tp?
" execute rule called for by 1 2 ...
" found relative to instruction counter in the k environment
gegp: " gen. "gp" instruction
jms advance; jmp ggoon " push current state
lac env " get saved env pointer
add d.ii " get pointer to saved instruction pointer
dac junk " save in temp
lac frame i " get prev frame pointer
dac env " save as env pointer
jms aget " get address portion of instruction
cma " one's complement negation + one's c. add!!
add junk i " back up env instruction pointer by -aget()
dac ii dac ii
jmp ginterp " go on (w/o exit check) lac env
add d.env
dac junk
lac junk i
dac env
jmp ginterp
" pdp-11 comment @ gk: gegp:
" delivered compound translation jms advance; jmp ggoon
" instruction counter is in ktable lac env
" set the k environment for understanding 1, 2 ... add d.ii
" to designate this frame dac junk
" PDP-7 NOTES: only place that sets "env" w/o reading first; lac frame i
" twoktab stores gk instructions in ktab. dac env
gegk: " gen. "gk" instruction jms aget
lac ii i " load instruction (value ignored) cma
jms aget " get address portion of instruction add junk i
add kbot " add to ktab base dac ii
dac ii " store as new instruction pointer jmp ginterp
jms s0put; add d.ii " set frame saved instruction pointer too
lac frame " get frame pointer gegk:
lac ii i
jms aget
add kbot
dac ii
jms s0put; add d.ii
lac frame
"** 13-120-147.pdf page 13 "** 13-120-147.pdf page 13
dac env " save as env pointer dac env
jmp ginterp " go on (w/o exit check) jmp ginterp
" NOTE: recognition opcode "rt" (code at label regc!) places gegc:
" a copy of itself, with exit bit set on stack, since rt and jms advance; jmp ggoon
" gc use the same opcode, the stacked instruction comes here jms aget
" (addr points to "gen" code), so it calls the referenced code. dac ii
gegc: " gen. "gc" inst (call tmg coded subroutine) jmp ginterp
jms advance; jmp ggoon " push current state
jms aget " get address from instruction
dac ii " use as new instruction pointer
jmp ginterp " go on (w/o exit check)
" trace routine (not a bug!)
" invoked from rinterp if switch 15 or 17 set (mask 05)
" invoked from ginterp if switch 15 or 16 set (mask 06)
" calls halt if switch 15 set (mask 04)
bug:0 bug:0
dac 1f+2 " save pointer to instruction names dac 1f+2
lac onenl " output newline lac onenl
jms obuild jms obuild
lac ii " output instruction address in octal lac ii
jms putoct jms putoct
lac ii i " get instruction lac ii i
lrs 14 lrs 14
and o17 " get high four bits (opcode) and o17
add 1f+2 " add to instruction name list pointer add 1f+2
dac 1f+2 " save (into output string!) dac 1f+2
lac 1f+2 i " fetch two character instruction name lac 1f+2 i
dac 1f+2 " save back into output string dac 1f+2
lac 1f " get pointer to output string lac 1f
jms obuild " output jms obuild
lac ii i " get instruction lac ii i
jms putoct " output in octal jms putoct
las " get console switches las
and d4 " is bit 15 set? and d4
sza " no. sza
jms halt " yes: halt (output return address, then quit) jms halt
jmp bug i " no: continue. jmp bug i
1:0400000 .+1; 040; 0; 040777 " char ptr to <SPACE> XX <SPACE> <EOS> 1:0400000 .+1; 040; 0; 040777
" where XX will be instr name
+160 -175
View File
@@ -1,172 +1,161 @@
"** 13-120-147.pdf page 14 "** 13-120-147.pdf page 14
" move characters
" call with source address in AC
" dest addr after "jms move" instruction
move: 0 move: 0
dac 9f+t " save source addr dac 9f+t
lac move i " get dest addr lac move i
1:dac 2f " save dest addr after dchar call 1:dac 2f
lac 9f+t " restore source addr lac 9f+t
jms lchar " load char jms lchar
dac 9f+t+1 " save source char dac 9f+t+1
jms dchar " store char jms dchar
2: 0 " dest addr 2: 0
lac 9f+t+1 " examine source char lac 9f+t+1
sad o777 " EOS? sad o777
jmp 3f " yes jmp 3f
lac o400000 " get char addr increment lac o400000
add 9f+t " add to source addr add 9f+t
dac 9f+t " save incremented source addr dac 9f+t
lac o400000 " get char addr increment lac o400000
add 2b " get incremented dest addr add 2b
jmp 1b " go back to top of loop (save dest addr) jmp 1b
3:isz move " skip dest addr arg 3:isz move
lac 2b " return dest addr lac 2b
jmp move i jmp move i
t=t+1 "source address t=t+1 "source address
t=t+1 "source character t=t+1 "source character
" load character
" takes source character address in AC
lchar:0 lchar:0
dac junk " save source address dac junk
ral " rotate addr up (high bit into link) ral
lac junk i " fetch source word lac junk i
snl " link set? snl
lrs 9 " no: move high 9 down lrs 9
and o777 " get just 9 bits and o777
jmp lchar i " return jmp lchar i
" deposit character
" takes dest addr after jms instruction
dchar:0 dchar:0
lmq " save char in MQ lmq
lac dchar i " get dest addr lac dchar i
dac junk " save dac junk
spa " high bit set? spa
jmp 1f " yes: get mask for high 9 jmp 1f
llss 9 " no: shift AC/MQ up 9 (LINK fills MQ low bits) llss 9
lac o777 " get mask for low 9 lac o777
jmp .+2 jmp .+2
1:0777000 " get mask for high 9 1:0777000
and junk i " and dest word w/ mask and junk i
omq " or MQ in omq
dac junk i " deposit in dest word dac junk i
isz dchar " increment return to skip dest addr isz dchar
jmp dchar i " return jmp dchar i
" gets designated character from input " gets designated character from input
" (reads block from disk if needed)
" does not increment j
jget:0 jget:0
1:lac j " get input char addr [here also from jmore] 1:lac j
jms cbetween; add jmin; add jmax " in current block? jms cbetween; add jmin; add jmax
jmp jmore " no: not in memory, read block jmp jmore
cma cma
add jmin add jmin
cma " get j-jmin cma
add jbot " make buffer address add jbot
jms lchar " fetch character from buffer jms lchar
jms class; add ignore " char in "ignore" mask? jms class; add ignore
"** 13-120-147.pdf page 15 "** 13-120-147.pdf page 15
jmp jget i " no: return character jmp jget i
lac j " yes: get source char addr lac j
add o400000 " increment add o400000
dac j " save dac j
jmp 1b " try again (may have crossed block boundary) jmp 1b
" read more input - filthy code, enough to make disk & " read more input - filthy code, enough to make disk &
" terminal input work. Theae only deliver full count " terminal input work. Theae only deliver full count
" except at eof or 1 word " except at eof or 1 word
jmore: jmore:
and o377700 " get char offset for start of block and o377700
dac jmin " save as first dac jmin
add ljsiz " add buf size add ljsiz
dac 9f+t " save in t0 dac 9f+t
lac jmax " get current end addr lac jmax
jms cbetween; add jmin; add 9f+t " in range jmin<=jmax<t0? jms cbetween; add jmin; add 9f+t
lac jmin " not in range: get jmin lac jmin
dac jmax " save as new jmax dac jmax
dac 1f " and for seek dac 1f
cma cma
add jmin " 1's complement add! add jmin
cma " get jmin-jmax cma
add jbot " make buffer address add jbot
dac 2f " save as read dest dac 2f
lac input " get input fd lac input
sys seek " seek fd sys seek
1:0;0 1:0;0
-1 " get 0777777 -1
dac 2f i " save in first word of read buffer dac 2f i
lac input " get input fd lac input
sys read " read (ptr, count follow) sys read
2:0;jsiz 2:0;jsiz
sna " get anything? sna
lac d1 " zero: get 1 instead (will fetch 0777) lac d1
add jmax " add to block base add jmax
dac jmax " save as max char dac jmax
jmp jget+1 " try jget again jmp jget+1
t=t+1 t=t+1
" gets next character from input " gets next character from input
" called only from "rx" instruction
getj:0 getj:0
lac j " input char addr lac j
jms jget " get character jms jget
dac junk " save dac junk
lac j " increment character addr lac j
add o400000 add o400000
dac j dac j
lac junk " return character lac junk
jmp getj i jmp getj i
" compare two strings - assume both left justified " compare two strings - assume both left justified
" called only from "find"
" takes one addr in AC, other following jms
" skips on match(?)
comp:0 comp:0
dac 9f+t " save first argument pointer dac 9f+t
lac comp i " fetch word after jms lac comp i
dac 9f+t+1 " save second argument pointer dac 9f+t+1
isz comp " skip argument word isz comp
1:lac 9f+t i " top of loop: fetch word from arg1 1:lac 9f+t i
sad 9f+t+1 i " compare to arg2 sad 9f+t+1 i
"** 13-120-147.pdf page 16 "** 13-120-147.pdf page 16
jmp 3f " identical: check for EOS jmp 3f
and 9f+t+1 i "do both start with eof? and 9f+t+1 i "do both start with eof?
spa " no: return without skip spa
2:isz comp " yes, give skip return 2:isz comp
jmp comp i jmp comp i
3:and o600600 "is there an eof? 3:and o600600 "is there an eof?
sza " NO sza
jmp 2b " YES: saw EOS w/ matching words: skip return jmp 2b
isz 9f+t " no EOS, increment ptr 1 isz 9f+t
isz 9f+t+1 " increment ptr 2 isz 9f+t+1
jmp 1b " loop. jmp 1b
t=t+1 "address of string 1 t=t+1 "address of string 1
t=t+1 "address of string 2 t=t+1 "address of string 2
obuild:0 " copy string to output obuild:0
lmq " save char addr in AC in MQ lmq
lac owrite " get obuf index lac owrite
add obot " get obuf addr add obot
dac 2f " save as move dest dac 2f
lacq " get char addr back lacq
1:jms move " move 1:jms move
2:0 " move dest 2:0
cma cma
add obot add obot
cma cma
dac owrite dac owrite
jms cbetween; add d0; add omax " obuf full? jms cbetween; add d0; add omax
skp " yes skp
jmp obuild i " no: return jmp obuild i
lac lochunk lac lochunk
jms oflush jms oflush
@@ -187,92 +176,88 @@ oflush:0
" outputs octal string from sesignated value " outputs octal string from sesignated value
octal: " BUILTIN octal:
isz ii " increment instruction pointer isz ii
lac ii i " fetch instruction word lac ii i
dac 2f " save as geoctal argument?? dac 2f
lac 1f " fetch "gf geoctal x" instr lac 1f
jms twoktab " make two word ktab entry and goon jms twoktab
lac 2f i lac 2f i
1:gf geoctal x 1:gf geoctal x
2:0 " copy of inst word after octal invocation 2:0
" (ptr to word to output????)
"** 13-120-147.pdf page 17 "** 13-120-147.pdf page 17
geoctal: " native code invoked by "gf" inst in ktab geoctal:
lac ii " get instruction pointer lac ii
dac 8 " save in auto-pre-increment reg 8 dac 8
lac 8 i " fetch second ktab word lac 8 i
jms putoct " output as octal jms putoct
jmp ggoon " success jmp ggoon
" converts word in ac into ocatl on output stream " converts word in ac into ocatl on output stream
putoct:0 putoct:0
dac 9f+t " save output value dac 9f+t
lac 7f " output "0" lac 7f
jms obuild jms obuild
dzm 9f+t+2 " clear non-zero digit flag dzm 9f+t+2
-6 -6
dac 9f+t+1 " init digit count to -6 dac 9f+t+1
1:lac 9f+t " get value 1:lac 9f+t
cll " clear link cll
lrs 15 " get high 3 bits right justified lrs 15
add o60 " convert to ASCII digit add o60
dac 8f+1 " save in output buffer dac 8f+1
lls 18 " left justify remaining bits lls 18
dac 9f+t " save back in value dac 9f+t
lac 9f+t+2 "have nonzero digits been seen? lac 9f+t+2 "have nonzero digits been seen?
sza sza
jmp 2f " yes: go output jmp 2f
lac 8f+1 "no,is this nonzero? lac 8f+1 "no,is this nonzero?
sad o60 sad o60
jmp 3f "no jmp 3f "no
2:lac 8f " output non-zero digit 2:lac 8f
jms obuild jms obuild
law " get 760000 law
dac 9f+t+2 " save as non-zero digit seen flag dac 9f+t+2
3:isz 9f+t+1 " increment digit count 3:isz 9f+t+1
jmp 1b " non-zero: keep going jmp 1b
jmp putoct i " count now zero: return jmp putoct i
t=t+1 "value to convert t=t+1 "value to convert
t=t+1 "digit count t=t+1 "digit count
t=t+1 "nonzero digit flag t=t+1 "nonzero digit flag
7: .+1; 060777 " "0" + EOS 7: .+1; 060777
8:0400000 .+1;0;end " digit, two 0777 EOS bytes 8:0400000 .+1;0;end
eof: " BUILTIN (succeed at EOF) eof:
lac j lac j
dac jsav " save j dac jsav
jms jget jms jget
sad o777 " at EOF? sad o777
jmp goon " yes, succeed jmp goon
jmp backup " no, restore j from jsav, and fail jmp backup
"
" called with jms class; add chrtabptr
" skip on return if char in AC in referened character table
class:0 class:0
dac junk1 " save input char dac junk1
lrss 7 lrss 7
sza " high (0200) bit of input set? sza
jmp 2f " yes, fail jmp 2f
lls 3 " get word number (16 bits per word) lls 3
xct class i " execute "add table" instr after "jms class" xct class i
isz class " skip the add on return isz class
dac junk " save word pointer dac junk
"** 13-120-147.pdf page 18 "** 13-120-147.pdf page 18
cla cla
llss 4 " get low four of character (bit number) llss 4
add l.llss " make into lls instr add l.llss
dac 1f dac 1f
lac junk i " get word from mask lac junk i
1:llss " shift up by bit number (into sign bit) 1:llss
spa " bit set? spa
2:isz class " yes: give skip return 2:isz class
lac junk1 " restore character lac junk1
jmp class i jmp class i
+82 -85
View File
@@ -1,115 +1,112 @@
"** 13-120-147.pdf page 19 "** 13-120-147.pdf page 19
" put symbuf symbol into table " put symbuf symbol into table
table: " BUILTIN table:
lac equwrite " get equtab write index lac equwrite
dac equ " save as last found dac equ
jms between; add d0; add equmax jms between; add d0; add equmax
jms halt " overflow jms halt
add delta " increment add delta
dac equwrite " save as next to write dac equwrite
lac equ " get our entry index lac equ
add equbot " get our entry address add equbot
tad m1 " decrement for pre-auto-increment tad m1
dac 8 " save in auto-increment reg dac 8
lac symwrite " get name index into symtab lac symwrite
dac 8 i " save in equtab dac 8 i
add symbot " get symtab addr add symbot
dac 2f " save as move dest dac 2f
lac mdelta " get negative equtab entry word count lac mdelta
1:dzm 8 i " zero equtab word 1:dzm 8 i
tad d1 " increment count tad d1
spa " positive? spa
jmp 1b " no, loop and zero another jmp 1b
lac sbbot " yes, get symbuf base lac sbbot
jms move " copy string into symtab (string table) jms move
2:0 2:0
add o400000 " increment char addr add o400000
cma cma
add symbot add symbot
cma cma
add o400000 add o400000
and o17777 and o17777
dac symwrite " save new symtab write pointer dac symwrite
jms between; add d0; add symmax jms between; add d0; add symmax
jms halt " symtab overflow jms halt
jmp goon " success jmp goon
" find occurrence of symbuf symbol in equtab " find occurrence of symbuf symbol in equtab
prev: " BUILTIN prev:
lac equ " last entry found/created lac equ
jmp find+1 " start search jmp find+1
find: " BUILTIN find:
lac equwrite " get end index to equ table lac equwrite
dac 9f+t " save dac 9f+t
lac o777 " get EOS lac o777
jms sbput " append to sbbuf jms sbput
lac sbbot " get sbbuf base lac sbbot
dac 2f " stash as "comp" argument 2 (loop invariant) dac 2f
1:lac 9f+t " get equbuf index 1:lac 9f+t
tad mdelta " decrement (by two) tad mdelta
dac 9f+t " save dac 9f+t
spa " still positive? spa
jmp nuts " no: return failure jmp nuts
add equbot " turn into equbuf pointer add equbot
dac junk " save as temp dac junk
lac junk i " get symtab entry offset lac junk i
add symbot " get symtab entry address add symbot
jms comp " compare jms comp
2:0 " compare arg2 here 2:0
jmp 1b " non-skip return: continue jmp 1b
lac 9f+t " skipped: get offset lac 9f+t
dac equ " save as last found dac equ
"** 13-120-147.pdf page 20 "** 13-120-147.pdf page 20
jmp goon " success! jmp goon
t=t+1 "next equtab location to test t=t+1 "next equtab location to test
sbput:0 " put character in AC into symbuf (sbbuf) sbput:0
lmq " save character in MQ lmq
lac sbwrite " get sbbut write index lac sbwrite
add sbbot " add to start of sbbuf add sbbot
dac 1f " save as dchar dest dac 1f
lacq " get char back lacq
jms dchar " save jms dchar
1:0 1:0
lac sbwrite " get sbbuf write index lac sbwrite
add o400000 " increment add o400000
dac sbwrite " save back dac sbwrite
jms cbetween; add d0; add sbmax jms cbetween; add d0; add sbmax
jms halt " sbbuf overflow jms halt
jmp sbput i jmp sbput i
getname: " BUILTIN getname:
lac equ " get last entry index lac equ
add equbot " get equtab addr (addr of pointer to string) add equbot
dac 9f+t " save in temp dac 9f+t
lac 1f " get "gf" instruction lac 1f
jms twoktab; lac 9f+t i " make 2-work ktab entry (does not return) jms twoktab; lac 9f+t i
1:gf .+1 x " jump to native code & exit 1:gf .+1 x
lac ii " get instruction pointer lac ii
dac 8 " save in auto-pre-increment reg 8 dac 8
lac 8 i " fetch next word (symtab index) lac 8 i
add symbot " make pointer into symtab add symbot
and o17777 " get just address and o17777
jms obuild " send to output jms obuild
jmp ggoon " success jmp ggoon
t=t+1 "equtable entry t=t+1 "equtable entry
" puts double word entries in ktab and gives " puts double word entries in ktab and gives
"pointer to first as result "pointer to first as result
" takes first word (addr for gk instr) in AC
" and indirect load instr after "jms twoktab"
" Called (as final action) by builtins (symoct,octal,getname)
" DOES NOT RETURN!!!
twoktab:0 twoktab:0
jms kput " save AC in ktab jms kput
lac l.gk lac l.gk
add k " make gk intruction, pointing to new entry add k
dac nframe i " push onto nframe dac nframe i
isz nframe isz nframe
xct twoktab i " execute lac i instruction after "jms twoktab" xct twoktab i
jms kput " save in ktab as second word jms kput
jmp goon " success jmp goon
+38 -38
View File
@@ -1,75 +1,75 @@
"** 13-120-147.pdf page 21 "** 13-120-147.pdf page 21
char: " BUILTIN: match one char from bitset or fail. char:
lac j lac j
dac jsav dac jsav
isz ii isz ii
jms ctest jms ctest
jmp backup " not in bitset: restore j from jsav, fail jmp backup
jmp goon jmp goon
string: " BUILTIN: match zero or more chars from bitset string:
isz ii isz ii
jms ctest jms ctest
jmp goon " not in bitset, quit (but do not fail) jmp goon
jmp string+1 jmp string+1
ctest:0 ctest:0
jms jget jms jget
jms class; add ii i " bitset check w/ table ptr *ii jms class; add ii i
jmp ctest i " char not in bitset, return w/o skip jmp ctest i
jms sbput " matched: add to symbuf jms sbput
lac j " increment j (char ptr) lac j
add o400000 add o400000
dac j dac j
isz ctest " give skip return isz ctest
jmp ctest i jmp ctest i
mark: " BUILTIN: clear symbuf mark:
jms jget " consume ignored characters jms jget
dzm sbwrite dzm sbwrite
jmp goon jmp goon
parsedo: " BUILTIN: invoke rule parsedo:
isz ii isz ii
jms advance; jmp 3f " on retreat restore k jms advance; jmp 3f
jms advance; jmp 1f " on retreat switch to generation jms advance; jmp 1f
jms aget " get new instruction pointer jms aget
dac ii dac ii
jmp rinterp jmp rinterp
1:lac frame " on retreat (second advance call) 1:lac frame
add refrsz add refrsz
dac ii " set instruction pointer to "nframe" dac ii
sad nframe " was anything pushed onto nframe?? sad nframe
jmp retreat " no: retreat again. jmp retreat
dac gflag " yes: set gflag (don't bundle on retreat) dac gflag
lac gefrsz lac gefrsz
dac dffrmsz " change (advance) frame size to generate size dac dffrmsz
jms advance; jmp 2f " on retreat switch back to recognition mode jms advance; jmp 2f
jmp ginterp " interpret generate instructions! jmp ginterp
2:lac refrsz " on retreat from generate mode 2:lac refrsz
dac dffrmsz " switch back to recognition sized frames dac dffrmsz
add frame add frame
dac nframe " reset nframe pointer dac nframe
dzm gflag " clear gflag (resume bundling on retreat) dzm gflag
jmp retreat " retreat (again)!! jmp retreat
3:jms s0get; add d.k " on retreat (first advance call) 3:jms s0get; add d.k
dac k " restore k from current frame dac k
jmp goon jmp goon
bundle: " BUILTIN: bundle results bundle:
jms bundlep " get bundle of results (if more than one) jms bundlep
"** 13-120-147.pdf page 22 "** 13-120-147.pdf page 22
dac 9f+t dac 9f+t
sna " got any? sna
jmp goon " nope. success. jmp goon
jms nframe0 " look for original nframe jms nframe0
dac nframe " restore dac nframe
lac 9f+t " get bundle result ptr (in ktab if multi-word) lac 9f+t
dac nframe i " push @nframe dac nframe i
isz nframe isz nframe
jmp goon jmp goon
t=t+1 t=t+1
+108 -110
View File
@@ -1,63 +1,63 @@
"** 13-120-147.pdf page 23 "** 13-120-147.pdf page 23
rerm: " recognition "rm" instruction rerm:
jms aget " get address portion (abs addr) jms aget
jmp 1f " join "rs"to fetch jmp 1f
rers: " recognition "rs" instruction rers:
jms aget " get address portion (positive frame offset) jms aget
add frame " add frame pointer add frame
1:dac holdlv " save as "hold lvalue" 1:dac holdlv
lac holdlv i " fetch addressed word lac holdlv i
jmp 2f " go push jmp 2f
rerv: " recognition "rv" instruction rerv:
jms aget " get address portion jms aget
lls 6 " discard high six bits lls 6
lrs 6 " replac with six copies of LINK bit lrs 6
2:dac nframe i " save @nstack 2:dac nframe i
isz nframe " increment isz nframe
jmp goon " success jmp goon
rero: " recognition "ro" (opr) instruction rero:
jms decnf " pop top of nstack jms decnf
dac rand1 " save as (op)rand 1 dac rand1
jms aget " get address portion of instruction jms aget
and o77 " get low six bits for sub-opcode and o77
add obranch " make xct into o(pr)branch table add obranch
dac 2f " save dac 2f
cma " negate (minus one) cma
tad unary " add unary base xct tad unary
spa " positive? spa
jmp 1f " no: was unary, skip second arg fetch jmp 1f
jms decnf " yes: binary op, pop second arg from nstack jms decnf
dac rand2 " save as second (ope)rand dac rand2
1:lac rand1 " get first (ope)rand in AC 1:lac rand1
2:xct " execute instruction from obranch table 2:xct
jmp result " if noop, join result processing jmp result
obranch: obranch:
xct .+1 xct .+1
opr ;op=0400000+1 " (no)op opr ;op=0400000+1
jmp rorel ;le=op;op=op+1 " relop <= jmp rorel ;le=op;op=op+1
jmp rorel ;ne=op;op=op+1 " relop != jmp rorel ;ne=op;op=op+1
jmp rorel ;lt=op;op=op+1 " relop < jmp rorel ;lt=op;op=op+1
jmp rorel ;ge=op;op=op+1 " relop >= jmp rorel ;ge=op;op=op+1
jmp rorel ;eq=op;op=op+1 " relop == jmp rorel ;eq=op;op=op+1
jmp rorel ;gt=op;op=op+1 " relop > jmp rorel ;gt=op;op=op+1
tad rand2 ;ad=op;op=op+1 " binop + tad rand2 ;ad=op;op=op+1
jms sub ;sb=op;op=op+1 " binop - jms sub ;sb=op;op=op+1
and rand2 ;an=op;op=op+1 " binop & and rand2 ;an=op;op=op+1
jmp roor ;or=op;op=op+1 " binop | jmp roor ;or=op;op=op+1
xor rand2 ;xo=op;op=op+1 " binop ^ (xor) xor rand2 ;xo=op;op=op+1
jmp rosr ;sr=op;op=op+1 " binop << jmp rosr ;sr=op;op=op+1
jmp rosl ;sl=op;op=op+1 " binop >> jmp rosl ;sl=op;op=op+1
jmp romn ;mn=op;op=op+1 " binop min?? jmp romn ;mn=op;op=op+1
jmp romx ;mx=op;op=op+1 " binop max?? jmp romx ;mx=op;op=op+1
lac rand2 ;as=op;op=op+1 " binop ??? (always returns rh operand) lac rand2 ;as=op;op=op+1
opr ;pl=op;op=op+1 " unary + (noop) opr ;pl=op;op=op+1
jmp romi ;mi=op;op=op+1 " unary - (negate) jmp romi ;mi=op;op=op+1
cma ;cm=op;op=op+1 " unary ~ (complement) cma ;cm=op;op=op+1
jmp roindir;indir=op;op=op+1 " unary indirect (fetch *holdlv) jmp roindir;indir=op;op=op+1
lac holdlv ;addr=op;op=op+1 " unary addr (return last holdlv) lac holdlv ;addr=op;op=op+1
unary:xct obranch+1+pl unary:xct obranch+1+pl
rorel: "<= 001 rorel: "<= 001
@@ -78,8 +78,6 @@ rorel: "<= 001
cma cma
jmp result jmp result
" return rand1 minus rand2
" used by rorel, rosub
sub:0 sub:0
cma cma
tad rand2 tad rand2
@@ -87,79 +85,79 @@ sub:0
jmp sub i jmp sub i
roor: roor:
lmq " save rand1 in MQ lmq
lac rand2 " get rand2 in AC lac rand2
omq " or AC and MQ omq
jmp result jmp result
rosr: rosr:
lac rand2 " get rh operand lac rand2
add l.lrs " make long right shift (fills with LINK) add l.lrs
cll " clear link cll
jmp 1f jmp 1f
rosl: rosl:
lac rand2 " get rh operand lac rand2
add l.lls " make long left shift (fills from MQ) add l.lls
clq " clear MQ clq
1:dac .+2 " save shift instruction 1:dac .+2
lac rand1 " get left hand operand lac rand1
0 " perform shift 0
jmp result " join result processing jmp result
romn: romn:
jms sub " get rand1-rand2 jms sub
cma " complement (rand2-rand1-1) cma
jmp .+2 jmp .+2
romx: romx:
jms sub " get rand1-rand2 jms sub
ral " rotate left (sign bit into LINK) ral
lac rand1 " get first operand lac rand1
szl " link clear? szl
lac rand2 " no, get second operand instead lac rand2
jmp result " return result jmp result
romi: " unary minus romi:
cma " complement cma
tad d1 " add one tad d1
jmp result jmp result
roindir: roindir:
dac holdlv " save as "hold lvalue" dac holdlv
lac holdlv i " fetch value lac holdlv i
"** 13-120-147.pdf page 25 "** 13-120-147.pdf page 25
jmp result " return result jmp result
result: " ro result processing result:
dac junk " save in temp dac junk
dac nframe i " store at *nframe++ dac nframe i
isz nframe isz nframe
lac ii i " fetch original instruction lac ii i
and stbit " get st(ore?) bit and stbit
sna " set? sna
jmp exprtest " no jmp exprtest
lac junk " yes: get result lac junk
dac holdlv i " store at *holdlv dac holdlv i
lac ii i " fetch original instruction lac ii i
and fibit " fi(nal?) bit set? and fibit
sza " no, skip sza
jms decnf " yes: discard stacked result jms decnf
jmp goon " succeed
exprtest: " here if st(ore?) bit not set
lac ii i " fetch instruction
and fibit " get fi(nal?) bit
sna " set?
jmp goon " no: succeed
jms decnf " yes: poped stacked result
lac nframe i " (redundant?????)
sza " was result zero?
-1 " no: get all ones
cma " complement (zero -> -1, -1 -> zero)
dac fflag " save as failure flag
jmp goon jmp goon
decnf:0 " decrement nframe, return stacked value exprtest:
lac ii i
and fibit
sna
jmp goon
jms decnf
lac nframe i
sza
-1
cma
dac fflag
jmp goon
decnf:0
-1 -1
tad nframe tad nframe
dac nframe dac nframe
+69 -49
View File
@@ -1,8 +1,8 @@
"** 13-120-147.pdf page 26 "** 13-120-147.pdf page 26
9:.=.+t 9:.=.+t
end = -1 " end of string (two 0777 bytes) end = -1
" recognition / generation opcodes:
no = 0000000 no = 0000000
rx = 0040000; gx = rx rx = 0040000; gx = rx
rc = 0100000 rc = 0100000
@@ -16,23 +16,23 @@ rm = 0440000
rs = 0500000 rs = 0500000
rv = 0540000 rv = 0540000
" literal words
ljmp:jmp ljmp:jmp
l.llss:llss l.llss:llss
l.lrs:lrs l.lrs:lrs
l.lls:lls l.lls:lls
l.ra:ra " used for comparison l.ra:ra
l.rb:rb " used for comparison l.rb:rb
l.rw:rw " used for comparison l.rw:rw
l.gk:gk " used to create instr in twoktab l.gk:gk
l.gcx:gc x " NOT USED? l.gcx:gc x
x = 020000
st = 0100
fi = 0200
opmask:0740000
exitmask: x
x = 020000 " exit bit (on all recog/gen instrs)
st = 0100 " store(?) bit on recog op (ro) instrs
fi = 0200 " final(?) bit on recog op (ro) instrs
opmask:0740000 " opcode mask
exitmask: x " exit bit mask
" number lits:
m1:0-1 m1:0-1
d0:o0:0 d0:o0:0
d1:o1:1 d1:o1:1
@@ -43,18 +43,13 @@ d5:o5:5
d6:o6:6 d6:o6:6
d7:o7:7 d7:o7:7
d8:o10:8 d8:o10:8
asciisp:040 " ascii space (NOT USED) asciisp:040
asciinl:012 " ascii newline (NOT USED) asciinl:012
nl:012777 " newline + EOS nl:012777
onenl:nl " pointer to newline+EOS onenl:nl
bugr:.+1;<rn>;<rx>;<rc>;<rt>;<rf>;<rw>;<ra>;<rb> " ptr to rec. op names bugr:.+1;<rn>;<rx>;<rc>;<rt>;<rf>;<rw>;<ra>;<rb>
<ro>;<rm>;<rs>;<rv> <ro>;<rm>;<rs>;<rv>
bugg:.+1;<gn>;<gx>;<gz>;<gc>;<gf>;<gk>;<gp>;<gq> " ptr to gen. op names bugg:.+1;<gn>;<gx>;<gz>;<gc>;<gf>;<gk>;<gp>;<gq>
" NOTE! ginterp ignores high bit of
" opcode (to allow as char indicator
" bit for gx instruction), but bug
" routine does not, so table should
" include two more entries???
o17:017 o17:017
o60:060 o60:060
@@ -71,7 +66,6 @@ o17777:017777
o757777:0757777 o757777:0757777
o600600:0600600 o600600:0600600
" variables
junk:0 junk:0
junk1:0 junk1:0
@@ -106,29 +100,55 @@ sbbot:sbbuf
fflag:0 fflag:0
gflag:0 gflag:0
ignore:.+1;0400000;0;0;0;0;0;0;4 " pointer to ignored character set ignore:.+1;0400000;0;0;0;0;0;0;4
" default ignore set (NUL and DEL) frame:rstack
" set stored using first (high) 16 of each wd. nframe:rstack+6
frame:rstack " frame pointer
nframe:rstack+6 " next frame pointer
env = ignore env = ignore
d.ii = d2 " frame offset for instruction pointer d.ii = d2
d.env = d3 " frame offset for env/ignore d.env = d3
d.blkmod = d3 " SYMBOL NOT USED d.blkmod = d3
d.j = d4 " frame offset for saved j d.j = d4
d.k = d5 " frame offset for saved k d.k = d5
dffrmsz:6 " current frame size (one of [rg]efrsz) dffrmsz:6
framsiz:4 " LOCATION NOT USED framsiz:4
refrsz = d6 " recognition frame size refrsz = d6
gefrsz = d4 " generation frame size gefrsz = d4
ii: start " interpreter instruction pointer ii: start
k:0 " saved data (ktab) pointer k:0
rsiz = 500 " stack size rsiz = 500
rmax: rsiz " stack size as variable rmax: rsiz
rbot:rstack " pointer to first stack entry rbot:rstack
rtop:rstack+rsiz " pointer to last stack entry rtop:rstack+rsiz
owrite:0 " index into obuf owrite:0
obot:obuf " pointer to first word of output buffer obot:obuf
osiz=64 " output buffer size osiz=64
" **************** missing last page? below this line added by phil
omax:osiz
jsiz=100 " PLB: total guess (char buffer?)
j:0
jsav:0
jmax:jsiz
jmin:0
jbot:jbuf
ljsiz:jsiz " PLB: likely bogus!
ksiz=100 " PLB: total guess (char buffer?)
kmax:ksiz
kbot:kbuf
lochunk: 0 " PLB: WAG
" tables/buffers: last so not allocated in executable
symtab: .=.+symsiz
equtab: .=.+equsiz
sbbuf: .=.+sbsiz
rstack: .=.+rsiz
obuf: .=.+osiz
jbuf: .=.+jsiz
kbuf: .=.+ksiz
start: .=.+100 " pointed to by ii: may be a stack?
+43 -43
View File
@@ -4,50 +4,50 @@
" no iot ops are defined " no iot ops are defined
" system cal entries are defined " system cal entries are defined
" "
dac = 0040000 " MEM: deposit AC dac = 0040000
jms = 0100000 " MEM: jump to subroutine jms = 0100000
dzm = 0140000 " MEM: deposit zero to memory dzm = 0140000
lac = 0200000 " MEM: load AC lac = 0200000
xor = 0240000 " MEM: XOR with AC xor = 0240000
add = 0300000 " MEM: one's complement add add = 0300000
tad = 0340000 " MEM: two's complement add tad = 0340000
xct = 0400000 " MEM: execute xct = 0400000
isz = 0440000 " MEM: increment and skip if zero isz = 0440000
and = 0500000 " MEM: AND and = 0500000
sad = 0540000 " MEM: skip if AC different sad = 0540000
jmp = 0600000 " MEM: jump jmp = 0600000
eae = 0640000 " Extended Arithmetic Element eae = 0640000
i = 020000 " indirect i = 020000
opr = 0740000 " Operator (bit encoded) opr = 0740000
law = opr i " OPR: load accumulator with (instr) law = opr i
cma = opr 1 " OPR: complement AC cma = opr 1
cml = opr 2 " OPR: complement LINK cml = opr 2
ral = opr 010 " OPR: rotate AC left ral = opr 010
rar = opr 020 " OPR: rotate AC right rar = opr 020
sma = opr 0100 " OPR: skip on minus AC sma = opr 0100
sza = opr 0200 " OPR: skip on zero AC sza = opr 0200
snl = opr 0400 " OPR: skip on non-zero link snl = opr 0400
skp = opr 01000 " OPR: skip unconditionally skp = opr 01000
spa = opr 01100 " OPR: skip on positive AC spa = opr 01100
sna = opr 01200 " OPR: skip on non-zero AC sna = opr 01200
szl = opr 01400 " OPR: skip on zero link szl = opr 01400
cll = opr 04000 " OPR: clear link cll = opr 04000
cla = opr 010000 " OPR: clear AC cla = opr 010000
las = opr 010004 " OPR: load AC from switches las = opr 010004
lrs = eae 0500 " EAE: long right shift lrs = eae 0500
lrss = i lrs " EAE: long right shift, signed lrss = i lrs
lls = eae 0600 " EAE: long left shift lls = eae 0600
llss = i lls " EAE: long left shift, signed llss = i lls
als = eae 0700 " EAE: AC left shift als = eae 0700
alss = i als " EAE: AC left shift, signed alss = i als
lacq = eae 01002 " EAE: load AC with MQ lacq = eae 01002
lacs = eae 01001 " EAE: load AC with SC (not used) lacs = eae 01001
clq = eae 010000 " EAE: clear MQ clq = eae 010000
omq = eae 2 " EAE: OR MQ into AC omq = eae 2
cmq = eae 4 " EAE: complement MQ cmq = eae 4
lmq = eae 012000 " EAE: load MQ from AC lmq = eae 012000
sys = i " CAL instruction w/ indirect bit sys = i
save = 1 save = 1
open = 3 open = 3
read = 4 read = 4

Some files were not shown because too many files have changed in this diff Show More