1
0
mirror of https://github.com/DoctorWkt/pdp7-unix.git synced 2026-04-18 00:56:31 +00:00

Merge pull request #27 from teverett/master

Various updates
This commit is contained in:
Warren
2016-03-07 06:14:43 +10:00
38 changed files with 69 additions and 9260 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
bin

3
.travis.yml Normal file
View File

@@ -0,0 +1,3 @@
language: c
sudo: false
script: make clean;make

View File

@@ -1,15 +1,48 @@
# Top level makefile to build the utilities etc,
AS= tools/as7
# Top level makefile to build the utilities etc
AS=tools/as7
ASARGS=--format=rim
BINDIR=bin
SYSDIR=$(BINDIR)/sys
CMDDIR=$(BINDIR)/cmd
all: utilities
all: dirs sys cmd others
utilities:
$(AS) -o bin/cat src/cmd/cat.s
$(AS) -o bin/cp src/cmd/cp.s
$(AS) -o bin/chmod src/cmd/chmod.s
$(AS) -o bin/chown src/cmd/chown.s
$(AS) -o bin/chrm src/cmd/chrm.s
$(AS) -o bin/ls src/other/wktls.s
dirs:
mkdir -p $(BINDIR)
mkdir -p $(SYSDIR)
mkdir -p $(CMDDIR)
sys:
$(AS) $(ASARGS) -o $(SYSDIR)/kernel src/sys/*.s
cmd:
# $(AS) $(ASARGS) -o $(CMDDIR)/adm src/cmd/adm.s
# $(AS) $(ASARGS) -o $(CMDDIR)/apr src/cmd/apr.s
$(AS) $(ASARGS) -o $(CMDDIR)/as src/cmd/as.s
# $(AS) $(ASARGS) -o $(CMDDIR)/bc src/cmd/bc.s
# $(AS) $(ASARGS) -o $(CMDDIR)/bi src/cmd/bi.s
# $(AS) $(ASARGS) -o $(CMDDIR)/bl src/cmd/bl.s
# $(AS) $(ASARGS) -o $(CMDDIR)/cas src/cmd/cas.s
$(AS) $(ASARGS) -o $(CMDDIR)/cat src/cmd/cat.s
# $(AS) $(ASARGS) -o $(CMDDIR)/check src/cmd/check.s
$(AS) $(ASARGS) -o $(CMDDIR)/chmod src/cmd/chmod.s
$(AS) $(ASARGS) -o $(CMDDIR)/chown src/cmd/chown.s
$(AS) $(ASARGS) -o $(CMDDIR)/chrm src/cmd/chrm.s
$(AS) $(ASARGS) -o $(CMDDIR)/cp src/cmd/cp.s
# $(AS) $(ASARGS) -o $(CMDDIR)/db src/cmd/db.s
# $(AS) $(ASARGS) -o $(CMDDIR)/dmabs src/cmd/dmabs.s
$(AS) $(ASARGS) -o $(CMDDIR)/ds src/cmd/ds.s
# $(AS) $(ASARGS) -o $(CMDDIR)/dskio src/cmd/dskio.s
# $(AS) $(ASARGS) -o $(CMDDIR)/dskres src/cmd/dskres.s
# $(AS) $(ASARGS) -o $(CMDDIR)/dsksav src/cmd/dsksav.s
# $(AS) $(ASARGS) -o $(CMDDIR)/dsw src/cmd/dsw.s
# $(AS) $(ASARGS) -o $(CMDDIR)/ed1 src/cmd/ed1.s
# $(AS) $(ASARGS) -o $(CMDDIR)/ed2 src/cmd/ed2.s
# $(AS) $(ASARGS) -o $(CMDDIR)/init src/cmd/init.s
others:
$(AS) $(ASARGS) -o $(CMDDIR)/ls src/other/wktls.s
clean:
rm -f bin/*
rm -rf $(BINDIR)/*
rmdir $(BINDIR)

View File

@@ -1,28 +1,38 @@
# pdp7-unix
This is a project to resurrect Unix on the PDP-7 from scans of the original assembly
code done by Norman Wilson. The scans of PDP-7 Unix are in the Unix Archive at
http://www.tuhs.org/Archive/PDP-11/Distributions/research/McIlroy_v0/
## About
pdp7-unix is a project to resurrect Unix on the PDP-7 from scans of the original assembly
code done by [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/) at
[http://www.tuhs.org/Archive/PDP-11/Distributions/research/McIlroy_v0/](http://www.tuhs.org/Archive/PDP-11/Distributions/research/McIlroy_v0/)
as the files 0*.pdf.
## Current Status
Update early March 2016: We've written an assembler, most of a user-mode
simulator and commented several source files. We now have these utilities
running: cat, cp, chmod, chown, chrm and ls.
Things to do: write a filesystem creation tool, write a shell, write the
missing utilities, try to bring the system up on a PDP-7 system. We have
a real PDP-7 and SimH as target platforms.
a real PDP-7 and [SimH](http://simh.trailing-edge.com/) as target platforms.
## Source Tree
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.
scans holds the unmodified OCR versions of the scanned files
* /scans holds the unmodified OCR versions of the scanned files
* /src/cmd holds the modified source code of the user-mode programs
* /src/sys holds the modified source code of the kernel
* /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
* /misc holds miscellaneous notes and information
* /pdp7parse holds a Java parser for pdp7 source code
src/cmd holds the modified source code of the user-mode programs
## Travis Status
src/sys holds the modified source code of the kernel
<a href="https://travis-ci.org/DoctorWkt/pdp7-unix"><img src="https://api.travis-ci.org/DoctorWkt/pdp7-unix.png"></a>
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
misc holds miscellaneous notes and information

View File

@@ -1,8 +0,0 @@
/**/*.log
/**/.DS_Store
/**/.project
/**/.classpath
/**/.settings/
/**/target
/**/test-output
ANTLRv4Lexer.g4

View File

@@ -1,7 +0,0 @@
PDP7Parse
---
PDP7Parse is an example of parsing PDP7 using an [Antlr4](http://www.antlr.org/) grammar. The authoritative home of the grammar file is on Antlr4 [grammars-v4](https://github.com/antlr/grammars-v4) tree.
PDP7Parse could be extended to implement a simple assembler for pdp7-unix.

View File

@@ -1,58 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.khubla.pdp7</groupId>
<artifactId>pdp7parse</artifactId>
<packaging>jar</packaging>
<name>khubla.com PDP7 Parser</name>
<version>1.0</version>
<properties>
<antlr.version>4.5</antlr.version>
</properties>
<dependencies>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr.version}</version>
<configuration>
<grammars>pdp7.g4</grammars>
<outputDirectory>src/main/java</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,282 +0,0 @@
/*
BSD License
Copyright (c) 2013, Tom Everett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of Tom Everett nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
grammar pdp7;
prog
: lineeol+ line? EOF
;
line
: declarations? comment?
;
lineeol
: line eol
;
declarations
: declaration (';' declaration)*
;
// multiple labels can occur on the same line
declaration
: label* (instruction | assignment | expression)*
;
instruction
: opcode argument*
;
argument
: expression
;
assignment
: (opcode | variable | LOC | RELOC) '=' expression
;
expression
: multiplyingExpression ((PLUS | MINUS) multiplyingExpression)*
;
multiplyingExpression
: atom ((TIMES | DIV) atom)*
;
atom
: variable
| LOC
| RELOC
| string
| DECIMAL
| DECIMAL_MINUS
| OCTAL
| NUMERIC_LITERAL
| '-' atom
;
// string chars, then potentially more than 1 octal constant, then potentially '>'
string
: STRING NUMERIC_LITERAL* '>'?
;
eol
: EOL
;
comment
: COMMENT
;
label
: LABEL
;
variable
: IDENTIFIER
;
opcode
: 'dac'
| 'jms'
| 'dzm'
| 'lac'
| 'xor'
| 'add'
| 'tad'
| 'xct'
| 'isz'
| 'and'
| 'sad'
| 'jmp'
| 'nop'
// | 'i'
| 'law'
| 'cma'
| 'las'
| 'ral'
| 'rar'
| 'hlt'
| 'sma'
| 'sza'
| 'snl'
| 'skp'
| 'sna'
| 'szl'
| 'rtl'
| 'rtr'
| 'cil'
| 'rcl'
| 'rcr'
| 'cia'
| 'lrs'
| 'lrss'
| 'lls'
| 'llss'
| 'als'
| 'alss'
| 'mul'
| 'idiv'
| 'lacq'
| 'clq'
| 'omq'
| 'cmq'
| 'lmq'
| 'dscs'
| 'dslw'
| 'dslm'
| 'dsld'
| 'dsls'
| 'dssf'
| 'dsrs'
| 'iof'
| 'ion'
| 'caf'
| 'clon'
| 'clsf'
| 'clof'
| 'ksf'
| 'krb'
| 'tsf'
| 'tcf'
| 'tls'
| 'sck'
| 'cck'
| 'lck'
| 'rsf'
| 'rsa'
| 'rrb'
| 'psf'
| 'pcf'
| 'psa'
| 'cdf'
| 'rlpd'
| 'lda'
| 'wcga'
| 'raef'
| 'rlpd'
| 'beg'
| 'spb'
| 'cpb'
| 'lpb'
| 'wbl'
| 'dprs'
| 'dpsf'
| 'dpcf'
| 'dprc'
| 'crsf'
| 'crrb'
| 'sys'
| 'czm'
| 'irss'
| 'dsm'
;
LOC
: '.'
;
RELOC
: '..'
;
PLUS
: '+'
;
MINUS
: '-'
;
TIMES
: '*'
;
DIV
: '/'
;
LABEL
: [a-zA-Z0-9.] + ':'
;
// the period is considered a letter
IDENTIFIER
: [a-zA-Z] [a-zA-Z0-9.]*
;
NUMERIC_LITERAL
: [0-9][0-9a-f]*
;
DECIMAL
: 'd' [0-9] +
;
OCTAL
: 'o' [0-7] +
;
DECIMAL_MINUS
: 'dm' [0-9] +
;
STRING
: '<' [a-zA-Z0-9$*,%/:?]*
;
COMMENT
: '"' ~ [\r\n]*
;
EOL
: [\r\n]+
;
WS
: [ \t] -> skip
;

View File

@@ -1,62 +0,0 @@
package com.khubla.pdp7parse;
import java.io.File;
import java.io.FileInputStream;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
/**
* @author tom
*/
public class PDP7Parse {
public static void main(String[] args) {
try {
System.out.println("khubla.com PDP7 Parser");
/*
* options
*/
final Options options = new Options();
OptionBuilder.withArgName(INPUT_FILE_OPTION);
OptionBuilder.isRequired();
OptionBuilder.withType(String.class);
OptionBuilder.hasArg();
OptionBuilder.withDescription("file to read");
final Option ifo = OptionBuilder.create(INPUT_FILE_OPTION);
options.addOption(ifo);
/*
* parse
*/
final CommandLineParser parser = new PosixParser();
CommandLine cmd = null;
try {
cmd = parser.parse(options, args);
} catch (final Exception e) {
e.printStackTrace();
final HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("posix", options);
System.exit(0);
}
/*
* get file
*/
final String inputFileName = cmd.getOptionValue(INPUT_FILE_OPTION);
final File inputFile = new File(inputFileName);
if (inputFile.exists()) {
PDP7Parser.parse(new FileInputStream(inputFile), System.out);
}
} catch (final Exception e) {
e.printStackTrace();
}
}
/**
* file option
*/
private static final String INPUT_FILE_OPTION = "file";
}

View File

@@ -1,31 +0,0 @@
package com.khubla.pdp7parse;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.Reader;
import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CommonTokenStream;
import com.khubla.pdp7parse.antlr4.pdp7Lexer;
import com.khubla.pdp7parse.antlr4.pdp7Parser;
import com.khubla.pdp7parse.antlr4.pdp7Parser.ProgContext;
public class PDP7Parser {
public static ProgContext parse(InputStream inputStream, OutputStream outputStream) throws Exception {
try {
if (null != inputStream) {
final Reader reader = new InputStreamReader(inputStream, "UTF-8");
final pdp7Lexer lexer = new pdp7Lexer(new ANTLRInputStream(reader));
final CommonTokenStream commonTokenStream = new CommonTokenStream(lexer);
final pdp7Parser parser = new pdp7Parser(commonTokenStream);
return parser.prog();
} else {
throw new IllegalArgumentException();
}
} catch (final Exception e) {
throw new Exception("Exception reading and parsing file", e);
}
}
}

View File

@@ -1,244 +0,0 @@
// Generated from com/khubla/pdp7parse/antlr4/pdp7.g4 by ANTLR 4.5
package com.khubla.pdp7parse.antlr4;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.TerminalNode;
/**
* This class provides an empty implementation of {@link pdp7Listener},
* which can be extended to create a listener which only needs to handle a subset
* of the available methods.
*/
public class pdp7BaseListener implements pdp7Listener {
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterProg(pdp7Parser.ProgContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitProg(pdp7Parser.ProgContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLine(pdp7Parser.LineContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLine(pdp7Parser.LineContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLineeol(pdp7Parser.LineeolContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLineeol(pdp7Parser.LineeolContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDeclarations(pdp7Parser.DeclarationsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDeclarations(pdp7Parser.DeclarationsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDeclaration(pdp7Parser.DeclarationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDeclaration(pdp7Parser.DeclarationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterInstruction(pdp7Parser.InstructionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitInstruction(pdp7Parser.InstructionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterArgument(pdp7Parser.ArgumentContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitArgument(pdp7Parser.ArgumentContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAssignment(pdp7Parser.AssignmentContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAssignment(pdp7Parser.AssignmentContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterExpression(pdp7Parser.ExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitExpression(pdp7Parser.ExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAtom(pdp7Parser.AtomContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAtom(pdp7Parser.AtomContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterString(pdp7Parser.StringContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitString(pdp7Parser.StringContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEol(pdp7Parser.EolContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEol(pdp7Parser.EolContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterComment(pdp7Parser.CommentContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitComment(pdp7Parser.CommentContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLabel(pdp7Parser.LabelContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLabel(pdp7Parser.LabelContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterVariable(pdp7Parser.VariableContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitVariable(pdp7Parser.VariableContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterOpcode(pdp7Parser.OpcodeContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitOpcode(pdp7Parser.OpcodeContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterEveryRule(ParserRuleContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitEveryRule(ParserRuleContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void visitTerminal(TerminalNode node) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void visitErrorNode(ErrorNode node) { }
}

View File

@@ -1,372 +0,0 @@
// Generated from com/khubla/pdp7parse/antlr4/pdp7.g4 by ANTLR 4.5
package com.khubla.pdp7parse.antlr4;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class pdp7Lexer extends Lexer {
static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9,
T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17,
T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24,
T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31,
T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38,
T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45,
T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52,
T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59,
T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, T__65=66,
T__66=67, T__67=68, T__68=69, T__69=70, T__70=71, T__71=72, T__72=73,
T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, T__79=80,
T__80=81, T__81=82, T__82=83, T__83=84, T__84=85, T__85=86, T__86=87,
T__87=88, T__88=89, T__89=90, T__90=91, T__91=92, T__92=93, T__93=94,
LOC=95, RELOC=96, PLUS=97, MINUS=98, TIMES=99, DIV=100, LABEL=101, IDENTIFIER=102,
NUMERIC_LITERAL=103, DECIMAL=104, OCTAL=105, DECIMAL_MINUS=106, STRING=107,
COMMENT=108, EOL=109, WS=110;
public static String[] modeNames = {
"DEFAULT_MODE"
};
public static final String[] ruleNames = {
"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
"T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16",
"T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24",
"T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32",
"T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40",
"T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48",
"T__49", "T__50", "T__51", "T__52", "T__53", "T__54", "T__55", "T__56",
"T__57", "T__58", "T__59", "T__60", "T__61", "T__62", "T__63", "T__64",
"T__65", "T__66", "T__67", "T__68", "T__69", "T__70", "T__71", "T__72",
"T__73", "T__74", "T__75", "T__76", "T__77", "T__78", "T__79", "T__80",
"T__81", "T__82", "T__83", "T__84", "T__85", "T__86", "T__87", "T__88",
"T__89", "T__90", "T__91", "T__92", "T__93", "LOC", "RELOC", "PLUS", "MINUS",
"TIMES", "DIV", "LABEL", "IDENTIFIER", "NUMERIC_LITERAL", "DECIMAL", "OCTAL",
"DECIMAL_MINUS", "STRING", "COMMENT", "EOL", "WS"
};
private static final String[] _LITERAL_NAMES = {
null, "';'", "'='", "'>'", "'dac'", "'jms'", "'dzm'", "'lac'", "'xor'",
"'add'", "'tad'", "'xct'", "'isz'", "'and'", "'sad'", "'jmp'", "'nop'",
"'law'", "'cma'", "'las'", "'ral'", "'rar'", "'hlt'", "'sma'", "'sza'",
"'snl'", "'skp'", "'sna'", "'szl'", "'rtl'", "'rtr'", "'cil'", "'rcl'",
"'rcr'", "'cia'", "'lrs'", "'lrss'", "'lls'", "'llss'", "'als'", "'alss'",
"'mul'", "'idiv'", "'lacq'", "'clq'", "'omq'", "'cmq'", "'lmq'", "'dscs'",
"'dslw'", "'dslm'", "'dsld'", "'dsls'", "'dssf'", "'dsrs'", "'iof'", "'ion'",
"'caf'", "'clon'", "'clsf'", "'clof'", "'ksf'", "'krb'", "'tsf'", "'tcf'",
"'tls'", "'sck'", "'cck'", "'lck'", "'rsf'", "'rsa'", "'rrb'", "'psf'",
"'pcf'", "'psa'", "'cdf'", "'rlpd'", "'lda'", "'wcga'", "'raef'", "'beg'",
"'spb'", "'cpb'", "'lpb'", "'wbl'", "'dprs'", "'dpsf'", "'dpcf'", "'dprc'",
"'crsf'", "'crrb'", "'sys'", "'czm'", "'irss'", "'dsm'", "'.'", "'..'",
"'+'", "'-'", "'*'", "'/'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, "LOC",
"RELOC", "PLUS", "MINUS", "TIMES", "DIV", "LABEL", "IDENTIFIER", "NUMERIC_LITERAL",
"DECIMAL", "OCTAL", "DECIMAL_MINUS", "STRING", "COMMENT", "EOL", "WS"
};
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "<INVALID>";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
public pdp7Lexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@Override
public String getGrammarFileName() { return "pdp7.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public String[] getModeNames() { return modeNames; }
@Override
public ATN getATN() { return _ATN; }
public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2p\u02b7\b\1\4\2\t"+
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+
",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+
"\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+
"\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+
"\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+
"\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+
"`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+
"k\4l\tl\4m\tm\4n\tn\4o\to\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\5\3\6"+
"\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\n\3\n\3"+
"\n\3\n\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\16\3\16\3"+
"\16\3\16\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3"+
"\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\25\3\25\3"+
"\25\3\25\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3"+
"\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\34\3\34\3"+
"\34\3\34\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3"+
" \3 \3 \3 \3!\3!\3!\3!\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3$\3$\3$\3$\3%\3%\3"+
"%\3%\3%\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3)\3)\3)\3)\3)\3*"+
"\3*\3*\3*\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\3-\3-\3-\3-\3.\3.\3.\3.\3/\3/"+
"\3/\3/\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62"+
"\3\62\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65"+
"\3\65\3\65\3\66\3\66\3\66\3\66\3\66\3\67\3\67\3\67\3\67\3\67\38\38\38"+
"\38\39\39\39\39\3:\3:\3:\3:\3;\3;\3;\3;\3;\3<\3<\3<\3<\3<\3=\3=\3=\3="+
"\3=\3>\3>\3>\3>\3?\3?\3?\3?\3@\3@\3@\3@\3A\3A\3A\3A\3B\3B\3B\3B\3C\3C"+
"\3C\3C\3D\3D\3D\3D\3E\3E\3E\3E\3F\3F\3F\3F\3G\3G\3G\3G\3H\3H\3H\3H\3I"+
"\3I\3I\3I\3J\3J\3J\3J\3K\3K\3K\3K\3L\3L\3L\3L\3M\3M\3M\3M\3M\3N\3N\3N"+
"\3N\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3S\3S\3S\3S"+
"\3T\3T\3T\3T\3U\3U\3U\3U\3V\3V\3V\3V\3V\3W\3W\3W\3W\3W\3X\3X\3X\3X\3X"+
"\3Y\3Y\3Y\3Y\3Y\3Z\3Z\3Z\3Z\3Z\3[\3[\3[\3[\3[\3\\\3\\\3\\\3\\\3]\3]\3"+
"]\3]\3^\3^\3^\3^\3^\3_\3_\3_\3_\3`\3`\3a\3a\3a\3b\3b\3c\3c\3d\3d\3e\3"+
"e\3f\6f\u0279\nf\rf\16f\u027a\3f\3f\3g\3g\7g\u0281\ng\fg\16g\u0284\13"+
"g\3h\3h\7h\u0288\nh\fh\16h\u028b\13h\3i\3i\6i\u028f\ni\ri\16i\u0290\3"+
"j\3j\6j\u0295\nj\rj\16j\u0296\3k\3k\3k\3k\6k\u029d\nk\rk\16k\u029e\3l"+
"\3l\7l\u02a3\nl\fl\16l\u02a6\13l\3m\3m\7m\u02aa\nm\fm\16m\u02ad\13m\3"+
"n\6n\u02b0\nn\rn\16n\u02b1\3o\3o\3o\3o\2\2p\3\3\5\4\7\5\t\6\13\7\r\b\17"+
"\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+"+
"\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+"+
"U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u<w=y>{?}@\177A\u0081"+
"B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093K\u0095"+
"L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7U\u00a9"+
"V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb_\u00bd"+
"`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cdh\u00cfi\u00d1"+
"j\u00d3k\u00d5l\u00d7m\u00d9n\u00dbo\u00ddp\3\2\n\6\2\60\60\62;C\\c|\4"+
"\2C\\c|\3\2\62;\4\2\62;ch\3\2\629\t\2&\',,..\61<AAC\\c|\4\2\f\f\17\17"+
"\4\2\13\13\"\"\u02bf\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2"+
"\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3"+
"\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2"+
"\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2"+
"\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2"+
"\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2"+
"\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q"+
"\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2"+
"\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2"+
"\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w"+
"\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2"+
"\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b"+
"\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2"+
"\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d"+
"\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2"+
"\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2\2\u00af"+
"\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2"+
"\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1"+
"\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2"+
"\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3"+
"\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2"+
"\2\2\u00dd\3\2\2\2\3\u00df\3\2\2\2\5\u00e1\3\2\2\2\7\u00e3\3\2\2\2\t\u00e5"+
"\3\2\2\2\13\u00e9\3\2\2\2\r\u00ed\3\2\2\2\17\u00f1\3\2\2\2\21\u00f5\3"+
"\2\2\2\23\u00f9\3\2\2\2\25\u00fd\3\2\2\2\27\u0101\3\2\2\2\31\u0105\3\2"+
"\2\2\33\u0109\3\2\2\2\35\u010d\3\2\2\2\37\u0111\3\2\2\2!\u0115\3\2\2\2"+
"#\u0119\3\2\2\2%\u011d\3\2\2\2\'\u0121\3\2\2\2)\u0125\3\2\2\2+\u0129\3"+
"\2\2\2-\u012d\3\2\2\2/\u0131\3\2\2\2\61\u0135\3\2\2\2\63\u0139\3\2\2\2"+
"\65\u013d\3\2\2\2\67\u0141\3\2\2\29\u0145\3\2\2\2;\u0149\3\2\2\2=\u014d"+
"\3\2\2\2?\u0151\3\2\2\2A\u0155\3\2\2\2C\u0159\3\2\2\2E\u015d\3\2\2\2G"+
"\u0161\3\2\2\2I\u0165\3\2\2\2K\u016a\3\2\2\2M\u016e\3\2\2\2O\u0173\3\2"+
"\2\2Q\u0177\3\2\2\2S\u017c\3\2\2\2U\u0180\3\2\2\2W\u0185\3\2\2\2Y\u018a"+
"\3\2\2\2[\u018e\3\2\2\2]\u0192\3\2\2\2_\u0196\3\2\2\2a\u019a\3\2\2\2c"+
"\u019f\3\2\2\2e\u01a4\3\2\2\2g\u01a9\3\2\2\2i\u01ae\3\2\2\2k\u01b3\3\2"+
"\2\2m\u01b8\3\2\2\2o\u01bd\3\2\2\2q\u01c1\3\2\2\2s\u01c5\3\2\2\2u\u01c9"+
"\3\2\2\2w\u01ce\3\2\2\2y\u01d3\3\2\2\2{\u01d8\3\2\2\2}\u01dc\3\2\2\2\177"+
"\u01e0\3\2\2\2\u0081\u01e4\3\2\2\2\u0083\u01e8\3\2\2\2\u0085\u01ec\3\2"+
"\2\2\u0087\u01f0\3\2\2\2\u0089\u01f4\3\2\2\2\u008b\u01f8\3\2\2\2\u008d"+
"\u01fc\3\2\2\2\u008f\u0200\3\2\2\2\u0091\u0204\3\2\2\2\u0093\u0208\3\2"+
"\2\2\u0095\u020c\3\2\2\2\u0097\u0210\3\2\2\2\u0099\u0214\3\2\2\2\u009b"+
"\u0219\3\2\2\2\u009d\u021d\3\2\2\2\u009f\u0222\3\2\2\2\u00a1\u0227\3\2"+
"\2\2\u00a3\u022b\3\2\2\2\u00a5\u022f\3\2\2\2\u00a7\u0233\3\2\2\2\u00a9"+
"\u0237\3\2\2\2\u00ab\u023b\3\2\2\2\u00ad\u0240\3\2\2\2\u00af\u0245\3\2"+
"\2\2\u00b1\u024a\3\2\2\2\u00b3\u024f\3\2\2\2\u00b5\u0254\3\2\2\2\u00b7"+
"\u0259\3\2\2\2\u00b9\u025d\3\2\2\2\u00bb\u0261\3\2\2\2\u00bd\u0266\3\2"+
"\2\2\u00bf\u026a\3\2\2\2\u00c1\u026c\3\2\2\2\u00c3\u026f\3\2\2\2\u00c5"+
"\u0271\3\2\2\2\u00c7\u0273\3\2\2\2\u00c9\u0275\3\2\2\2\u00cb\u0278\3\2"+
"\2\2\u00cd\u027e\3\2\2\2\u00cf\u0285\3\2\2\2\u00d1\u028c\3\2\2\2\u00d3"+
"\u0292\3\2\2\2\u00d5\u0298\3\2\2\2\u00d7\u02a0\3\2\2\2\u00d9\u02a7\3\2"+
"\2\2\u00db\u02af\3\2\2\2\u00dd\u02b3\3\2\2\2\u00df\u00e0\7=\2\2\u00e0"+
"\4\3\2\2\2\u00e1\u00e2\7?\2\2\u00e2\6\3\2\2\2\u00e3\u00e4\7@\2\2\u00e4"+
"\b\3\2\2\2\u00e5\u00e6\7f\2\2\u00e6\u00e7\7c\2\2\u00e7\u00e8\7e\2\2\u00e8"+
"\n\3\2\2\2\u00e9\u00ea\7l\2\2\u00ea\u00eb\7o\2\2\u00eb\u00ec\7u\2\2\u00ec"+
"\f\3\2\2\2\u00ed\u00ee\7f\2\2\u00ee\u00ef\7|\2\2\u00ef\u00f0\7o\2\2\u00f0"+
"\16\3\2\2\2\u00f1\u00f2\7n\2\2\u00f2\u00f3\7c\2\2\u00f3\u00f4\7e\2\2\u00f4"+
"\20\3\2\2\2\u00f5\u00f6\7z\2\2\u00f6\u00f7\7q\2\2\u00f7\u00f8\7t\2\2\u00f8"+
"\22\3\2\2\2\u00f9\u00fa\7c\2\2\u00fa\u00fb\7f\2\2\u00fb\u00fc\7f\2\2\u00fc"+
"\24\3\2\2\2\u00fd\u00fe\7v\2\2\u00fe\u00ff\7c\2\2\u00ff\u0100\7f\2\2\u0100"+
"\26\3\2\2\2\u0101\u0102\7z\2\2\u0102\u0103\7e\2\2\u0103\u0104\7v\2\2\u0104"+
"\30\3\2\2\2\u0105\u0106\7k\2\2\u0106\u0107\7u\2\2\u0107\u0108\7|\2\2\u0108"+
"\32\3\2\2\2\u0109\u010a\7c\2\2\u010a\u010b\7p\2\2\u010b\u010c\7f\2\2\u010c"+
"\34\3\2\2\2\u010d\u010e\7u\2\2\u010e\u010f\7c\2\2\u010f\u0110\7f\2\2\u0110"+
"\36\3\2\2\2\u0111\u0112\7l\2\2\u0112\u0113\7o\2\2\u0113\u0114\7r\2\2\u0114"+
" \3\2\2\2\u0115\u0116\7p\2\2\u0116\u0117\7q\2\2\u0117\u0118\7r\2\2\u0118"+
"\"\3\2\2\2\u0119\u011a\7n\2\2\u011a\u011b\7c\2\2\u011b\u011c\7y\2\2\u011c"+
"$\3\2\2\2\u011d\u011e\7e\2\2\u011e\u011f\7o\2\2\u011f\u0120\7c\2\2\u0120"+
"&\3\2\2\2\u0121\u0122\7n\2\2\u0122\u0123\7c\2\2\u0123\u0124\7u\2\2\u0124"+
"(\3\2\2\2\u0125\u0126\7t\2\2\u0126\u0127\7c\2\2\u0127\u0128\7n\2\2\u0128"+
"*\3\2\2\2\u0129\u012a\7t\2\2\u012a\u012b\7c\2\2\u012b\u012c\7t\2\2\u012c"+
",\3\2\2\2\u012d\u012e\7j\2\2\u012e\u012f\7n\2\2\u012f\u0130\7v\2\2\u0130"+
".\3\2\2\2\u0131\u0132\7u\2\2\u0132\u0133\7o\2\2\u0133\u0134\7c\2\2\u0134"+
"\60\3\2\2\2\u0135\u0136\7u\2\2\u0136\u0137\7|\2\2\u0137\u0138\7c\2\2\u0138"+
"\62\3\2\2\2\u0139\u013a\7u\2\2\u013a\u013b\7p\2\2\u013b\u013c\7n\2\2\u013c"+
"\64\3\2\2\2\u013d\u013e\7u\2\2\u013e\u013f\7m\2\2\u013f\u0140\7r\2\2\u0140"+
"\66\3\2\2\2\u0141\u0142\7u\2\2\u0142\u0143\7p\2\2\u0143\u0144\7c\2\2\u0144"+
"8\3\2\2\2\u0145\u0146\7u\2\2\u0146\u0147\7|\2\2\u0147\u0148\7n\2\2\u0148"+
":\3\2\2\2\u0149\u014a\7t\2\2\u014a\u014b\7v\2\2\u014b\u014c\7n\2\2\u014c"+
"<\3\2\2\2\u014d\u014e\7t\2\2\u014e\u014f\7v\2\2\u014f\u0150\7t\2\2\u0150"+
">\3\2\2\2\u0151\u0152\7e\2\2\u0152\u0153\7k\2\2\u0153\u0154\7n\2\2\u0154"+
"@\3\2\2\2\u0155\u0156\7t\2\2\u0156\u0157\7e\2\2\u0157\u0158\7n\2\2\u0158"+
"B\3\2\2\2\u0159\u015a\7t\2\2\u015a\u015b\7e\2\2\u015b\u015c\7t\2\2\u015c"+
"D\3\2\2\2\u015d\u015e\7e\2\2\u015e\u015f\7k\2\2\u015f\u0160\7c\2\2\u0160"+
"F\3\2\2\2\u0161\u0162\7n\2\2\u0162\u0163\7t\2\2\u0163\u0164\7u\2\2\u0164"+
"H\3\2\2\2\u0165\u0166\7n\2\2\u0166\u0167\7t\2\2\u0167\u0168\7u\2\2\u0168"+
"\u0169\7u\2\2\u0169J\3\2\2\2\u016a\u016b\7n\2\2\u016b\u016c\7n\2\2\u016c"+
"\u016d\7u\2\2\u016dL\3\2\2\2\u016e\u016f\7n\2\2\u016f\u0170\7n\2\2\u0170"+
"\u0171\7u\2\2\u0171\u0172\7u\2\2\u0172N\3\2\2\2\u0173\u0174\7c\2\2\u0174"+
"\u0175\7n\2\2\u0175\u0176\7u\2\2\u0176P\3\2\2\2\u0177\u0178\7c\2\2\u0178"+
"\u0179\7n\2\2\u0179\u017a\7u\2\2\u017a\u017b\7u\2\2\u017bR\3\2\2\2\u017c"+
"\u017d\7o\2\2\u017d\u017e\7w\2\2\u017e\u017f\7n\2\2\u017fT\3\2\2\2\u0180"+
"\u0181\7k\2\2\u0181\u0182\7f\2\2\u0182\u0183\7k\2\2\u0183\u0184\7x\2\2"+
"\u0184V\3\2\2\2\u0185\u0186\7n\2\2\u0186\u0187\7c\2\2\u0187\u0188\7e\2"+
"\2\u0188\u0189\7s\2\2\u0189X\3\2\2\2\u018a\u018b\7e\2\2\u018b\u018c\7"+
"n\2\2\u018c\u018d\7s\2\2\u018dZ\3\2\2\2\u018e\u018f\7q\2\2\u018f\u0190"+
"\7o\2\2\u0190\u0191\7s\2\2\u0191\\\3\2\2\2\u0192\u0193\7e\2\2\u0193\u0194"+
"\7o\2\2\u0194\u0195\7s\2\2\u0195^\3\2\2\2\u0196\u0197\7n\2\2\u0197\u0198"+
"\7o\2\2\u0198\u0199\7s\2\2\u0199`\3\2\2\2\u019a\u019b\7f\2\2\u019b\u019c"+
"\7u\2\2\u019c\u019d\7e\2\2\u019d\u019e\7u\2\2\u019eb\3\2\2\2\u019f\u01a0"+
"\7f\2\2\u01a0\u01a1\7u\2\2\u01a1\u01a2\7n\2\2\u01a2\u01a3\7y\2\2\u01a3"+
"d\3\2\2\2\u01a4\u01a5\7f\2\2\u01a5\u01a6\7u\2\2\u01a6\u01a7\7n\2\2\u01a7"+
"\u01a8\7o\2\2\u01a8f\3\2\2\2\u01a9\u01aa\7f\2\2\u01aa\u01ab\7u\2\2\u01ab"+
"\u01ac\7n\2\2\u01ac\u01ad\7f\2\2\u01adh\3\2\2\2\u01ae\u01af\7f\2\2\u01af"+
"\u01b0\7u\2\2\u01b0\u01b1\7n\2\2\u01b1\u01b2\7u\2\2\u01b2j\3\2\2\2\u01b3"+
"\u01b4\7f\2\2\u01b4\u01b5\7u\2\2\u01b5\u01b6\7u\2\2\u01b6\u01b7\7h\2\2"+
"\u01b7l\3\2\2\2\u01b8\u01b9\7f\2\2\u01b9\u01ba\7u\2\2\u01ba\u01bb\7t\2"+
"\2\u01bb\u01bc\7u\2\2\u01bcn\3\2\2\2\u01bd\u01be\7k\2\2\u01be\u01bf\7"+
"q\2\2\u01bf\u01c0\7h\2\2\u01c0p\3\2\2\2\u01c1\u01c2\7k\2\2\u01c2\u01c3"+
"\7q\2\2\u01c3\u01c4\7p\2\2\u01c4r\3\2\2\2\u01c5\u01c6\7e\2\2\u01c6\u01c7"+
"\7c\2\2\u01c7\u01c8\7h\2\2\u01c8t\3\2\2\2\u01c9\u01ca\7e\2\2\u01ca\u01cb"+
"\7n\2\2\u01cb\u01cc\7q\2\2\u01cc\u01cd\7p\2\2\u01cdv\3\2\2\2\u01ce\u01cf"+
"\7e\2\2\u01cf\u01d0\7n\2\2\u01d0\u01d1\7u\2\2\u01d1\u01d2\7h\2\2\u01d2"+
"x\3\2\2\2\u01d3\u01d4\7e\2\2\u01d4\u01d5\7n\2\2\u01d5\u01d6\7q\2\2\u01d6"+
"\u01d7\7h\2\2\u01d7z\3\2\2\2\u01d8\u01d9\7m\2\2\u01d9\u01da\7u\2\2\u01da"+
"\u01db\7h\2\2\u01db|\3\2\2\2\u01dc\u01dd\7m\2\2\u01dd\u01de\7t\2\2\u01de"+
"\u01df\7d\2\2\u01df~\3\2\2\2\u01e0\u01e1\7v\2\2\u01e1\u01e2\7u\2\2\u01e2"+
"\u01e3\7h\2\2\u01e3\u0080\3\2\2\2\u01e4\u01e5\7v\2\2\u01e5\u01e6\7e\2"+
"\2\u01e6\u01e7\7h\2\2\u01e7\u0082\3\2\2\2\u01e8\u01e9\7v\2\2\u01e9\u01ea"+
"\7n\2\2\u01ea\u01eb\7u\2\2\u01eb\u0084\3\2\2\2\u01ec\u01ed\7u\2\2\u01ed"+
"\u01ee\7e\2\2\u01ee\u01ef\7m\2\2\u01ef\u0086\3\2\2\2\u01f0\u01f1\7e\2"+
"\2\u01f1\u01f2\7e\2\2\u01f2\u01f3\7m\2\2\u01f3\u0088\3\2\2\2\u01f4\u01f5"+
"\7n\2\2\u01f5\u01f6\7e\2\2\u01f6\u01f7\7m\2\2\u01f7\u008a\3\2\2\2\u01f8"+
"\u01f9\7t\2\2\u01f9\u01fa\7u\2\2\u01fa\u01fb\7h\2\2\u01fb\u008c\3\2\2"+
"\2\u01fc\u01fd\7t\2\2\u01fd\u01fe\7u\2\2\u01fe\u01ff\7c\2\2\u01ff\u008e"+
"\3\2\2\2\u0200\u0201\7t\2\2\u0201\u0202\7t\2\2\u0202\u0203\7d\2\2\u0203"+
"\u0090\3\2\2\2\u0204\u0205\7r\2\2\u0205\u0206\7u\2\2\u0206\u0207\7h\2"+
"\2\u0207\u0092\3\2\2\2\u0208\u0209\7r\2\2\u0209\u020a\7e\2\2\u020a\u020b"+
"\7h\2\2\u020b\u0094\3\2\2\2\u020c\u020d\7r\2\2\u020d\u020e\7u\2\2\u020e"+
"\u020f\7c\2\2\u020f\u0096\3\2\2\2\u0210\u0211\7e\2\2\u0211\u0212\7f\2"+
"\2\u0212\u0213\7h\2\2\u0213\u0098\3\2\2\2\u0214\u0215\7t\2\2\u0215\u0216"+
"\7n\2\2\u0216\u0217\7r\2\2\u0217\u0218\7f\2\2\u0218\u009a\3\2\2\2\u0219"+
"\u021a\7n\2\2\u021a\u021b\7f\2\2\u021b\u021c\7c\2\2\u021c\u009c\3\2\2"+
"\2\u021d\u021e\7y\2\2\u021e\u021f\7e\2\2\u021f\u0220\7i\2\2\u0220\u0221"+
"\7c\2\2\u0221\u009e\3\2\2\2\u0222\u0223\7t\2\2\u0223\u0224\7c\2\2\u0224"+
"\u0225\7g\2\2\u0225\u0226\7h\2\2\u0226\u00a0\3\2\2\2\u0227\u0228\7d\2"+
"\2\u0228\u0229\7g\2\2\u0229\u022a\7i\2\2\u022a\u00a2\3\2\2\2\u022b\u022c"+
"\7u\2\2\u022c\u022d\7r\2\2\u022d\u022e\7d\2\2\u022e\u00a4\3\2\2\2\u022f"+
"\u0230\7e\2\2\u0230\u0231\7r\2\2\u0231\u0232\7d\2\2\u0232\u00a6\3\2\2"+
"\2\u0233\u0234\7n\2\2\u0234\u0235\7r\2\2\u0235\u0236\7d\2\2\u0236\u00a8"+
"\3\2\2\2\u0237\u0238\7y\2\2\u0238\u0239\7d\2\2\u0239\u023a\7n\2\2\u023a"+
"\u00aa\3\2\2\2\u023b\u023c\7f\2\2\u023c\u023d\7r\2\2\u023d\u023e\7t\2"+
"\2\u023e\u023f\7u\2\2\u023f\u00ac\3\2\2\2\u0240\u0241\7f\2\2\u0241\u0242"+
"\7r\2\2\u0242\u0243\7u\2\2\u0243\u0244\7h\2\2\u0244\u00ae\3\2\2\2\u0245"+
"\u0246\7f\2\2\u0246\u0247\7r\2\2\u0247\u0248\7e\2\2\u0248\u0249\7h\2\2"+
"\u0249\u00b0\3\2\2\2\u024a\u024b\7f\2\2\u024b\u024c\7r\2\2\u024c\u024d"+
"\7t\2\2\u024d\u024e\7e\2\2\u024e\u00b2\3\2\2\2\u024f\u0250\7e\2\2\u0250"+
"\u0251\7t\2\2\u0251\u0252\7u\2\2\u0252\u0253\7h\2\2\u0253\u00b4\3\2\2"+
"\2\u0254\u0255\7e\2\2\u0255\u0256\7t\2\2\u0256\u0257\7t\2\2\u0257\u0258"+
"\7d\2\2\u0258\u00b6\3\2\2\2\u0259\u025a\7u\2\2\u025a\u025b\7{\2\2\u025b"+
"\u025c\7u\2\2\u025c\u00b8\3\2\2\2\u025d\u025e\7e\2\2\u025e\u025f\7|\2"+
"\2\u025f\u0260\7o\2\2\u0260\u00ba\3\2\2\2\u0261\u0262\7k\2\2\u0262\u0263"+
"\7t\2\2\u0263\u0264\7u\2\2\u0264\u0265\7u\2\2\u0265\u00bc\3\2\2\2\u0266"+
"\u0267\7f\2\2\u0267\u0268\7u\2\2\u0268\u0269\7o\2\2\u0269\u00be\3\2\2"+
"\2\u026a\u026b\7\60\2\2\u026b\u00c0\3\2\2\2\u026c\u026d\7\60\2\2\u026d"+
"\u026e\7\60\2\2\u026e\u00c2\3\2\2\2\u026f\u0270\7-\2\2\u0270\u00c4\3\2"+
"\2\2\u0271\u0272\7/\2\2\u0272\u00c6\3\2\2\2\u0273\u0274\7,\2\2\u0274\u00c8"+
"\3\2\2\2\u0275\u0276\7\61\2\2\u0276\u00ca\3\2\2\2\u0277\u0279\t\2\2\2"+
"\u0278\u0277\3\2\2\2\u0279\u027a\3\2\2\2\u027a\u0278\3\2\2\2\u027a\u027b"+
"\3\2\2\2\u027b\u027c\3\2\2\2\u027c\u027d\7<\2\2\u027d\u00cc\3\2\2\2\u027e"+
"\u0282\t\3\2\2\u027f\u0281\t\2\2\2\u0280\u027f\3\2\2\2\u0281\u0284\3\2"+
"\2\2\u0282\u0280\3\2\2\2\u0282\u0283\3\2\2\2\u0283\u00ce\3\2\2\2\u0284"+
"\u0282\3\2\2\2\u0285\u0289\t\4\2\2\u0286\u0288\t\5\2\2\u0287\u0286\3\2"+
"\2\2\u0288\u028b\3\2\2\2\u0289\u0287\3\2\2\2\u0289\u028a\3\2\2\2\u028a"+
"\u00d0\3\2\2\2\u028b\u0289\3\2\2\2\u028c\u028e\7f\2\2\u028d\u028f\t\4"+
"\2\2\u028e\u028d\3\2\2\2\u028f\u0290\3\2\2\2\u0290\u028e\3\2\2\2\u0290"+
"\u0291\3\2\2\2\u0291\u00d2\3\2\2\2\u0292\u0294\7q\2\2\u0293\u0295\t\6"+
"\2\2\u0294\u0293\3\2\2\2\u0295\u0296\3\2\2\2\u0296\u0294\3\2\2\2\u0296"+
"\u0297\3\2\2\2\u0297\u00d4\3\2\2\2\u0298\u0299\7f\2\2\u0299\u029a\7o\2"+
"\2\u029a\u029c\3\2\2\2\u029b\u029d\t\4\2\2\u029c\u029b\3\2\2\2\u029d\u029e"+
"\3\2\2\2\u029e\u029c\3\2\2\2\u029e\u029f\3\2\2\2\u029f\u00d6\3\2\2\2\u02a0"+
"\u02a4\7>\2\2\u02a1\u02a3\t\7\2\2\u02a2\u02a1\3\2\2\2\u02a3\u02a6\3\2"+
"\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5\3\2\2\2\u02a5\u00d8\3\2\2\2\u02a6"+
"\u02a4\3\2\2\2\u02a7\u02ab\7$\2\2\u02a8\u02aa\n\b\2\2\u02a9\u02a8\3\2"+
"\2\2\u02aa\u02ad\3\2\2\2\u02ab\u02a9\3\2\2\2\u02ab\u02ac\3\2\2\2\u02ac"+
"\u00da\3\2\2\2\u02ad\u02ab\3\2\2\2\u02ae\u02b0\t\b\2\2\u02af\u02ae\3\2"+
"\2\2\u02b0\u02b1\3\2\2\2\u02b1\u02af\3\2\2\2\u02b1\u02b2\3\2\2\2\u02b2"+
"\u00dc\3\2\2\2\u02b3\u02b4\t\t\2\2\u02b4\u02b5\3\2\2\2\u02b5\u02b6\bo"+
"\2\2\u02b6\u00de\3\2\2\2\f\2\u027a\u0282\u0289\u0290\u0296\u029e\u02a4"+
"\u02ab\u02b1\3\b\2\2";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
}

View File

@@ -1,181 +0,0 @@
// Generated from com/khubla/pdp7parse/antlr4/pdp7.g4 by ANTLR 4.5
package com.khubla.pdp7parse.antlr4;
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
* This interface defines a complete listener for a parse tree produced by
* {@link pdp7Parser}.
*/
public interface pdp7Listener extends ParseTreeListener {
/**
* Enter a parse tree produced by {@link pdp7Parser#prog}.
* @param ctx the parse tree
*/
void enterProg(pdp7Parser.ProgContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#prog}.
* @param ctx the parse tree
*/
void exitProg(pdp7Parser.ProgContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#line}.
* @param ctx the parse tree
*/
void enterLine(pdp7Parser.LineContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#line}.
* @param ctx the parse tree
*/
void exitLine(pdp7Parser.LineContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#lineeol}.
* @param ctx the parse tree
*/
void enterLineeol(pdp7Parser.LineeolContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#lineeol}.
* @param ctx the parse tree
*/
void exitLineeol(pdp7Parser.LineeolContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#declarations}.
* @param ctx the parse tree
*/
void enterDeclarations(pdp7Parser.DeclarationsContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#declarations}.
* @param ctx the parse tree
*/
void exitDeclarations(pdp7Parser.DeclarationsContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#declaration}.
* @param ctx the parse tree
*/
void enterDeclaration(pdp7Parser.DeclarationContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#declaration}.
* @param ctx the parse tree
*/
void exitDeclaration(pdp7Parser.DeclarationContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#instruction}.
* @param ctx the parse tree
*/
void enterInstruction(pdp7Parser.InstructionContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#instruction}.
* @param ctx the parse tree
*/
void exitInstruction(pdp7Parser.InstructionContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#argument}.
* @param ctx the parse tree
*/
void enterArgument(pdp7Parser.ArgumentContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#argument}.
* @param ctx the parse tree
*/
void exitArgument(pdp7Parser.ArgumentContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#assignment}.
* @param ctx the parse tree
*/
void enterAssignment(pdp7Parser.AssignmentContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#assignment}.
* @param ctx the parse tree
*/
void exitAssignment(pdp7Parser.AssignmentContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#expression}.
* @param ctx the parse tree
*/
void enterExpression(pdp7Parser.ExpressionContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#expression}.
* @param ctx the parse tree
*/
void exitExpression(pdp7Parser.ExpressionContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#multiplyingExpression}.
* @param ctx the parse tree
*/
void enterMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#multiplyingExpression}.
* @param ctx the parse tree
*/
void exitMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#atom}.
* @param ctx the parse tree
*/
void enterAtom(pdp7Parser.AtomContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#atom}.
* @param ctx the parse tree
*/
void exitAtom(pdp7Parser.AtomContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#string}.
* @param ctx the parse tree
*/
void enterString(pdp7Parser.StringContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#string}.
* @param ctx the parse tree
*/
void exitString(pdp7Parser.StringContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#eol}.
* @param ctx the parse tree
*/
void enterEol(pdp7Parser.EolContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#eol}.
* @param ctx the parse tree
*/
void exitEol(pdp7Parser.EolContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#comment}.
* @param ctx the parse tree
*/
void enterComment(pdp7Parser.CommentContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#comment}.
* @param ctx the parse tree
*/
void exitComment(pdp7Parser.CommentContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#label}.
* @param ctx the parse tree
*/
void enterLabel(pdp7Parser.LabelContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#label}.
* @param ctx the parse tree
*/
void exitLabel(pdp7Parser.LabelContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#variable}.
* @param ctx the parse tree
*/
void enterVariable(pdp7Parser.VariableContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#variable}.
* @param ctx the parse tree
*/
void exitVariable(pdp7Parser.VariableContext ctx);
/**
* Enter a parse tree produced by {@link pdp7Parser#opcode}.
* @param ctx the parse tree
*/
void enterOpcode(pdp7Parser.OpcodeContext ctx);
/**
* Exit a parse tree produced by {@link pdp7Parser#opcode}.
* @param ctx the parse tree
*/
void exitOpcode(pdp7Parser.OpcodeContext ctx);
}

View File

@@ -1,210 +0,0 @@
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
T__12=13
T__13=14
T__14=15
T__15=16
T__16=17
T__17=18
T__18=19
T__19=20
T__20=21
T__21=22
T__22=23
T__23=24
T__24=25
T__25=26
T__26=27
T__27=28
T__28=29
T__29=30
T__30=31
T__31=32
T__32=33
T__33=34
T__34=35
T__35=36
T__36=37
T__37=38
T__38=39
T__39=40
T__40=41
T__41=42
T__42=43
T__43=44
T__44=45
T__45=46
T__46=47
T__47=48
T__48=49
T__49=50
T__50=51
T__51=52
T__52=53
T__53=54
T__54=55
T__55=56
T__56=57
T__57=58
T__58=59
T__59=60
T__60=61
T__61=62
T__62=63
T__63=64
T__64=65
T__65=66
T__66=67
T__67=68
T__68=69
T__69=70
T__70=71
T__71=72
T__72=73
T__73=74
T__74=75
T__75=76
T__76=77
T__77=78
T__78=79
T__79=80
T__80=81
T__81=82
T__82=83
T__83=84
T__84=85
T__85=86
T__86=87
T__87=88
T__88=89
T__89=90
T__90=91
T__91=92
T__92=93
T__93=94
LOC=95
RELOC=96
PLUS=97
MINUS=98
TIMES=99
DIV=100
LABEL=101
IDENTIFIER=102
NUMERIC_LITERAL=103
DECIMAL=104
OCTAL=105
DECIMAL_MINUS=106
STRING=107
COMMENT=108
EOL=109
WS=110
';'=1
'='=2
'>'=3
'dac'=4
'jms'=5
'dzm'=6
'lac'=7
'xor'=8
'add'=9
'tad'=10
'xct'=11
'isz'=12
'and'=13
'sad'=14
'jmp'=15
'nop'=16
'law'=17
'cma'=18
'las'=19
'ral'=20
'rar'=21
'hlt'=22
'sma'=23
'sza'=24
'snl'=25
'skp'=26
'sna'=27
'szl'=28
'rtl'=29
'rtr'=30
'cil'=31
'rcl'=32
'rcr'=33
'cia'=34
'lrs'=35
'lrss'=36
'lls'=37
'llss'=38
'als'=39
'alss'=40
'mul'=41
'idiv'=42
'lacq'=43
'clq'=44
'omq'=45
'cmq'=46
'lmq'=47
'dscs'=48
'dslw'=49
'dslm'=50
'dsld'=51
'dsls'=52
'dssf'=53
'dsrs'=54
'iof'=55
'ion'=56
'caf'=57
'clon'=58
'clsf'=59
'clof'=60
'ksf'=61
'krb'=62
'tsf'=63
'tcf'=64
'tls'=65
'sck'=66
'cck'=67
'lck'=68
'rsf'=69
'rsa'=70
'rrb'=71
'psf'=72
'pcf'=73
'psa'=74
'cdf'=75
'rlpd'=76
'lda'=77
'wcga'=78
'raef'=79
'beg'=80
'spb'=81
'cpb'=82
'lpb'=83
'wbl'=84
'dprs'=85
'dpsf'=86
'dpcf'=87
'dprc'=88
'crsf'=89
'crrb'=90
'sys'=91
'czm'=92
'irss'=93
'dsm'=94
'.'=95
'..'=96
'+'=97
'-'=98
'*'=99
'/'=100

View File

@@ -1,210 +0,0 @@
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
T__12=13
T__13=14
T__14=15
T__15=16
T__16=17
T__17=18
T__18=19
T__19=20
T__20=21
T__21=22
T__22=23
T__23=24
T__24=25
T__25=26
T__26=27
T__27=28
T__28=29
T__29=30
T__30=31
T__31=32
T__32=33
T__33=34
T__34=35
T__35=36
T__36=37
T__37=38
T__38=39
T__39=40
T__40=41
T__41=42
T__42=43
T__43=44
T__44=45
T__45=46
T__46=47
T__47=48
T__48=49
T__49=50
T__50=51
T__51=52
T__52=53
T__53=54
T__54=55
T__55=56
T__56=57
T__57=58
T__58=59
T__59=60
T__60=61
T__61=62
T__62=63
T__63=64
T__64=65
T__65=66
T__66=67
T__67=68
T__68=69
T__69=70
T__70=71
T__71=72
T__72=73
T__73=74
T__74=75
T__75=76
T__76=77
T__77=78
T__78=79
T__79=80
T__80=81
T__81=82
T__82=83
T__83=84
T__84=85
T__85=86
T__86=87
T__87=88
T__88=89
T__89=90
T__90=91
T__91=92
T__92=93
T__93=94
LOC=95
RELOC=96
PLUS=97
MINUS=98
TIMES=99
DIV=100
LABEL=101
IDENTIFIER=102
NUMERIC_LITERAL=103
DECIMAL=104
OCTAL=105
DECIMAL_MINUS=106
STRING=107
COMMENT=108
EOL=109
WS=110
';'=1
'='=2
'>'=3
'dac'=4
'jms'=5
'dzm'=6
'lac'=7
'xor'=8
'add'=9
'tad'=10
'xct'=11
'isz'=12
'and'=13
'sad'=14
'jmp'=15
'nop'=16
'law'=17
'cma'=18
'las'=19
'ral'=20
'rar'=21
'hlt'=22
'sma'=23
'sza'=24
'snl'=25
'skp'=26
'sna'=27
'szl'=28
'rtl'=29
'rtr'=30
'cil'=31
'rcl'=32
'rcr'=33
'cia'=34
'lrs'=35
'lrss'=36
'lls'=37
'llss'=38
'als'=39
'alss'=40
'mul'=41
'idiv'=42
'lacq'=43
'clq'=44
'omq'=45
'cmq'=46
'lmq'=47
'dscs'=48
'dslw'=49
'dslm'=50
'dsld'=51
'dsls'=52
'dssf'=53
'dsrs'=54
'iof'=55
'ion'=56
'caf'=57
'clon'=58
'clsf'=59
'clof'=60
'ksf'=61
'krb'=62
'tsf'=63
'tcf'=64
'tls'=65
'sck'=66
'cck'=67
'lck'=68
'rsf'=69
'rsa'=70
'rrb'=71
'psf'=72
'pcf'=73
'psa'=74
'cdf'=75
'rlpd'=76
'lda'=77
'wcga'=78
'raef'=79
'beg'=80
'spb'=81
'cpb'=82
'lpb'=83
'wbl'=84
'dprs'=85
'dpsf'=86
'dpcf'=87
'dprc'=88
'crsf'=89
'crrb'=90
'sys'=91
'czm'=92
'irss'=93
'dsm'=94
'.'=95
'..'=96
'+'=97
'-'=98
'*'=99
'/'=100

View File

@@ -1,35 +0,0 @@
package com.khubla.pdp7parse;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Collection;
import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.junit.Test;
import com.khubla.pdp7parse.antlr4.pdp7Parser.ProgContext;
public class BasicTests {
@Test
public void test1() {
String[] extensions = new String[] { "s" };
Collection<File> files = FileUtils.listFiles(new File("src/test/resources"), extensions, true);
for (File file : files) {
testFile(file);
}
}
private void testFile(File file) {
try {
System.out.println(file.getAbsolutePath());
InputStream is = new FileInputStream(file);
ProgContext progContext = PDP7Parser.parse(is, System.out);
Assert.assertNotNull(progContext);
} catch (Exception e) {
e.printStackTrace();
Assert.fail();
}
}
}

View File

@@ -1,586 +0,0 @@
" adm
lac 017777 i
sad d4
jmp nofiles
lac 017777
tad d1
dac name
jms connect
sys time
llss 9
ecla lls 3
tad o60
alss 9
dac snumb
ecla llss 3
tad o60
alss 9
dac snumb+1
ecla llss 3
tad o60
alss 9
dac snumb+2
lac d1
sys write; snumb; 3
lac d1
sys write; o12; 1
jms gcard; <$;<*;<$;<7;<c;0
jms gcard; <$;<*;<$;<r;<c;<d;0
jms gcard; <$;<%;6;<s;<n;<u;<m;<b;<%;3;<7;<c
snumb:
<x;<x;<x;<,;<3;<1;0
jms gcard; <$;<%;6;<i;<d;<e;<n;<t;<%;3;<m;<0;<1;<3;<0;<,
<m;<3;<2;<2;<,;<k;<e;<n;0
jms gcard; <$;<%;6;<s;<e;<l;<e;<c;<t;<%;2;<k;<e;<n
</;<d;<m;<p;<o;<f;<f;0
jms gcard; <$;<%;6;<l;<i;<m;<i;<t;<s;<%;2;<3;<,;<,;<,
<9;<0;<0;<0;<0
jms gcard; <$;<%;6;<d;<a;<t;<a;<%;4;<i;<*;<,
<n;<c;<k;<s;<u;<m;<,
<c;<o;<p;<y;0
jmp floop1
floop:
lac fi
sys close
floop1:
lac 017777 i
sad d4
jmp done
tad dm4
dac 017777 i
lac name
tad d4
dac name
sys open; name; ..; 0
spa
jmp ferror
dac fi
-1
tad name
dac 8
r4
dac c1
1:
lac 8 i
jms putw
isz c1
jmp 1b
jms gcard; 0
jms flush
lac o200500 " first card, 7/9
dac buf
dzm buf+1 " seq
cloop:
dzm buf+2 " word count
dzm buf+3 " checksum
law buf+3
dac 10
-44
dac c1
wloop:
jms getword
jmp eof
dac 10 i
add buf+3
dac buf+3 " check sum
isz buf+2 " word count
isz c1
jmp wloop
lac buf+3
add buf
add buf+1
add buf+2
dac buf+3 " ffinal check sum
jms putcard
lac buf
and o577777 " not first card
dac buf
isz buf+1 " sequence
jmp cloop
eof:
dzm 10 i
isz c1
jmp eof
lac buf
xor o400000
dac buf " last card
lac buf+3
add buf
add buf+1
add buf+2
dac buf+3 " final check sum
jms putcard
jmp floop
getword: 0
lac ipt
sad eipt
jmp 1f
lac ipt i
isz ipt
isz getword
jmp getword i
1:
lac fi
sys read; ibuf; 64
sna
jmp getword i
tad iipt
dac eipt
lac iipt
dac ipt
jmp getword+1
ipt: 0
eipt: 0
iipt: ibuf
putcard: 0
-48
dac c1
law buf-1
dac 10
1:
lac 10 i
lmq
-3
dac c2
2:
ecla llss 6
tad lactab
dac .+1
lac ..
dac opt i
isz opt
isz c2
jmp 2b
isz c1
jmp 1b
-16
dac c1
cla
1:
dac opt i
isz opt
isz c1
jmp 1b
law 0144
jms message; tbuf
law tbuf
dac opt
jmp putcard i
jmp floop
ferror:
lac name
dac 1f
lac d1
sys write; 1:..; 4
lac d1
sys write; 1f; 1
fmp floop1
1: 077012
hangup:
lac d1
sys write; m1; m1s
jmp stop
abort:
lac d1
sys write; m2; m2s
jmp stop
nofiles:
lac d1
sys write; m3; m3s
sys exit
discon:
lac d1
sys write; m4; m4s
jmp stop
m1:
<ha>;<ng>;<up>;012
m2s = .-m1
m2:
<ab>;<or>;<te>;<d 012
m2s = .-m2
m3:
<us>;<ag>;<e;<:;040;<ad>;<m 040; <fi>;<le>;<s 012
<di>;<al>;040;<x;<5;<3;<8;<0 040; <on>;040;<th>;<e 040
<da>;<ta>;<ph>;<on>;<e 012
m3s = .-m3
m4:
<di>;<sc>;<on>;<ne>;<ct>;<ed>;012
m4s = .-m4
stop:
dpof
las
and o400000
sna
sys save
sys exit
carrier: 0100000
ilock: 040000
totime: 300
disflg: 0
flush: 0
lac noc
sna
jmp flush i
law 0104
jms message; tbuf
law tbuf
dac opt
dzm noc
jmp flush i
gcard: 0
lac gcard i
isz gcard
sna
jmp 3f
lrss 9
sad o45
jmp 1f
jms putc
jmp gcard+1
1:
-1
tad gcard i
cma
dac 2f
isz gcard
1:
law 040
jms putc
isz 2f
jmp 1b
jmp gcard+1
2: 0
3:
lac noc
sna
jmp gcard i
sad d80
jmp gcard i
law 040
jms putc
jmp 3b
done:
jms gcard; <$;<%;6;<e;<n;<d;<c;<o;<p;<y;0
jms gcard; <$;<%;6;<s;<y;<s;<o;<u;<t;<%;2;<p;<*;0
jms gcard; <$;<%;6;<e;<n;<d;<j;<o;<b;0
-1
dac disflg
1:
jms gcard; <$;<*;<$;<d;<i;<s;0
jmp 1b
putw: 0
dac 1f
lrss 9
jms putc
lac 1f
jms putc
jmp putw i
1: 0
putc: 0
and o177
dac opt i
-0141
tad opt i
spa
jmp 1f
-0173
tad opt i
sma
jmp 1f
-040
tad opt i
dac opt i
1:
isz opt
isz noc
lac noc
sad d160
skp
jmp putc i
dzm noc
law tbuf
dac opt
law 0110
jms message; tbuf
jmp putc i
noc: 0
opt: tbuf
connect: 0
dpon
dpop
law 4
sys sysloc
tad d14
dac systime
law 11
sys sysloc
dac dpstat
tad d1
dac dpread
tad d1
dac dpwrite
tad d1
dac dpchar
dzm dpstat i
las
dac opch
1:
las
sad opch
skp
jmp abort
sys time
lac dpstat i
and ilock
sna
jmp 1b
law 041
dac echoch
law 0102
jms message; 0
jmp i connect
message: 0
dac stsch
retry:
lac dpstat i
and carrier
sza
jmp retry
dprs
and ilock
sna
jmp hangup
lac d1
dac dpwrite i
sys time
lacq
tad totime
dac rctim
" put out 6 sync characters
-6
dac c2
1:
law 026
jms transch
isz c2
jmp 1b
" put out stx character
law 002
jms transch
dzm sum
" put out the status character
lac stsch
jms transch
" echo the sequence character
lac echoch
jms transch
" if there is a buffer pointer
" put out 160 words of data
-1
tad i message
spa
jmp 2f
dac 10
-160
dac c2
1:
lac 10 i
jms transch
isz c2
jmp 1b
" put out etx character
2:
law 003
jms transch
" put out lateral parity
lac sum
jms transch
" put out a sync
law 026
jms transch
" loop looking for stx
1:
jms recvch
sad o2
skp
jmp 1b
dzm sum
" pick up op code
jms recvch
spa
jmp error
dac opch
" pick up sequence character
jms recvch
spa
jmp error
dac seqch
sad echoch
jmp error
" skip over data block to etx character
1:
jms recvch
spa
jmp error
sad o3
skp
jmp 1b
" pick up the lateral parity character
jms recvch
lac sum
and o177
sza
jmp error
" and exit
lac seqch
dac echoch
-1
dac 7
isz message
lac opch
sad o122
jmp i message
lac distlg
sna
jmp discon
jmp stop
transch: 0
lmq
xor sum
dac sum
1:
jms checktim
lac dpwrite i
sna
jmp 1b
dzm dpwrite i
lacq
dpwc
jmp i transch
recvch: 0
1:
jms checktim
lac dpread i
sna
jmp 1b
dzm dpread i
lac dpchar i
xor sum
dac sum
lac dpchar i
jmp i recvch
checktim: 0
lac systime i
cma
tad rctim
spa
jmp error
jmp i checktim
error:
lac stsch
lmq
lac o2
omq
dac stsch
jmp retry
d1: 1
d4: 4
o60: 060
o12: 012
dm4: -4
o45: 045
o177: 0177
d160: 160
d80: 80
d14: 14
o400000: 0400000
o577777: 0577777
o200500: 0200500
o122: 0122
o3: 3
o2: 2
lactab: lac .+1
0060;0061;0062;0063;0064;0065;0066;0067
0070;0071;0133;0043;0100;0072;0076;0077
0040;0101;0102;0103;0104;0105;0106;0107
0110;0111;0046;0056;0135;0050;0074;0134
0136;0112;0113;0114;0115;0116;0117;0120
0121;0122;0055;0044;0052;0051;0073;0047
0053;0057;0123;0124;0125;0126;0127;0130
0131;0132;0137;0054;0045;0075;0042;0041
dpstat: .=.+1
dpread: .=.+1
dpwrite: .=.+1
dpchar: .=.+1
systime: .=.+1
opch: .=.+1
stsch: .=.+1
echoch: .=.+1
seqch: .=.+1
tbuf: .=.+160
buf: .=.+48
ibuf: .=.+64
rctim: .=.+1
fi: .=.+1
c1: .=.+1
c2: .=.+1
sum: .=.+1
dpon = 0704701
dpof = 0704704
dpwc = 0704722
dpop = 0704764
dprs = 0704752

View File

@@ -1,683 +0,0 @@
" apr
lac 017777 i
sad d4
jmp nofiles
lac 017777
tad d1
dac name
jms connect
sys time
llss 9
ecla llss 3
tad o60
alss 9
dac snumb
ecla llss 3
tad o60
alss 9
dac snumb+1
ecla llss 3
tad o60
alss 9
dac snumb+2
lac d1
sys write; snumb; 3
lac d1
sys write; o12; 1
jms gcard; <$;<*;<$;<7;<c;<%;67;0
jms gcard; <$;<*;<$;<r;<c;<d;<%;66;0
jms gcard; <$;<%;6;<s;<n;<u;<m;<b;<%;3;<7;<c
snumb:
<x;<x;<x;<,;<3;<1;<%;49;0
jms gcard; <$;<%;6;<i;<d;<e;<n;<t;<%;3;<m;<0;<1;<3;<0;<,
<m;<3;<2;<2;<,;<k;<e;<n;<%;48;0
jms gcard; <$;<%;6;<s;<e;<l;<e;<c;<t;<%;2;<k;<e;<n
</;<p;<r;<n;<o;<f;<f;<%;47;0
jms gcard; <$;<%;6;<l;<i;<m;<i;<t;<s;<%;2;<2;<,;<,;<,
<9;<0;<0;<0;<%;49;0
jms gcard; <$;<%;6;<d;<a;<t;<a;<%;4;<i;<*;<,;<,;<c;<o;<p;<y;<%;49;0
jmp 1f
floop:
lac fi
sys close
1:
law 041
jms putc
law 040
jms putc
law 044
jms putc
law040
jms putc
floop1:
lac 017777 i
sad d4
jmp done
tad dm4
dac 017777 i
lac name
tad d4
dac name
sys open; name; ..; 0
spa
jmp ferror
dac fi
jmp loop
ferror:
lac name
dac 1f
lac d1
sys write; 1;..; 4
lac d1
sys write; 1f; 1
jmp floop1
1: 077012
loop:
dzm crflg
dzm col
law cbuf1-1
dac 8
-200
dac c
1:
dzm 8 i
isz c
jmp 1b
cloop:
jms getc
dac ch
sad o4
jmp pass2
sad o12
jmp pass2
sad o10
jmp bksp
sad o15
jmp cret
sad o40
jmp 1f
law cbuf1
tad col
dac t
lac t i
sza
jmp inb2
lac ch
dac t i
1:
isz col
jmp cloop
inb2:
law cbuf2
tad col
dac t
dac crflg
lac ch
dac t i
isz col
jmp cloop
bksp:
-1
tad col
spa
cla
dac col
jmp cloop
cret:
czm col
jmp cloop
pass2:
law cbuf1
p21:
dac t
dzm case
-100
dac c
dzm nblank
p2loop:
lac t i
sna
jmp blk
-1
tad nblank
spa
jmp 2f
cma
dac c1
1:
law 040
jms putc
isz c1
jmp 1b
dzm nblank
2:
law casetab
tad t i
dac t1
lac t1 i
sad case
jmp 1f
sad d2
jmp 1f
dac case
law 041
jms putc
law 041
jms putc
1:
lac t i
sad o44
jmp dol
sad o41
law 045
sad o77
law 0100
sad o134
law 0137 " ??
sad o137
law 055
sad o140
law 0134
sad o173
law 0133
sad o174
law 046
sad o175
law 0135
sad o176
law 0137 " ??
jms putc
jmp p2test
dol:
law 044
jms putc
law 044
jms putc
jmp p2test
blk:
isz nblank
p2test:
isz t
isz c
jmp p2loop
lac crflg
sna
jmp 1f
law 041
jms putc
law 060
jms putc
law 044
jms putc
law 040
jms putc
dzm crflg
law cbuf2
jmp p21
1:
law 044
jms putc
law 040
jms putc
lac ch
sad o4
jmp floop
jmp loop
getc: 0
lac ipt
sad eipt
jmp 1f
dac 2f
add o400000
dac ipt
ral
lac 2f i
szl
lrss 9
and o177
sna
jmp getc+1
jmp getc i
1:
lac fi
sys read; rbuf; 64
sna
jmp 1f
tad iipt
dac eipt
lac iipt
dac ipt
jmp getc+1
1:
lac o4
jmp getc i
hangup:
lac d1
sys write; m1; m1s
jmp stop
abort:
lac d1
sys write; m2; m2s
nofiles:
lac d1
sys write; m3; m3s
sys exit
discon:
lac d1
sys write; m4; m4s
jmp stop
m1:
<ha>;<ng>;<up>;012
m1s = .-m1
m2:
<ab>;<or>;<te>;<d 012
m2s = .-m2
m3:
<us>;<ag>;<e;<;;040;<ap>;<r 040; <fi>;<le>;<s 012
<di>;<al>;040;<x;<5;<3;<8;<0 040; <on>;040;<th>;<e 040
<da>;<ta>;<ph>;<on>;<e 012
m3s = .-m3
m4:
<di>;<sc>;<on>;<ne>;<ct>;<ed>;012
m4s = .-m4
stop:
dpof
sys exit
ipt: 0
eipt: 0
iipt: rbuf
fi: 0
opt: tbuf
noc: 0
carrier: 0100000
ilock: 040000
totime: 300
disflg: 0
casetab:
2;2;2;2;2;2;2;2
2;2;2;2;2;2;2;2
2;2;2;2;2;2;2;2
2;2;2;2;2;2;2;2
2;1;2;2;2;0;0;2
2;2;2;2;2;0;2;2
2;2;2;2;2;2;2;2
2;2;2;2;2;2;2;1
0;0;0;0;0;0;0;0
0;0;0;0;0;0;0;0
0;0;0;0;0;0;0;0
0;0;0;0;0;0;2;1
2;1;1;1;1;1;1;1
1;1;1;1;1;1;1;1
1;1;1;1;1;1;1;1
1;1;1;1;1;1;1;1
gcard: 0
lac gcard i
isz gcard
sna
jmp gcard i
irss 9
sad o45
jmp 1f
jms putc
jmp gcard+1
1:
-1
tad gcard i
cma
dac 2f
isz gcard
1:
law 040
jms putc
isz 2f
jmp 1b
jmp gcard+1
2: 0
done:
lac noc
sna
jmp 1f
sad d72
jmp 1f
law 040
jms putc
jmp done
1:
jms gcard; <$;<%;6;<e;<n;<d;<c;<o;<p;<y;<%;58;0
jms gcard; <$;<%;6;<s;<y;<s;<o;<u;<t;<%;2;<p;<*;<%;55;0
jms gcard; <$;<%;6;<e;<n;<d;<j;<o;<b;<%;59;0
-1
dac disflg
1:
jms gcard; <$;<*;<$;<d;<i;<s;<%;66;0
jmp 1b
putc: 0
and o177
dac opt i
-0141
tad opt i
spa
jmp 1f
-0173
tad opt i
sma
jmp 1f
-040
tad opt i
dac opt i
1:
isz opt
isz noc
lac noc
sad d144
skp
jmp putc i
dzm noc
law tbuf
dac opt
law 0110
jms message; tbuf
jmp putc i
connect: 0
dpon
dpop
law 4
sys sysloc
tad d14
dac systime
law 11
sys sysloc
dac dpstat
tad d1
dac dpread
tad d1
dac dpwrite
tad d1
dac dpchar
dzm dpstat i
las
dac opch
1:
las
sad opch
skp
jmp abort
sys time
lac dpstat i
and ilock
sna
jmp 1b
law 041
dac echoch
law 0102
jms message; 0
jmp i connect
message: 0
dac stsch
retry:
lac dpstat i
and carrier
sza
jmp retry
dprs
and ilock
sna
jmp hangup
lac d1
dac dpwrite i
sys time
lacq
tad totime
dac rctim
" put out 6 sync characters
-6
dac c2
1:
law 026
jms transch
isz c2
jmp 1b
" put out stx character
law 002
jms transch
dzm sum
" put out the status character
lac stsch
jms transch
" echo the sequence character
lac echoch
jms transch
" if there is a buffer pointer
" put out 160 words of data
-1
tad i message
spa
jmp 2f
dac 10
jms transcd
jms transcd
" put out etx character
2:
law 003
jms transch
" put out lateral parity
lac sum
jms transch
" put out a sync
law 026
jms transch
" loop looking for stx
1:
jms recvch
sad o2
skp
jmp 1b
dzm sum
" pick up op code
jms recvch
spa
jmp error
dac opch
" pick up sequence character
jms recvch
spa
jmp error
dac seqch
sad echoch
jmp error
" skip over data block to etx character
1:
jms recvch
spa
jmp error
sad o3
skp
jmp 1b
" pick up the lateral parity character
jms recvch
lac sum
and o177
sza
jmp error
" and exit
lac seqch
dac echoch
-1
dac 7
isz message
lac opch
sad o122
jmp i message
lac disflg
sna
jmp discon
jmp stop
transcd: 0
-72
dac c2
1:
lac 10 i
jms transch
isz c2
jmp 1b
-8
dac c2
1:
law 040
jms transch
isz c2
jmp 1b
jmp transch i
transch: 0
lmq
xor sum
dac sum
1:
jms checktim
lac dpwrite i
sna
jmp 1b
dzm dpwrite i
lacq
dpwc
jmp i transch
recvch: 0
1:
jms checktim
lac dpread i
sna
jmp 1b
dzm dpread i
lac dpchar i
xor sum
dac sum
lac dpchar i
jmp i recvch
checktim: 0
lac systime i
cma
tad rctim
spa
jmp error
jmp i checktim
error:
lac stsch
lmq
lac o2
omq
dac stsch
jmp retry
d1: 1
o60: 060
o122: 0122
d72: 72
o45: 045
o134: 0134
o140: 0140
o41: 041
o44: 044
o77: 077
o137: 0137
o173: 0173
o174: 0174
o175: 0175
o176: 0176
d128: 128
o400000: 0400000
o177: 0177
o2:d2: 2
o3: 3
d14: 14
d144: 144
o12: 012
d4:o4: 04
dm4: -4
o10: 010
o15: 015
o40: 040
crflg: .=.+1
col: .=.+1
t: .=.+1
t1: .=.+1
c: .=.+1
c1: .=.+1
c2: .=.+1
dpstat: .=.+1
dpread: .=.+1
dpwrite: .=.+1
dpchar: .=.+1
systime: .=.+1
opch: .=.+1
stsch: .=.+1
echoch: .=.+1
seqch: .=.+1
tbuf: .=.+144
rbuf: .=.+64
rctim: .=.+1
sum: .=.+1
ch: .=.+1
nblank: .=.+1
case: .=.+1
cbuf1: .=.+100
cbuf2: .=.+100
dpon = 0704701
dpof = 0704704
dpwc = 0704722
dpop = 0704764
dprs = 0704752

View File

@@ -1,151 +0,0 @@
" cat: cat [arg1 arg2 ...]
" Load the pointer pointer in 017777 to see if we have any arguments
lac 017777 i
sad d4 " Skip if we have more than four argument words
jmp nofiles " Only four argument words, so no arguments
lac 017777 " Move five words past the argument word count
tad d1 " so that AC points at the first argument
tad d4 " and save the pointer in name
dac name
loop:
sys open; name:0; 0 " Open file, get fd back
spa
jmp badfile " Negative fd, exit with an error message
dac fi " Save file descriptor in fi
1:
jms getc " Get a character in AC
sad o4
jmp 1f " Break the loop when we get a ctrl-D
jms putc " Write the character on stdout
jmp 1b " and loop back
1:
lac fi " Close the file descriptor in fi
sys close
loop1:
-4
tad 017777 i " Subtract 4 from the count of argument words
dac 017777 i
sad d4 " Is the value 4, i.e. no args left?
jmp done " Yes, so exit
lac name " Still an argument, so move up
tad d4 " to the next filename argument
dac name
jmp loop " and loop back to cat this file
badfile:
lac name " Get the pointer to the filename
dac 1f " Store it in 1f below
lac d8 " Load fd 8 which is stderr
sys write; 1:0; 4 " Write the four words of the filename
lac d8
sys write; 1f; 2 " and then write " ?\n"
jmp loop1 " Now try doing the next argument
1: 040;077012 " String literal: " ?\n"
nofiles:
lac d8
sys write; 1f; 5 " Write "No files\n" to stderr
sys exit " and exit
1: <no>; 040; <fi>;<le>;<s 012
done:
lac noc " Is the number of characters left zero?
sna
sys exit " Yes, exit
and d1
sna cla
jmp 1f
jms putc " Store the character in the buffer
jmp done " and loop back
1:
lac noc " Get the number of characters in the buffer
rcr " Divide by two to convert to words
dac 1f " Save in the write's word count below
lac fo " Load fd 1, stdout
sys write; iopt+1; 1:.. " Write the leftover buffer and exit
sys exit
getc: 0
lac ipt " Load the pointer to the next word in the buffer
sad eipt
jmp 1f " We've reached the end of the buffer, so read more
dac 2f " Save the pointer
add o400000 " Flip the msb and save into ipt
dac ipt
ral " Move the msb into the link register
lac 2f i " Load the word from the buffer
szl " Skip if this is the second character in the word
lrss 9 " It's the first char, shift down the top character
and o177 " Keep the lowest 7 bits
sna
jmp getc+1 " Skip a NUL characters and read another one
jmp getc i " Return the character from the subroutine
1:
lac fi " Buffer is empty, read another 64 characters
sys read; iipt+1; 64
sna
jmp 1f " No characters were read in
tad iipt " Add the word count to the base of the buffer
dac eipt " and store in the end buffer pointer
lac iipt " Reset the ipt to the base of the buffer
dac ipt
jmp getc+1 " and loop back to get one character
1:
lac o4 " No character, return with ctrl-D
jmp getc i " return from subroutine
putc: 0
and o177 " Keep the lowest 7 bits and save into 2f+1
dac 2f+1
lac opt " Save the pointer to the empty buffer
dac 2f " position to 2f
add o400000 " Flip the msb and save back into opt
dac opt " This also has the effect of incrementing
" the opt pointer every second addition!
spa " If the bit was set, we already have one
jmp 1f " character at 2f+1. If no previous character,
lac 2f i " merge the old and new character together
xor 2f+1
jmp 3f " and go to the "save it in buffer" code
1:
lac 2f+1 " Move the character up into the top half
alss 9
3:
dac 2f i " Save the word into the buffer
isz noc " Add 1 to the char count, never skipping
lac noc " Have we reached 128 characters, 64 words?
sad d128
skp
jmp putc i " No, so return (more room still in the buffer)
lac fo " Load fd1 (i.e stdout)
sys write; iopt+1; 64 " and write out the 64 words in the buffer
lac iopt
dac opt " Set opt pointing back to base of buffer
dzm noc " Set the number of chars in the buffer to 0
jmp putc i " and return
2: 0;0 " Current input and output word pointers
ipt: 0 " Current input buffer base
eipt: 0 " Pointer to end of data read in input buffer
iipt: .+1; .=.+64 " 64 word input buffer and pointer to it
fi: 0 " Input file descriptor
opt: .+2 " Current output buffer base
iopt: .+1; .=.+64 " 64 word output buffer and pointer to it
noc: 0 " Number of output characters
fo: 1 " Output file descriptor, fd 1 is stdout
d1: 1 " Octal and decimal constants
o4:d4: 4
d8: 8
o400000: 0400000 " Msb toggle bit
o177: 0177 " ASCII mask
d128: 128 " 128 words in the output buffer

View File

@@ -1,77 +0,0 @@
" chmode
lac 017777 i
sad d4
jmp error
lac 017777
tad d4
dac 8
tad d1
dac name
dzm octal
dzm nchar
-8
dac c1
1:
lac nchar
dzm nchar
sza
jmp 2f
lac 8 i
lmq
and o177
dac nchar
lacq
lrss 9
2:
sad o40
jmp 3f
tad om60
lmq
lac octal
cll; als 3
omq
dac octal
3:
isz c1
jmp 1b
loop:
lac 017777 i
sad d8
sys exit
tad dm4
dac 017777 i
lac name
tad d4
dac name
lac octal
sys chmode; name:0
sma
jmp loop
lac name
dac 1f
lac d1
sys write; 1:0; 4
lac d1
sys write; 1f; 2
jmp loop
1:
040;077012
error:
lac d1
sys write; 1b+1; 1
sys exit
om60: -060
o40: 040
d1: 1
d8: 8
dm4: -4
d4: 4
o177: 0177
nchar: .=.+1
c1: .=.+1
octal: .=.+1

View File

@@ -1,76 +0,0 @@
" chown
lac 017777 i
sad d4
jmp error
lac 017777
tad d4
dac 8
tad d1
dac name
dzm octal
dzm nochar
-8
dac c1
1:
lac nchar
dzm nchar
sza
jmp 2f
lac 8 i
lmq
and o177
dac nchar
lacq
lrss 9
2:
sad o40
jmp 3f
tad om60
lmq
lac octal
cll; als 3
omq
dac octal
3:
isz c1
jmp 1b
loop:
lac 017777 i
sad d8
sys exit
tad dm4
dac 017777 i
lac name
tad d4
dac name
lac octal
sys chowner; name:0
sma
jmp loop
lac name
dac 1f
lac d1
sys write; 1:0; 4
lac d1
sys write; 1f; 2
jmp loop
1:
040;077012
error:
lac d1
sys write; 1b+1; 1
sys exit
om60: -060
o40: 040
d1: 1
d8: 8
dm4: -4
d4: 4
o177: 0177
nchar: .=.+1
c1: .=.+1
octal: .=.+1

View File

@@ -1,97 +0,0 @@
" cp
lac 017777
tad d1
dac name2
loop:
lac 017777 i
sad d4
sys exit
sad d8
jmp unbal
tad dm8
dac 017777 i
lac name2
tad d4
dac name1
tad d4
dac name2
sys open; name1: 0; 0
spa
jmp error
lac o17
sys creat; name2: 0
spa
jmp error
dzm nin
1:
lac bufp
tad nin
dac 0f
-1
tad nin
cma
tad d1024
dac 0f+1
lac d2
sys read; 0:..;..
sna
jmp 2f
tad nin
dac nin
sad d1024
jmp 2f
jmp 1b
2:
lac nin
dac 2f
lac d3
sys write; buf; 2: 0
dzm nin
lac 2b
sad d1024
jmp 1b
lac d2
sys close
lac d3
sys close
jmp loop
error:
lac name1
dac 1f
lac d1
sys write; 1: 0; 4
lac d1
sys write; mes; 1
lac name2
dac 1f
lac d1
sys write; 1: 0; 4
lac d1
sys write; mes; 2
jmp loop
mes:
040000;077012
unbal:
lac name2
tad d4
dac 1f
lac d1
sys write; 1: 0; 4
lac d1
sys write; mes; 2
sys exit
d1: 1
d4: 4
d8: 8
o17: 017
dm8: -8
d3: 3
d1024: 1024
nin: 0
bufp: buf
d2: 2
buf:

View File

@@ -1,256 +0,0 @@
" dmabs
lac o17
sys creat; punout
spa
sys save
dac fo
lac 017777
tad d1
dac name
jms space
100
loop:
dzm oldsum
lac initcmd
dac comand
lac i 017777
sad d4
jmp stop
tad dm4
dac i 017777
lac name
tad d4
dac name
dump1:
lac comand
xor dactra
dac tracmd
dump2:
sys open; name: 0; 0
spa
jmp opnerr
dac fi
-bootsiz
dac c1
law boot-1
dac 8
1:
lac i 8
jms put
isz c1
jmp 1b
lac bootcmd
lrs 12
jms put1
lac bootcmd
lrs 6
jms put1
lac bootcmd
and o77
xor o300
jms put2
jms space
3
dump3:
-1
tad bufp
dac 8
-64
dac c1
1:
dzm i 8
isz c1
jmp 1b
lac fi
sys read; bufp: buf; 64
sna
jmp done
dac count
-1
tad bufp
dac 8
-64
dac c1
cla
1:
add i 8
isz c1
jmp 1b
sna
jmp dump4
dac newsum
lac comand
jms put
lac count
jms put
lac oldsum
add comand
add count
jms put
lac newsum
dac oldsum
jms space
3
-1
tad bufp
dac 8
-1
tad count
cma
dac c1
1:
lac i 8
jms put
isz c1
jmp 1b
jms space
10
dump4:
lac comand
tad count
dac comand
jmp dump3
done:
lac tracmd
jms put
cla
jms put
lac oldsum
add tracmd
jms put
jms space
20
lac fi
sys close
jmp loop
stop:
cla
jms put
jms space
100
sys exit
space: 0
-1
tad i space
cma
dac c1
isz space
1:
lac o400
jms put2
isz c1
jmp 1b
jmp i space
put: 0
dac 1f
lrs 12
jms put1
lac 1f
lrs 6
jms put1
lac 1f
jms put1
jmp i put
1:0
put1:0
and o77
xor o200
jms put2
jmp i put1
put2: 0
dac 1f
lac fo
sys write; 1f; 1
jmp i put2
1: 0
boot:
org = 017740
2:
jms get1-boot+org
dac cmd-boot+org
jms get1-boot+org
cma
dac cnt-boot+org
jms get2-boot+org
xor sum-boot+org
dzm sum-boot+org
cla cll sza
hlt
isz cnt-boot+org
1:
jms get1-boot+org
cmd: 0
isz cmd-boot+org
isz cnt-boot+org
jmp 1b-boot+org
jmp 2b-boot+org
get1: 0
jms get2-boot+org
dac get2-boot+org
add sum-boot+org
dac sum-boot+org
lac get2-boot+org
jmp i get1-boot+org
get2: 0
iot 0144
1:
iot 0101
jmp 1b-boot+org
iot 0112
jmp i get2-boot+org
sum: 0
cnt = sum+1
bootsiz = .-boot
bootcmd: jmp org
opnerr:
lac name
dac 1f
lac d1
sys write; 1: 0; 4
lac d1
sys write; mes; 2
jmp loop
mes:
040;077012
comand: 0
tracmd: 0
d1: 1
.17777: 017777
o77: 077
o200: 0200
o300: 0300
d4: 4
d64: 64
dm4: -4
o400: 0400
punout: <pp>;<to>;<ut>;040040
o17: 017
fi: 0
fo: 0
count: 0
oldsum: 0
newsum: 0
daccmd: dac
dactra: dac jmp
initcmd: dac 0
c1: 0
buf:
iot = 0700000

View File

@@ -1,501 +0,0 @@
" ds
lac 017777 i
sad d8
skp
sys exit
lac 017777
tad d5
dac .+3
law 017
sys creat; ..
dac fo
law 017
sys creat; scrname
spa; jms error
dac fso
sys open; scrname; 0
spa; jms error
dac fsi
sys chdir; dd
spa; jms error
lac d1
sys write; pass1; 1
law fsobuf
dac fsopt
dzm nfiles
law fbuf
dac filp
dzm ndirs
law dbuf
dac dirp
dzm fsloc
sys open; dotdot; 0
spa; jms error
dac fd
jms readdir; dotdot
law statbuf
sys status; dotdot; dotdot
spa; jms error
lac statbuf+12 " i index
dac dirp i
isz dirp
-1
tad nfiles
cma
dac ddfiles
law fbuf
dac ddfilp
loop:
-1
tad ndirs
cma
dac c1
law dbuf
dac i1
1:
isz i1
lac i1 i
sad ddfilp i
jmp 2f
isz i1
isz c1
jmp 1b
lac ddfilp
tad i1
dac i1
lac i1 i
dac .+3
lac fsi
sys seek; ..; 0
lac fsi
sys read; scrname; 4
law statbuf
sys status; dotdot; scrname
spa; jms error
lac statbuf+0 " flags
and o20
sna
jmp 2f
sys open; scrname; 0
spa; jms error
dac fd
jms readdir; scrname
lac ddfilp i
dac dirp i
isz dirp
2:
isz ddfilp
isz ddfilp
isz ddfiles
jmp loop
" output phase
lac fso
sys write; fsobuf; 64
lac d1
sys write; pass2; 2
-500
dac c1
1:
law dbuf+2
dac i1
dzm fflg
law fbuf
dac i2
r1
tad nfiles
cma
dac c2
2:
lac c1
tad d501
sad i2 i
skp
jmp 3f
-1
tad i1
dac i3
iac i3 i
dac c3
law fbuf
dac i3
0:
lac i3 i
sad c3
jmp 0f
isz i3
isz i3
jmp 0b
0:
lac i3
tad d1
dac c3
lac c3 i
dac .+3
lac fsi
sys seek; ..; 0
lac fsi
sys read; scrname; 4
lac i2
tad d1
dac c3
lac c3 i
dac .+3
lac fsi
sys seek; ..; 0
lac fsi
sys read; dd; 4
lac fflg
sza
jmp 0f
lac nlinkt
sad nlinka
skp
jms fishy
dzm nlinka
law 012
jms putc
law statbuf
sys status; scrname; dd
spa; jms error
-1
tad statbuf+9
cma
dac nlinkt
-1
dac fflg
jms longout
law 012
jms putc
0:
isz nlinka
jms putname; scrname
jms putname; dd
law 012
jms putc
3:
isz i2
isz i2
lac i2
sad i1 i
skp
jmp .+3
isz i1
isz i1
isz c2
jmp 2b
isz c1
jmp 1b
lac nlinkt
sad nlinka
skp
jms fishy
sys chdir; system
jmp done
fishy: 0
jms asters
jms asters
law 012
jms putc
lac d1
sys write; 1f; 1
jmp fishy i
1: 052012
nlinka: 0
nlinkt: 0
asters: 0
-10
dac c
1:
law 052
jms putc
isz c
jmp 1b
jmp asters i
longout: 0
lac statbuf+12 " i
jms octal; -3
lac statbuf+0 " flags
jms octal; -2
lac statbuf+8 " uid
jms octal; -2
-1
tad statbuf+9 " nlinks
cma
jms octal; -2
lac statbuf+10
jms octal; -5
jmp longout i
readdir: 0
law 012
jms putc
law 012
jms putc
jms asters
lac readdir i
dac 5f
dac .+2
jms putname; ..
jms asters
law 012
jms putc
law 012
jms putc
isz readdir
isz ndirs
lac filp
dac dirp i
isz dirp
0:
jms copyz; buf; 64
lac fd
sys read; buf; 64
spa; jms error
sna
jmp 4f
-8
dac c1
law buf
dac i1
1:
lac i1 i
sna
jmp 3f
isz nfiles
dac filp i
isz filp
lac fsloc
dac filp i
tad d4
dac fsloc
isz filp
lac i1
tad d1
dac .+4
law statbuf
sys status; 5:..; ..
spa; jms error
jms longout
lac i1
tad d1
dac .+2
jms putname; ..
law 012
jms putc
lac i1
dac 8
lac 8 i
dac fsopt i
isz fsopt
lac 8 i
dac fsopt i
isz fsopt
lac 8 i
dac fsopt i
isz fsopt
lac 8 i
dac fsopt i
isz fsopt
law fsobuf+64
sad fsopt
skp
jmp 3f
lac fso
sys write; fsobuf; 64
law fsobuf
dac fsopt
3:
law 8
tad i1
dac i1
isz c1
jmp 1b
jmp 0b
4:
lac fd
sys close
jmp readdir i
putname: 0
-1
tad putname i
dac 8
-4
dac c
1:
lac 8 i
lrss 9
jms putc
llss 9
jms putc
isz c
jmp 1b
isz putname
jmp putname i
octal: 0
lmq
lac d5
tad octal i
cma
dac c
1:
llss 3
isz c
jmp 1b
lac octal i
dac c
1:
ecla llss 3
tad o60
jms putc
isz c
jmp 1b
law 040
jms putc
isz octal
jmp octal i
error: 0
-1
tad error
hlt
sys save
copyz: 0
-1
tad copyz i
dac 8
isz copyz
-1
tad copyz i
cma
dac 2f
isz copyz
1:
dzm 8 i
isz 2f
jmp 1b
jmp copyz i
2: 0
done:
lac noc
sna
sys exit
and d1
sna cla
jmp 1f
jms putc
jmp done
1:
lac noc
rcr
dac 1f
lac fo
sys write; obuf; 1;..
sys exit
putc: 0
and o177
dac 2f+1
lac opt
dac 2f
add o400000
dac opt
spa
jmp 1f
lac 2f i
xor 2f+1
jmp 3f
1:
lac 2f+1
alss 9
3:
dac 2f i
isz noc
lac noc
sad d128
skp
jmp putc i
lac fo
sys write; obuf; 64
lac iopt
dac opt
dzm noc
jmp putc i
2: 0;0
opt: obuf
iopt: obuf
noc: 0
fo: 1
d1: 1
o177: 0177
o400000: 0400000
d128: 128
d4: 4
d5: 5
d8: 8
o60: 060
o20: 020
d501: 501
dd:
<dd>; 040040; 040040; 040040
dotdot:
056056; 040040; 040040; 040040
system:
<sy>;<st>;<em>; 040040
scrname:
<*s>;<rc>;040040;040040
pass2:
<i
pass1:
<i 012
fso: .=.+1
fsi: .=.+1
fsloc: .=.+1
nfiles: .=.+1
fflg: .=.+1
buf: .=.+64
obuf: .=.+64
fd: .=.+1
filp: .=.+1
ddfilp: .=.+1
ddfiles: .=.+1
statbuf: .=.+13
c: .=.+1
i1: .=.+1
i2: .=.+1
i3: .=.+1
c1: .=.+1
c2: .=.+1
c3: .=.+1
ndirs: .=.+1
dirp: .=.+1
fsopt: .=.+1
fsobuf: .=.+64
dbuf: .=.+100
fbuf:

View File

@@ -1,26 +0,0 @@
" dsksav
iof
hlt
dzm track
-640
dac c1
1:
lac track
jms dskrd1
lac track
jms dskwr0
lac track
tad d10
dac track
isz c1
jmp 1b
hlt
sys exit
track: 0
c1: 0
d10: 10

View File

@@ -1,771 +0,0 @@
"** 08-rest.pdf page 8
"[handwritten page number top right of scan - 1]
" ed1
lac d1
sys write; 1f; 3
lac o17
sys creat; tname
spa
sys save
dac sfo
sys open; tname; 0
spa
sys save
dac sfi
-1
tad lnodp
dac zermp
tad d1
dac zerop
dac dot
tad d1
dac eofp
dzm i eofp
dzm i zerop
dzm lastre
dzm fbuf
lac d1
dac dskadr
dac wrlfg
dzm diskin
"o------------> [scan markup]
jmp advanc
1:
<ed>; <it>; 012
advanc:
jms rline
lac linep
dac tal
dzm adrflg
jms addres
jmp comand
-1
dac adrflg
lac addr
dac addr1
dac addr2
1:
lac char
sad o54
jmp 2f
sad o73
skp
jmp chkwrp
lac addr
dac dot
2:
jms addres
jmp error
lac addr2
dac addr1
lac addr
dac addr2
jmp 1b
"** 08-rest.pdf page 9
"[handwritten page number top right of scan - 2]
chkwrp:
-1
tad addr1
jms betwen; d1; addr2
jmp error
comand:
lac char
sad o141
jmp ca
sad o143
jmp cc
sad o144
jmp cd
sad o160
jmp cp
sad o161
jmp cq
sad o162
jmp cr
sad o163
jmp cs
sad o167
jmp cw
sad o12
jmp cnl
sad o75
jmp ceq
jmp error
ca:
jms newline
jms setfl
lac addr2
dac dot
ca1:
jms rline
lac line
sad o56012
jmp advanc
jms append
jmp ca1
cc: cd:
jms newline
jms setdd
lac addr1
sad zerop
jmp error
dac dot
tad dm1
dac 9
lac addr2
dac 8
2:
lac i 8
dac i 9
sza
jmp 2b
"??? illegible line cut off - dac 0, lac 0, something else???
"** 08-rest.pdf page 10
"[handwritten page number top right of scan - 3]
dac eofp
lac char
sad o144
jmp advanc
-1
tad dot
dac dot
jmp ca1
cp:
jms newline
cp1:
jms setdd
lac addr1
sad zerop
jmp error
1:
lac addr1
dac dot
lac i addr1
jms gline
dac 2f
lac d1
sys write; line; 2: 0
lac addr1
sad addr1
jmp advanc
tad d1
dac addr1
jmp 1b
cq:
jms newline
lac adrflg
sza
jmp error
sys exit
cr:
jms setfl
lac addr2
dac dot
jms rname
"------------> [scan markup]
sys open; fbuf; 0
spa
jmp error
dac tfi
lac linep
dac tal
dzm num
1:
lac tfi
sys read; tbuf; 64
sza
jmp 2f
lac tfi
sys close
jms number
jmp advanc
2:
"??? illegible line cut off - cma, sma, something else?
"** 08-rest.pdf page 11
"[handwritten page number top right of scan - 4]
tad d1
rcl
dac c1
lac tbufp
dac tal1
2:
jms getsc; tal1
sna
jmp 3f
jms putsc; tal
isz num
sad o12
skp
jmp 3f
lac tal
add o400000
and o17777
cma
tad linep
cma
dac linsiz
jms append
lac linep
dac tal
3:
isz c1
jmp 2b
jmp 1b
cw:
jms setfl
lac i addr1
sna
jmp error
jms rname
lac o17
sys creat; fbuf
spa
jmp error
dac tfi
-128
dac c2
lac tbufp
dac tal1
dzm num
1:
lac i addr1
jms gline
rcl
cma
tad d1
dac c1
lac linep
dac tal
2:
jms getsc; tal
sna
jmp 3f
isz num
jmp putsc; tal1
isz c2 "???
"** 08-rest.pdf page 12
"[handwritten page number top right of scan - 5]
jmp 3f
lac tfi
sys write; tbuf; 64
-128
dac c2
lac tbufp
dac tal1
3:
isz c1
jmp 2b
lac addr1
sad addr2
jmp 1f
isz addr1
jmp 1b
1:
lac tal1
sma cla
jmp 1f
jms putsc; tal1
1:
-1
tad tufp
cma
tad tal1
dac 1f
lac tfi
sys write; tbuf; 1: 0
lac tfi
sys close
jms number
jmp advanc
cn1:
lac adrflg
sna
jmp 1f
lac addr2
dac addr1
jmp cp1
1:
lac dot
tad d1
sad eofp
jmp error
dac dot
jmp cp1
ceq:
jms newline
jms setfl
lac addr2
dac dot
cma
tad zerop
cma
dac num
jms number
jmp advanc
setdd: 0
"** 08-rest.pdf page 13
"[handwritten page number top right of scan - 6]
lac adrflg
sza
jmp i setdd
lac dot
dac addr1
dac addr2
jmp i setdd
setfl: 0
lac adrflg
sza
jmp i setfl
lac zerop
tad d1
dac addr1
-1
tad eofp
dac addr2
jmp i setfl
newline: 0
jms getsc; tal
sad o12
jmp i newline
jmp error
addres: 0
dzm minflg "..) [stray scan mark?]
-1
dac addr
ad1:
jms getsc; tal
ad2:
jms betwen; d47; d56
skp
jmp numb
sad o40 "[o40 circled in scan]
jmp ad1 "[hand drawn check mark follows operand in scan]
sad o11
jmp ad1 "[hand drawn check mark follows operand in scan]
"[check mark underlined in scan]
sad o55
jmp amin "[hand drawn check mark follows operand in scan]
sad o56
jmp adot "[hand drawn check mark follows operand in scan]
sad o53
jmp ad1 "[hand drawn check mark follows operand in scan]
sad o44
jmp adol "[hand drawn check mark follows operand in scan]
sad o57
jmp fsrch "[hand drawn check mark follows operand in scan]
sad o77
jmp bsrch "[hand drawn check mark follows operand in scan]
dac char
lac minflg
sza
jmp error
lac addr
sma
isz addres
jmp i addres
"** 08-rest.pdf page 14
"[handwritten page number top right of scan - 7]
adot:
lac minflg
sza
jmp error
lac addr
sma
jmp error
lac dot
dac addr
jmp ad1
adol:
lac minflg
sza
jmp error
lac addr
sma
jmp error
-1
tad eofp
dac addr
jmp ad1
amin:
-1
dac minflg
jmp ad1
numb:
dac char
sad o60
jmp 1f
lac d10
jmp 2f
1:
lac d8
2:
dac 2f
dzm num
1:
lac num
cll; mul; 2: 0
lacq
tad char
tad dm48
dac num
jms getsc; tal
dac char
jms betwen; d47; d58
skp
jmp 1b
lac minflg
sna
jmp 1f
-1
tad num
cma
dac num
dzm minflg
1:
lac addr
"** 08-rest.pdf page 15
"[handwritten page number top right of scan - 8]
spa
lac zerop
tad num
dac addr
jms betwen; zermp; eofp
jmp error
lac char
jmp ad2
number: 0
lac d100000
dac n1
law tbuf-1
dac 8
n0:
lac num
cll; idiv; n1: 0
dac num
lacq
tad d48
dac i 8
lac n1
cll; idiv; 10
lacq
dac n1
sza
jmp n0
lac o12
dac i 8
law tbuf-1
dac 8
dac 9
-5
dac n1
n2:
lac i 8
sad d48
skp
jmp n3
dzm i 9
isz n1
jmp n2
n3:
lac d1
sys write; tbuf; 7
jmp i number
rname: 0
lac fbufp
dac tal1
-8
dac c1
1:
jms getsc; tal
sad o40
jmp 1b
sad o12
jmp 1f
jms putsc; tal1
isz c1
jmp 1b
"** 08-rest.pdf page 16
"[handwritten page number top right of scan - 9]
jmp i rname
1:
lac tal1
sad fbufp
skp
jmp 1f
lac fbuf
sna
jmp error
jmp i rname
1:
lac o40
jms putsc; tal1
isz c1
jmp 1b
jmp i rname
gline: 0
dac glint1
jms getdsk
lac glint1 " [these 6 lines were surrounded by a box
adn o17777 " that was Xed out with an arrow pointing to it]:
tad dskbfp " --
dac ital "|\/|
lac linep "|/\|<---
dac otal " --
1:
lac ital
sad edskbfp
skp
jmp 2f
lac diskin
tad d1024
jms getdsk
lac dskbfp
dac ital
2:
jms getsc; ital
jms putsc; otal
sad o12
skp
jmp 1b
lac otal
sma
jmp 1f
cla
jms putsc; otal
1:
lac linpm1
cma
tad otal
jmp i gline
rline: 0
lac linep
dac tal
1:
cla
sys read; char; 1
lac char
"** 08-rest.pdf page 17
"[handwritten page number top right of scan - 10]
lrss 9
jms esc
lac char
and o777
jms esc
jmp 1b
esc: 0
sna
jmp i esc
jms putsc; tal
sad o12
jmp 2f
sad o100
jmp 1f
sad o43
skp
jmp i esc
-1
tad tal
dac tal
and o17777
sad linpm1
jmp 1f
jmp i esc
1:
lac linep
dac tal
jmp i esc
2:
lac tal
sma cla
jmp 1f
jms putsc; tal
1:
-1
tad linep
cma
tad tal
dac linsiz
jmp i rline
getsc: 0
lac i getsc
dac sctalp
isz getsc
lac i sctalp
dac sctal
add o400000
dac i sctal
ral
lac i sctal
szl
lrss 9
and o777
jmp i getsc
putsc: 0
and o777
"** 08-rest.pdf page 18
"[handwritten page number top right of scan - 11]
lmq
lac i putsc
dac sctalp
isz putsc
lac i sctalp
dac sctal
add o400000
dac i sctalp
sma cla
jmp 1f
llss 27
dac i sctal
lrss 9
jmp i putsc
1:
lac i sctal
and o777000
omq
dac i sctal
lacq
jmp i putsc
append: 0
-1
tad eofp
dac 8
cma
tad dot
dac apt1
1:
lac i 8
dac i 8
-3
tad 8
dac 8
isz apt1
jmp 1b
isz eofp
dzm i eofp
isz dot
jms addline
jmp i append
addline: 0
lac dskadr
dac i dot
jms getdsk "[line crossed out - scan markup]
-1
tad linsiz
cma
dac apt1
law line-1
dac 8
lac dskadr "[line crossed out - scan markup]
and o1777 "[line crossed out - scan markup]
tad dskbfp "[line crossed out - scan markup]
dac otal "[line crossed out - scan markup]
lac dskadr "[line crossed out - scan markup]
tad linsiz "[line crossed out - scan markup]
dac dskadr "[line crossed out - scan markup]
"** 08-rest.pdf page 19
"[handwritten page number top right of scan - 12]
1:
lac otal " [these 9 lines were surrounded by a box
sad edskbfp " that was Xed out]:
skp " --
jmp 2f "|\/|
lac diskin "|/\|
tad d1024 " --
jms getdsk "
lac dskbfp "
dac otal "
2: "[line crossed out - scan markup]
lac i 8
dac i otal "[line crossed out and a note that looks like *jms prtwrd*]
isz otal
dzm wrflg "[line crossed out - scan markup]
isz apt1
jmp 1b
jmp i addline
getdsk: 0 "[the entire getdsk procedure was surrounded
and o776000 " by a box that was Xed out]:
sad diskin " --
jmp i getdsk "|\/|
dac 2f "|/\|
lac wrflg " --
sza "
jmp 3f "
lac diskin "
dac 1f "
lac sfo "
sys seek; 1: 0; 0 "
lac sfo "
sys write; dskbuf; 1024 "
lac d1 "
dac wrflg "
3: "
lac 2f "
dac diskin "
lac sfi "
sys seek; 2: 0; 0 "
spa "
jmp i getdsk "
lac sfi "
sys read; dskbuf; 1024 "
jmp i getdsk "
betwen: 0
dac bett1
lac i betwen
dac bett2
isz betwen
lac i bett2
cma
tad bett1
spa
jmp 1f
lac i betwen
dac bett2
isz betwen
-1
tad i bett2
"** 08-rest.pdf page 20
"[handwritten page number top right of scan - 13]
cma
tad bett1
spa
1:
isz betwen
lac bett1
jmp i betwen
error:
lac d1
sys write; 1f; 1
jmp advanc
1:
077012

View File

@@ -1,519 +0,0 @@
"** 08-rest.pdf page 21
"[handwritten page number top right of scan - 14]
" ed2
cs:
jsm getsc; tal
sad o40
jmp cs
sad o12
jmp error
dac delim
jms compile
lac tbufp
dac tal1
1:
jms getsc; tal
sad delim
jmp 1f
sad o12
jmp error
jms putsc; tal1
jmp 1b
1:
lac o12
jms putsc; tal1
jms newline
jms setdd
lac addr1
sad zerop
jmp error
1:
dac addr1
lac i addr1
jms execute
jmp 2f
lac addr1
dac dot
law line-1
dac 8
law nlist-1
dac 9
-64
dac c1
3:
lac i 8
dac i 9
isz c1
jmp 3b
-1
tad fchrno
dac linsiz
rcr
szl
xor o400000
tad linep
dac tal1 "???
lac tbufp
dac tal
3:
jms getsc; tal
sad o12
jmp 3f
jms putsc; tal1
isz linsiz "???
"** 08-rest.pdf page 22
"[handwritten page number top right of scan - 15]
jmp 3b
3:
-1
tad lcrhno
rcr
szl
xor o400000
tad nlistp
dac tal
3:
jms getsc; tal
jms putsc; tal1
isz linsiz
sad o12
skp
jmp 3b
jms addline
2:
lac addr1
sad addr2
jmp advanc
tad d1
jmp 1b
fsrch:
dac delim
jms compile
jms srcsav
lac dot
floop:
tad d1
dac addr
lac i addr
sza
jmp 1f
lac zerop
dac addr
jmp 2f
1:
jms execute
jmp 2f
jms srcres
jmp ad1
2:
lac addr
sad dot
jmp error
jmp floop
bsrch:
dac delim
jms compile
jms srcsav
lac dot
dad zerop
lac eofp
bloop:
tad dm1
dac addr
lac i addr
"** 08-rest.pdf page 23
"[handwritten page number top right of scan - 16]
sza
jmp 1f
lac eofp
dac addr
jmp 2f
1:
jms execute
jmp 2f
jms srcres
jmp ad1
2:
lac addr
sad dot
jmp error
jmp bloop
srcsav: 0
lac minflg
sza
jmp error
lac addr
sma
jmp error
law line-1
dac 8
law tbuf-1
dac 9
-64
dac c1
1:
lac i 8
dac i 9
isz c1
jmp 1b
jmp i srcsav
srcres: 0
law tbuf-1
dac 8
law line-1
dac 9
-64
dac c1
1:
lac i 8
dac i 9
isz c1
jmp 1b
jmp i srcres
compile: 0
law compbuf-1
dac 8
dzm prev
dzm compflg
cadvanc:
jms getsc; tal
sad delim
jmp cdone
dac compflg "???
"** 08-rest.pdf page 24
"[handwritten page number top right of scan - 17]
dzm lastre
sad o12
jmp error
"sad o133
"jmp chrcls
sad o136 "???
jmp beglin
sad o44
jmp endlin
"sad o52
"jmp clsure
dac 1f
jmp comp
1; jms matchar; 1: 0; 0
jmp cadvanc
cdone:
lac compflg
sna
jmp 1f
dac lastre
jms comp
1; jms found; 0
jmp i compile
1: "???
lac lastre
sna
jmp error
jmp i compile
chrcls:
jmp error
beglin: "???
jms comp
1; jms matbol; 0
dzm prev
jmp cadvanc
endlin: "???
jms comp
1; jms mateol; 0
dzm prev
jmp cadvanc
clsure:
lac prev
sna
jmp error
tad d1
dac 1f
jms comp
1; jms matclo; 1: 0; 0
dzm prev
jmp cadvanc
comp: 0 "???
-1
tad comp
dac 9
lac 8 "???
"** 08-rest.pdf page 25
"[handwritten page number top right of scan - 18]
dac prev
1: "???
lac i 9
sna
jmp i 9
dac i 8
jmp 1b
execute: 0
jms gline
lac linep
dac tal1
dzm charno
dzm fchrno
dzm lchrno
lac jmpclist
dac trvect
lac jmpnlist
dac trvect+1
lac jmpxchg
dac i trvect+1
jmp 1f
exchg: "???
lacq
sad o12
jmp i execute
lac jmpxchg
dac i 8
1: "???
lac trvect
lmq
lac trvect+1
dac trvect
lacq
dac trvect+1
tad dm1
dac 8
jms getsc; tal1
lmq
isz charno
jms compbuf
charno:
0
trvect:
0;0
matchar: 0 "???
-2
tad matchar
dac exret
lac i exret
dac exret
lacq
sad i matchar
skp
jmp 1f
lac matchar
adn o17777
tad jms1
dac i 8 "??? [unreadable page cutoff]
"** 08-rest.pdf page 26
"[handwritten page number top right of scan - 19]
lac i exret
dac i 8
1: "???
isz exret
jmp i exret
found: 0
-2
tad found
dac exret
lac i exret
dac exret
lac fchrno
sza
jmp 1f
isz execute
jmp 2f
1: "???
sad i exret
jmp 1f
cma
tad i exret
spa
jmp 2f
jmp 3f
1: "???
lac charno
cma
tad charno
spa
jmp 3f
2: "???
lac i exret
dac fchrno
lac charno
dac lchrno
3: "???
isz exret
jmp i exret
matbol: 0 "???
lac charno
sad d1
jmp 1f
lac matbol
jmp 2f
1: "???
lac matbol
jmp 3f
mateol: 0 "???
lacq
sad o12
jmp 1f
lac mateol
2: "???
tad dm2
dac exret
lac i exret
dac 9
"??? [line is cut off in scan, maybe lac i 8 or jmp i 9]
"** 08-rest.pdf page 27
"[handwritten page number top right of scan - 20]
1: "???
lac mateol
3: "???
tad dm3
dac 9
lac i 9
isz 9
dac i 9
jmp i 9
matclo: 0 "???
-2
tad matclo
dac exret
lac i exret
dac cloret
lac i cloret
dac 1f
dac 2f
lac i matclo
dac exret
jms i exret; 1: 0
isz matclo
jms i matclo; 2: 0
isz cloret
jmp i cloret
"??? the remainder of this scan had an unreadable first character
"??? I did the best I could to recreate the characters appropriately
o1: 1
o133: 0133
dm3: -3
o136: 0136
dm2: -2
o52: 052
o57: 057
o77: 077
o40: 040
o12: 012
d47: 47
d58: 58
dm48: -48
d10: 10
d8: 8
d48: o60: 060
d100000: 100000
o44: 044
o53: 053
o56: 056
o55: 055
o11: 011
o400000: 0400000
o17777: 017777
o144: 0144
dm1: -1
o56012: 056012
o777: 0777
o100: 0100
o43: 043
o777000: 0777000
o75: 075
o167: 0167
o161: 0161
"** 08-rest.pdf page 28
"[handwritten page number top right of scan - 21]
o160: 0160
o143: 0143
o141: 0141
o1777: 01777
d1024: 1024
o776000: 0776000
o162: 0162
o163: 0163
o73: 073
o54: 054
o17: 017
tname:
0145056;0164155;0160040;040040
tbufp: tbuf
linep: line
nlistp: nlist
fbufp: fbuf
dskbfp: dskbuf "[line crossed out - scan markup]
edskbfp: dskbuf+1024 "[line crossed out - scan markup]
lnodp: lnodes
linpm1: line-1
jmpclist: jmp clist
jmpnlist: jmp nlist
jmpxchg: jmp xchg
jms1: jms 1
tal: .=.+1
exret: .=.+1
cloret: .=.+1
delim: .=.+1
prev: .=.+1
compflg: .=.+1
tal1: .=.+1
c1: .=.+1
ital: .=.+1
otal: .=.+1
diskin: .=.+1
glint: .=.+1
c2: .=.+1
num: .=.+1
zermp: .=.+1
minflg: .=.+1
adrflg: .=.+1
dot: .=.+1
addr: .=.+1
addr1: .=.+1
addr2: .=.+1
eofp: .=.+1
zerop: .=.+1
dskadr: .=.+1
linsiz: .=.+1
tfi: .=.+1
fchrno: .=.+1
lchrno: .=.+1
lastre: .=.+1
bett1: .=.+1
bett2: .=.+1
wrflg: .=.+1
apt1: .=.+1
"[page cuts off one label]
"** 08-rest.pdf page 29
"[handwritten page number top right of scan - 22]
sfo: .=.+1
sctal: .=.+1
sctalp: .=.+1
char: .=.+1
fbuf: .=.+4 "not sure if this is fbuf, but
tbuf: .=.+64 "there is a write; tbuf; 64 call
line: .=.+64
nlist: .=.+50
"??? ?list: .=.+50, unable to determine label
compbuf: .=.+100
dskbuf: .=.+1 "[line crossed out - scan markup]
lnodes: .=.+1000

View File

@@ -1,291 +0,0 @@
" init
-1
sys intrp
jms init1
jms init2
1:
sys rmes
sad pid1
jmp 1f
sad pid2
jms init2
jmp 1
1:
jms init1
jmp 1
init1: 0
sys fork
jmp 1f
sys open; ttyin; 0
sys open; ttyout; 1
jmp login
1:
dac pid1
jmp init1 i
init2: 0
sys fork
jmp 1f
sys open; keybd; 0
sys open; displ; 1
jmp login
1:
dac pid2
jmp init2 i
login:
-1
sys intrp
sys open; password; 0
lac d1
sys write; m1; m1s
jms rline
lac ebufp
dac tal
1:
jms gline
law ibuf-1
dac 8
law obuf-1
dac 9
2:
lac 8 i
sac o12
lac o72
sad 9 i
skp
jmp 1b
sad o72
skp
jmp 2b
lac 9 i
sad o72
jmp 1f
-1
tad 9
dac 9
lac d1
sys write; m3; m3s
jms rline
law ibuf-1
dac 8
2:
lac 8 i
sad o12
lac o72
sad 9 i
skp
jmp error
sad o72
skp
jmp 2b
1:
dzm nchar
law dir-1
dac 8
1:
lac 9 i
sad o72
jmp 1f
dac char
lac nchar
sza
jmp 2f
lac char
alss 9
xor o40
dac 8 i
dac nchar
jmp 1b
2:
lac 8
dac nchar
lac nchar i
and o777000
xor char
dac nchar i
dzm nchar
jmp 1b
1:
dzm nchar
1:
lac 9 i
sad o12
jmp 2f
tad om60
lmq
lac nchar
cll; als 3
omq
dac nchar
jmp 1b
2:
lac nchar
sys setuid
sys chdir; dd
sys chdir; dir
lac d2
sys close
sys open; sh; 0
sma
jmp 1f
sys link; system; sh; sh
spa
jmp error
sys open; sh; 0
spa
jmp error
sys unlink; sh
1:
law 017700
dac 9
law boot-1
dac 8
1:
lac 8 i
dac 9 i
sza
jmp 1b
jmp 017701
boot:
lac d2
lmq
sys read; 4096; 07700
lacq
sys close
jmp 4096
0
rline: 0
law ibuf-1
dac 8
1:
cla
sys read; char; 1
lac char
lrss 9
sad o100
jmp rline+1
sad o43
jmp 2f
dac 8 i
sad o12
jmp rline i
jmp 1b
2:
law ibuf-1
sad 8
jmp 1b
-1
tad 8
dac 8
jmp 1b
gline: 0
law obuf-1
dac 8
1:
jms gchar
dac 8 i
sad o12
jmp gline i
jmp 1b
gchar: 0
lac tal
sad ebufp
jmp 1f
ral
lac tal i
snl
lrss 9
and o777
lmq
lac tal
add o400000
dac tal
lacq
sna
jmp gchar+1
jmp gchar i
1:
lac bufp
dac tal
1:
dzm tal i
isz tal
lac tal
sad ebufp
skp
jmp 1b
lac bufp
dac tal
lac d2
sys tead; buf; 64
sna
jmp error
jmp gchar+1
error:
lac d1
sys write; m2; m2s
lac d1
sys smes
sys exit
m1:
012; <lo>;<gi>;<n;<:;<
m1s = .-m1
m2:
<?; 012
m2s = .-m2
m3:
<pa>;<ss>;<wo>;<rd>;<: 040
m3s = .-m3
dd:
<dd>;040040;040040;040040
dir:
040040;040040;040040;040040
ttyin:
<tt>;<yi>;<n 040;040040
ttyout:
<tt>;<yo>;<ut>; 040040
keybd:
<ke>;<yb>;<oa>;<rd>
displ:
<di>;<sp>;<la>;<y 040
sh:
<sh>; 040040;040040;040040
system:
<sy>;<st>;<em>; 040040
password:
<pa>;<ss>;<wo>;<rd>
d1: 1
o43: 043
o100: 0100
o400000; 0400000
d2: 2
o12: 012
om60: -060
d3: 3
ebufp: buf+64
bufp: buf
o777: 0777
o777000: 0777000
o40: 040
o72: 072
ibuf: .=.+100
obuf: .=.+100
tal: .=.+1
buf: .=.+64
char: .=.+1
nchar: .=.+1
pid1: .=.+1
pid2: .=.+1

View File

@@ -1,195 +0,0 @@
" S1
.. = 0
t = 0
orig:
hlt
jmp pibreak
. = orig+7
-1
. = orig+020
1f
iof
dac u.ac
lac 020
dac 1f
lac 1f-1
dac 020
lac u.ac
jmp 1f+1
1f
1: 0
iof " interrupts off
dac u.ac " save user AC
lacq
dac u.mq " save user MQ
lac 8
dac u.rq " save user auto-index location 8
lac 9
dac u.rq+1 " save user auto-index location 9
jms copy; 10; u.rq+2; 6 " save user auto-index locations 10-15
lac 1b " load user PC after system call
dac u.rq+8 " save user PC
-1 " load -1
dac .savblk " set "save" flag (cleared by disk I/O?)
dac .insys " set "in system" flag
lac uquant " load user quantum count
jms betwen; d0; maxquant " check if between 0 & maxquant??
jms swap " no: swap processes
ion " interrupts on
-1
tad u.rq+8 " get address of system call
jms laci " load AC indirect??
jms betwen; o20001; swn " range check
jmp badcal " bad system call
tad swp " add system call table base
dac .+1 " save as next instruction
jmp .. i " dispatch system call
. = orig+0100
jmp coldentry
jms halt
okexit:
dzm u.ac " 'OK' system call exit: clear user AC
sysexit: " common system call exit code
ion " enable interrupts
lac .savblk " load "save" flag
sza " is zero (cleared by disk I/O)?
jmp 1f " no: no disk I/O done?
jms copy; sysdata; dskbuf; 64 " copy system data to disk buffer
cla
jms dskio; 07000 " save to disk?
1:
dzm .insys " clear "in system call" flag
jms chkint
skp
jmp .save " dump core??
jms copy; u.rq+2; 10; 6 " restore auto-index locations 10-15
lac u.rq+1 " restore auto-index location 9
dac 9
lac u.rq " restore auto-index location 8
dac 8
lac u.mq " restore MQ register
lmq
lac u.ac " restore AC register
jmp u.rq+8 i " return to user
swap: 0
ion
1:
jms lookfor; 3 " out/ready
jmp 1f
jms lookfor; 1 " in/ready
skp
jmp 1b
dzm maxquant
jmp 3f
1:
dac 9f+t
jms lookfor; 2 " in/notready
jmp 1f
jms lookfor; 1 " in/ready
jmp 1f
jmp 2f
1:
lac swap
dac u.swapret
iof
lac o200000
tad u.ulistp i
dac u.ulistp i
ion
jms dskswap; 07000
lac u.dspbuf
sna
jmp 2f
law dspbuf
jms movdsp
2:
iof
lac o600000
tad 9f+t i
dac 9f+t i
ion
jms dskswap; 06000
lac u.swapret
dac swap
lac o20
dac maxquant
lac u.dspbuf
sza
"** 01-s1.pdf page 4
jms movdsp
3:
dzm uquant
iof
jmp swap i
t = t+1
swp: " system call dispatch table
jmp . " base instruction
.save; .getuid; .open; .read; .write; .creat; .seek; .tell
.close; .link; .unlink; .setuid; .rename; .exit; .time; .intrp
.chdir; .chmod; .chown; badcal; .sysloc; badcal; .capt; .rele
.status; badcal; .smes; .rmes; .fork
swn:
.-swp-1 i " count of system calls, plus indirect!
.intrp:
lac u.ac
dac u.intflg
jmp okexit
.sysloc: " "sysloc": syscall to return system addresses
lac u.ac
and o17777
jms betwen; d1; locn
jms error
tad locsw
dac .+1
lac ..
dac u.ac
jmp sysexit
locsw: " table of system data structures for "sysloc" call
lac .
iget; inode; userdata; sysdata; copy; copyz; betwen; dskrd
dskwr; dskbuf; dpdata; namei; pbsflgs; alloc; free; dspdata
crdata
locn:
.-locsw-1
chkint: 0
lac .insys
sza
jmp chkint i
lac .int1
sna
jmp 1f
sad u.ofiles+2
jmp 2f
1:
lac .int2
sna
jmp chkint i
sad u.ofiles+2
skp
jmp chkint i
dzm .int2
jmp 1f
2:
dzm .int1
1:
"** 01-s1.pdf page 5
lac u.intflg
sza
jmp chkint i
-1
dac .insys
ion
isz chkint
jmp chkint i

View File

@@ -1,337 +0,0 @@
"** 01-s1.pdf page 7
" s2
.status:
jms arg
dac .+5
jms arg
dac .+6
lac u.cdir
jms namei; ..
jms error
jms namei; ..
jms error
jms iget
lac u.ac
and o17777
jms betwen; o10000; o17762
jms error
dac .+3
jms copy; inode; ..; 12
lac d.i
dac 9 i
jmp okexit
.capt:
lac u.ac
dac u.dspbuf
jms movdsp
jmp sysexit
.rele:
dzm u.dspbuf
law dspbuf
jms movdsp
jmp sysexit
.chmod:
jms isown
lac u.ac
and o17
lmq
lac i.flags
and o777760
omq
dac i.flags
jms iput
jmp okexit
.chown:
jms isown
lac u.ac
dac i.uid
jms iput
jmp okexit
.getuid: " getuid system call
lac u.uid
dac u.ac " return u.uid in user AC
jmp sysexit
.seek:
jms seektell
tad u.base
"** 01-s1.pdf page 8
spa
jms error
lmq
lac f.flags
and d1
sna
jms 1f
lacq
jms betwen; d0; i.size
jms dacisize
jmp 2f
1:
lacq
jms betwen; d0; i.size
lac i.size
2:
dac f.badd
dac u.ac
jms fput
jmp sysexit
.tell:
jms seektell
cma
tad d1
tad u.base
dac u.ac
jmp sysexit
.link:
jms arg
dac 0f
jms arg
dac 1f
jms arg
dac 2f
lac d4
jms namei; 0:0
jms error
jms namei; 1:0
jms error
dac u.base
jms copy; 2:0; name; 4
lac u.cdir
jms namei; name
skp
jms error
lac d1
dac mode
jms access
jms dslot
lac u.base
jms iget
lac ii
dzm d.i
jms copy; name; d.name; 4
lac i.uniq
dac d.uniq
-1
tad i.nlks
dac i.nlks
"** 01-s1.pdf page 9
jms iput
jms dput
jmp okexit
.unlink:
jms argname
dac u.base
lac d1
dac mode
jms access
dac d.i
jms dput
lac u.base
jms iget
isz i.nlks
jmp 1f
jms itrunc
dzm i.flags
1:
jms iput
jmp sysexit
.setuid: " setuid system call
lac u.uid " load current user id
sma " negative?
jms error " no: error!!
lac u.ac " load user AC
dac u.uid " save as new uid
jmp sysexit
.rename:
jms arg
dac 0f
jms arg
dac 1f
lac u.cdir
jms namei; 0:0
jms error
lac d1
dac mode
jms access
jms copy; 1:0; d.name; 4
jmp okexit
" time system call returns line (mains) frequency ticks since boot?
" note: returns uptime!?
" at 60Hz, 36 bits would last 36+ years!
.time:
lac s.tim " load high order bits
dac u.ac " return in AC
lac s.tim+1 " load low order bits
dac u.mq " return in MQ
jmp sysexit
.chdir:
jms argname
jms iget
lac i.flags
and o20
sna
jms error
lac ii
dac u.cdir
"** 01-s1.pdf page 10
jmp okexit
.open:
jms arg
dac 0f
jms arg
sza
lac d1
sna
lac d2
dac mode
lac u.cdir
jms namei; 0:0
jms error
jms iget
jms access
lac i.flags
and o20
sna
jmp open1
lac mode
and d1
sna
jmp open1
lac u.uid
sma
jms error
jmp open1
.creat:
lac d1
dac mode
jms arg
dac .+2
jms copy; ..; name; 4
lac u.cdir
jms namei; name
jmp 1f
jms iget
jms access
lac i.flags
and o20
sna
jmp .+4
lac u.uid
sma
jms error
jms itrunc
cla
jms dacisize
jmp open1
1:
jms access
lac u.ac
and o17
jms icreat
open1:
jms fassign
jms error
jmp sysexit
"** 01-s1.pdf page 11
.close:
jms finac
dzm f.flags
jms fput
jmp sysexit
.read:
jms arg
and o17777
dac u.base
jms arg
dac u.count
lac u.base
jms betwen; o10000; o17777
jms error
tad u.count
jms betwen; u.base; o17777
jms error
dac u.limit
1:
jms finac
lac f.flags
and d1
sza
jms error
lac i.flags
and o40
sna
jmp 1f
iof
lac ii
tad swr
dac .+1
jmp .. i
1:
lac u.base
dac 1f+1
lac u.count
dac 1f+2
lac f.badd
1:
jms iread; ..; ..
jmp exitrw
.write:
jms arg
and o17777
dac u.base
jms arg
dac u.count
tad u.base
jms betwen; u.base; o17777
jms error
dac u.limit
jms finac
lac f.flags
and d1
sna
jms error
lac i.flags
and o40
"** 01-s1.pdf page 12
sna
jmp 1f
iof
lac ii
tad sww
dac .+1
jmp .. i
1:
lac u.base
dac 1f+1
lac u.count
dac 1f+2
lac f.badd
1:
jms iwrite; ..; ..
exitrw:
dac u.ac
tad f.badd
dac f.badd
jms iput
jms fput
jmp sysexit

View File

@@ -1,354 +0,0 @@
"** 01-s1.pdf page 14
" s3
searchu: 0
lac searchu i
dac 9f+t+1
-mnproc
dac 9f+t
law ulist-1
dac 8
1:
lac 8 i
dac lu
lac 8 i
dac lu+1
lac 8 i
dac lu+2
lac 8 i
dac lu+3
jms 9f+t+1 i
isz 9f+t
jmp 1b
isz searchu
jmp searchu i
t = t+2
lookfor: 0
jms searchu; 1f
isz lookfor
isz lookfor
jmp lookfor i
1: 0
lac lu
rtl; rtl; and o7
sad lookfor i
skp
jmp 1b i
-3
tad 8
and o17777
isz lookfor
jmp lookfor i
.fork:
jms lookfor; 0 " not-used
skp
jms error
dac 9f+t
isz uniqpid
lac uniqpid
dac u.ac
law sysexit
dac u.swapret
lac o200000
tad u.ulistp i
dac u.ulistp i
jms dskswap; 07000
lac 9f+t
dac u.ulistp
lac o100000
xor u.ulistp i
dac u.ulistp i
lac u.pid
"** 01-s1.pdf page 15
dac u.ac
lac uniqpid
dac u.pid
isz 9f+t
dac 9f+t i
isz u.rq+8
dzm u.intflg
jmp sysexit
t= t+1
badcal:
clon
-1
dac 7
.save:
lac d1
jms iget
cla
jms iwrite; 4096; 4096
jms iwrite; userdata; 64
jms iput
.exit:
lac u.dspbuf
sna
jmp .+3
law dspbuf
jms movdsp
jms awake
lac u.ulistp i
and o77777
dac u.ulistp i
isz u.ulistp
dzm u.ulistp i
jms swap
.rmes:
jms awake
lac o100000
tad u.ulistp i
dac u.ulistp i
law 2
tad u.ulistp
dac 9f+t
-1
dac 9f+t i
jms swap
law 2
tad u.ulistp
dac 9f+t
lac 9f+t i
cma
dac u.ac
dzm 9f+t i
isz 9f+t
lac 9f+t i
dac u.mq
dzm 9f+t i
jmp sysexit
t = t+1
"** 01-s1.pdf page 16
.smes:
lac u.ac
sna spa
jms error
jms searchu; 1f
law 2
tad u.ulistp
dac 9f+t
dzm 9f+t i
jms error
1: 0
lac lu+1
sad u.ac
skp
jmp 1b i
lac lu+2
sad dm1
jmp 1f
lac o100000
tad u.ulistp i
dac u.ulistp i
law 2
tad u.ulistp
dac 9f+t
lac u.ac
dac 9f+t i
jms swap
law 2
tad u.ulistp
dac 9f+t
dzm 9f+t i
jmp .smes
1:
-3
tad 8
dac 9f+t
lac o700000
tad 9f+t i
dac 9f+t i
isz 9f+t
isz 9f+t
lac u.pid
cma
dac 9f+t i
isz 9f+t
lac u.mq
dac 9f+t i
jmp okexit
t = t+1
awake: 0
jms searchu; 1f
jmp awake i
1: 0
lac u.pid
sad lu+2
skp
jmp 1b i
-3
tad 8
dac 9f+t
"** 01-s1.pdf page 17
lac o700000
tad 9f+t i
dac 9f+t i
jmp 1b i
t = t+1
swr:
sww:
jmp .-4 i
.halt; rttyi; rkbdi; rppti; .halt
.halt; wttyo; wdspo; wppto
.halt: jms halt
rttyi:
jms chkint1
lac d1
jms getchar
jmp 1f
and o177
jms betwen; o101; o132
skp
tad o40
alss 9
jmp passone
1:
jms sleep; sfiles+0
jms swap
jmp rttyi
wttyo:
jms chkint1
jms forall
sna
jmp fallr
lmq
lac sfiles+1
spa
jmp 1f
xor o400000
dac sfiles+1
lacq
tls
sad o12
jms putcr
jmp fallr
1:
lacq
dac char
lac d2 "** written: d6 ttyout
jms putchar
skp
jmp fallr
jms sleep; sfiles+1
jms swap
jmp wttyo
rkbdi:
jms chkint1
lac d3
jms getchar
"** 01-s1.pdf page 18
jmp 3f
lmq
and o155
sad o55
jmp 1f
lacq
and o137
sad o134
skp
jmp 2f
1:
lacq
xor o20
lmq
2:
lacq
dac u.limit
1:
jms chkint1
lac u.limit
jms dspput
jmp 1f
jms sleep; sfiles+6
jms swap
jmp 1b
1:
lac u.limit
alss 9
jmp passone
3:
jms sleep; sfiles+2
jms swap
jmp rkbdi
wdspo:
jms chkint1
jms forall
jms dspput
jmp fallr
jms sleep; sfiles+6
jms swap
jmp wdspo
rppti:
lac d4
jms getchar
jmp .+3
alss 9
jmp passone
lac sfiles+3
sma
rsa
1:
jms sleep; sfiles+3
jms swap
jmp rppti
"** 01-s1.pdf page 19
wppto:
jms forall
sna
jmp fallr
lmq
lac sfiles+4
spa
jmp 1f
xor o400000
dac sfiles+4
lacq
psa
jmp fallr
1:
lacq
dac char
lac d5
jms putchar
skp
jmp fallr
jms sleep; sfiles+4
jms swap
jmp wppto
passone:
sad o4000
jmp okexit
dac u.base i
lac d1
dac u.ac
jmp sysexit
error: 0
-1
dac u.ac
jmp sysexit
chkint1: 0
dzm .insys
jms chkint
skp
jmp .save
-1
dac .insys
jmp chkint1 i

View File

@@ -1,278 +0,0 @@
"** 01-s1.pdf page 28
" s5
dskswap: 0
cll; als 3
dac 9f+t
jms dsktrans; -64; userdata; 9f+t; dskswap
lac 9f+t
tad o20
dac 9f+t
jms dsktrans; -4096; 4096; 9f+t; dskswap
isz dskswap
jmp dskswap i
t = t+1
access: 0
lac i.flags
lmq
lac u.uid
spa
jmp access i
sad i.uid
lrs 2
lacq
and mode
sza
jmp access i
jms error
fassign: 0
-10
dac 9f+t
1:
lac 9f+t
tad d10
jms fget
jms halt " will not happen
lac f.flags
sma
jmp 1f
isz 9f+t
jmp 1b
jmp fassign i
1:
lac mode
xor o400000
dac f.flags
lac ii
dac f.i
lac 9f+t
tad d10
dac u.ac
dzm f.badd
jms fput
isz fassign
jmp fassign i
t = t+1
fget: 0
jms betwen; d0; d9
jmp fget i
cll; mul; 3
lacq
"** 01-s1.pdf page 29
tad ofilesp
dac 9f+t
dac .+2
jms copy; ..; fnode; 3
isz fget
jmp fget i
fput: 0
lac 9f+t
dac .+3
jms copy; fnode; ..; 3
jmp fput i
t = t+1
forall: 0
lac u.base
sad u.limit
jmp 1f
lac u.base
ral
lac u.base i
snl
lrs 9
and o777
jmp forall i
fallr:
lac u.base
add o400000
dac u.base
jmp forall+1
1:
lac u.count
dac u.ac
jmp sysexit
sleep: 0
law ulist-1
dac 8
lac o200000
lmq
1:
lac u.ulistp i
sad 8 i
jmp 1f
isz 8
isz 8
isz 8
cla; lrs 1
jmp 1b
1:
tad o100000
dac u.ulistp i
lac sleep i
dac 9f+t
lac 9f+t i
omq
dac 9f+t i
isz sleep
jmp sleep i
t = t+1
"** 01-s1.pdf page 30
dslot: 0
dzm di
skp
1:
isz di
lac di
jms dget
lac d.i
sza
jmp 1b
jmp dslot i
icreat: 0
dac 9f+t
jms dslot
lac o20
dac ii
1:
isz ii
lac ii
jms iget
lac i.flags
spa
jmp 1b
lac ii
dac d.i
jms copy; name; d.name; 4
isz s.uniq
lac s.uniq
dac d.uniq
dac i.uniq
lac 9f+t
xor o400000
dac i.flags
lac u.uid
dac i.uid
-1
dac i.nlks
dzm i.size
jms copyz; i.dskps; 7
jms iput
jms dput
jmp icreat i
t = t+1
dspput: 0
and o177
sna
jmp i dspput
sad o14
jmp 1f
lmq
sad o12
jms dspnl
lac dsploc i
sad o400000
jmp dspleft
omq
dac dsploc i
isz dsploc
jmp i dspput
"** 01-s1.pdf page 31
1:
jms dspinit
jmp dspput i
dspleft:
lac dsploc
sad edspbuf
jmp 1f
dac 8
lac o400000
dac 8 i
cla; llss 18+7
dac dsploc i
jmp dspput i
dspnl: 0
lac dsplno
sad d33
jmp 1f
isz dsplno
jmp dspnl i
1:
lac o2000
wbl
isz dspput
jmp dspput i
dspinit: 0
lac dspbufp3
dac dsploc
lac o400000
dac dspbuf+3
dzm dsplno
jmp dspinit i
movdsp: 0
iof
cdf
dac dspbufp
-1
dac .dspb
ion
jmp movdsp i
arg: 0
lac u.rq+8 i
isz u.rq+8
jmp arg i
argname: 0
jms arg
dac .+2
jms copy; ..; name; 4
lac u.cdir
jms namei; name
jms error
jmp argname i
seektell: 0
jms arg
dac u.base
"** 01-s1.pdf page 32
jms arg
dac u.limit
jms finac
lac u.limit
sna
jmp seektell i
sad d1
jmp .+3
lac i.size
jmp seektell i
lac f.badd
jmp seektell i
isown: 0
jms argname
jms iget
lac u.uid
sma
sad i.uid
skp
jms error
jmp isown i

View File

@@ -1,350 +0,0 @@
"** 01-s1.pdf page 34
" s6
itrunc: 0
-7
dac 9f+t
lac idskpp
dac 9f+t+1
1:
lac 9f+t+1 i
sna
jmp 4f
lac i.flags
and o200000
sna
jmp 3f
-64
dac 9f+t+2
lac dskbufp
dac 9f+t+3
2:
lac 9f+t+1 i
jms dskrd
lac 9f+t+3 i
sza
jms free
isz 9f+t+3
isz 9f+t+2
jmp 2b
3:
lac 9f+t+1 i
jms free
dzm 9f+t+1 i
4:
isz 9f+t+1
isz 9f+t
jmp 1b
lac i.flags
and o577777
dac i.flags
jmp itrunc i
t = t+4
namei: 0
jms iget
-1
tad namei i
dac 9f+t+1
isz namei
lac i.flags
and o20
sna
jmp namei i
-8
tad i.size
cma
lrss 3
dac 9f+t
sna
jmp namei i
dzm di
1:
lac di
"** 01-s1.pdf page 35
jms dget
lac d.i
sna
jmp 2f
lac 9f+t+1
dac 8
lac d.name
sad 8 i
skp
jmp 2f
lac d.name+1
sad 8 i
skp
jmp 2f
lac d.name+2
sad 8 i
skp
jmp 2f
lac d.name+3
sad 8 i
skp
jmp 2f
lac d.i
isz namei
jmp namei i
2:
isz di
isz 9f+t
jmp 1b
jmp namei i
t = t+2
iget: 0
dac ii
cll; idiv; 5
dac 9f+t
lacq
tad d2
dac 9f+t+1
jms dskrd
lac 9f+t
cll; mul; 12
lacq
tad dskbufp
dac 9f+t
dac .+2
jms copy; ..; inode; 12
jmp iget i
iput: 0
lac 9f+t+1
jms dskrd
law inode-1
dac 8
-1
tad 9f+t
dac 9
-12
dac 9f+t+2
1:
lac 8 i
"** 01-s1.pdf page 36
sad 9 i
skp
jmp 2f
isz 9f+t+2
jmp 1b
jmp iput i
2:
-1
tad 8
dac 8
-1
tad 9
dac 9
1:
lac 8 i
dac 9 i
isz 9f+t+2
jmp 1b
lac 9f+t+1
jms dskwr
jmp iput i
t = t+3
dget: 0
dac di
alss 3
dac 9f+t
jms pget
dac 9f+t+1
jms dskrd
lac 9f+t
and o77
tad dskbufp
dac 9f+t+2
dac .+2
jms copy; ..; dnode; 8
lac 9f+t
tad d8
jms betwen; d0; i.size
skp
jmp dget i
jms dacisize
dzm d.i
jmp dget i
dput: 0
lac 9f+t+1
jms dskrd
lac 9f+t+2
dac .+3
jms copy; dnode; ..; 8
lac 9f+t+1
jms dskwr
jmp dput i
t = t+3
pget: 0
lrss 6
dac 9f+t
lac i.flags
"** 01-s1.pdf page 37
and o200000
sza
jmp 2f
lac 9f+t
jms betwen; d0; d6
jmp 1f
tad idskpp
dac 9f+t
lac 9f+t i
sna
jms alloc
dac 9f+t i
jmp pget i
1:
jms alloc
dac 9f+t+1
jms copy; i.dskps; dskbuf; 7
jms copyz; dskbuf+7; 64-7
lac 9f+t+1
jms dskwr
lac 9f+t+1
dac i.dskps
jms copyz; i.dskps+1; 6
lac i.flags
xor o200000
dac i.flags
2:
lac 9f+t
lrss 6
jms betwen; d0; d6
jms halt " file too big
tad idskpp
dac 9f+t+1
lac 9f+t+1 i
sna
jms alloc
dac 9f+t+1 i
dac 9f+t+2
jms dskrd
lac 9f+t
and o77
tad dskbufp
dac 9f+t+1
lac 9f+t+1 i
sza
jmp pget i
jms alloc
dac 9f+t
lac 9f+t+2
jms dskrd
lac 9f+t
dac 9f+t+1 i
lac 9f+t+2
jms dskwr
lac 9f+t
jmp pget i
t = t+3
iwrite: 0
dac 9f+t
lac iwrite
"** 01-s1.pdf page 38
dac iread
lac cskp
dac iwrite
jmp 1f
iread: 0
dac 9f+t
lac cnop
dac iwrite
1:
-1
tad iread i
dac 10
dac 11
isz iread
lac iread i
dac 9f+t+1
isz iread
lac o70000
xct iwrite
lac i.size
cma
tad 9f+t
cma
jms betwen; d0; 9f+t+1
lac 9f+t+1
dac 9f+t+2
cma
tad d1
sna
jmp iread i
dac 9f+t+1
1:
lac 9f+t
jms pget
dac 9f+t+3
jms dskrd
lac 9f+t
and o77
tad dskbufp
tad dm1
xct iwrite
jmp .+3
dac 10
cskp:
skp
dac 11
2:
lac 11 i
dac 10 i
isz 9f+t
isz 9f+t+1
jmp 3f
xct iwrite
jmp 4f
lac 9f+t
jms betwen; d0; i.size
dac i.size
lac 9f+t+3
jms dskwr
4:
"** 01-s1.pdf page 38
lac 9f+t+2
jmp iread i
3:
lac 9f+t
and o77
sza
jmp 2b
xct iwrite
jmp 1b
lac 9f+t+3
jms dskwr
jmp 1b
t = t+4
finac: 0
lac u.ac
jms fget
jms error
lac f.flags
sma
jms error
lac f.i
jms iget
jmp finac i
dacisize: 0
dac i.size
jms iput
lac i.size
jmp dacisize i

View File

@@ -1,214 +0,0 @@
"** 01-s1.pdf page 48
" s8
" manifests
mnproc = 10
dspbsz = 270
ndskbs = 4
" flags
.insys: 0
.int1: 0
.int2: 0
.ac: 0
.savblk: 0
.dsptm: 0
.dskb: 0
.dske: 0
" pointers
tadu: tad ulist
dacu: dac ulist
maxquant: 30
ofilesp: u.ofiles
idskpp: i.dskps
dskbufp: dskbuf
edspbuf: dspbuf+dspbsz
dspbufp3: dspbuf+3
fblksp: s.fblks
dacq1: dac q1
lacq1: lac q1
q2p: q2
" strings
initf:
<i>n;<i>t;< > ;< > "
" constants
d0: 0
d1: 1
d2: 2
d3: 3
d4: 4
d5: 5
d6: 6
d7: o7: 07
d8: 8
d9: 9
o12: d10: 10
o14: 014
o15: 015
o17: 017
o20: 020
o33: 033
o40: 040
o55: 055
o77: 077
d65:o101: 0101
d33: 33
o132: 0132
o134: 0134
o137: 0137
o155: 0155
o177: 0177
"** 01-s1.pdf page 49
o212: 0212
o375: 0375
o777: 0777
o2000: 02000
o4000: 04000
d7999: 7999
o10000: 010000
o17762: 017762
o17777: 017777
o20001: 020001
o40000: 040000
o40001: 040001
o70000: 070000
o77777: 077777
o100000: 0100000
o140000: 0140000
o200000: 0200000
o200001: 0200001
o300000: 0300000
o400000: 0400000
o500000: 0500000
o577777: 0577777
o600000: 0600000
o640000: 0640000
o700000: 0700000
o777700: 0777700
o777760: 0777760
dm3: -3
dm1: -1
9: .=.+t
c1: .=.+1
q1: q2;q2+90 "** ?? 98 ??
.=.+14
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
.+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
.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;0;0
dsploc: .=.+1
dsplno: .=.+1
dspbuf:
0065057;0147740;0160000
.=.+30
coldentry:
dzm 0100 " not re-entrant
caf
ion
clon
law 3072
wcga
jms dspinit
law dspbuf
jms movdsp
cla
jms dskio; 06000
jms copy; dskbuf; sysdata; ulist-sysdata
lac d3
jms namei; initf
jms halt
"** 01-s1.pdf page 50
jms iget
cla
jms iread; 4096; 4096
jmp 4096
. = dspbuf+dspbsz+3
dskbuf = 07700
dskbs: .=.+65+65+65+65
edskbsp: .
uquant: .=.+1
dspbufp: .=.+1
pbsflgs: .=.+2
mode: .=.+1
nttychar: .=.+1
npptchar: .=.+1
ttydelay: .=.+1
name: .=.+4
lnkaddr: .=.+1
char: .=.+1
dskaddr: .=.+1
uniqpid: 1
lu: .=.+4
sfiles: .=.+10
dpdata:
dpstat: .=.+1
dpread: .=.+1
dpwrite: .=.+1
dpchar: .=.+1
dspdata:
.dspb: .=.+1
.lpba: .=.+1 "** 4 written on listing
crdata:
crread: .=.+1
crchar: .=.+1
sysdata:
s.nxfblk: .=.+1
s.nfblks: .=.+1
s.fblks: .=.+10
s.uniq: .=.+1
s.tim: .=.+2
ulist:
0131000;1;0;0
0031040;0;0;0
0031100;0;0;0
0031140;0;0;0
0031200;0;0;0
0031240;0;0;0
0031300;0;0;0
0031340;0;0;0
0031400;0;0;0
0031440;0;0;0
userdata:
u.ac: 0
u.mq: 0
u.rq: .=.+9
u.uid: -1
u.pid: 1
u.cdir: 3
u.ulistp: ulist
u.swapret: 0
u.base: 0
u.count: 0
"** 01-s1.pdf page 51
u.limit: 0
u.ofiles: .=.+30
u.dspbuf: 0
u.intflg: 1
.=userdata+64
ii: .=.+1
inode:
i.flags: .=.+1
i.dskps: .=.+7
i.uid: .=.+1
i.nlks: .=.+1
i.size: .=.+1
i.uniq: .=.+1
.= inode+12
di: .=.+1
dnode:
d.i: .=.+1
d.name: .=.+4
d.uniq: .=.+1
. = dnode+8
fnode:
f.flags: .=.+1
f.badd: .=.+1
f.i: 0

View File

@@ -1,115 +0,0 @@
"** 01-s1.pdf page 53
" s9 -- cold boot
. = coldentry+4
" zero i-list
dzm ii
jms copyz; dskbuf; 64
1:
lac ii
jms dskio; 07000
isz ii
-710
tad ii
sza
jmp 1b
" free rest of disk
1:
lac ii
jms free
isz ii
-6400
tad ii
sza
jmp 1b
" read in tapes
dzm ii
1:
dzm sum
jms getw " count
sza
jmp .+3
hlt
jmp 1b " 0 count means pause
dac xx
isz ii
lac ii
jms iget
jms copyz; inode; 12
jms getw " flags
dac i.flags
-1
dac i.uid
jms getw " number links
dac i.nlks
-2
tad xx
dac i.size
lac ii
dac i.uniq
law 4096-1
dac 8
-1
tad i.size
cma
sna
jmp 3f
dac xx
"** 01-s1.pdf page 54
2:
jms getw
dac 8 i
isz xx
jmp 2b
3:
lac sum
dac xx
jms getw " checksum
sad xx
skp
jms halt
lac i.size
dac .+4
cla
jms iwrite; 4096; ..
jms iput
cla
jms dskio; 07000 "** writing on listing
jmp 1b
getw: 0
jms getc
alss 12
lmq
jms getc
alss 6
omq
lmq
jms getc
omq
lmq
add sum
dac sum
lacq
jmp getw i
getc: 0
iof
rsa
rsf
jmp .-1
rrb
sna
jmp getc+1
and o77
ion
jmp getc i
xx: 0
sum: 0

View File

@@ -1,95 +0,0 @@
"** 01-s1.pdf page 62
" sop
dac = 0040000 " MEM: deposit AC
jms = 0100000 " MEM: jump to subroutine
dzm = 0140000 " MEM: deposit zero to memory
lac = 0200000 " MEM: load AC
xor = 0240000 " MEM: XOR with AC
add = 0300000 " MEM: one's complement add
tad = 0340000 " MEM: two's complement add
xct = 0400000 " MEM: execute
isz = 0440000 " MEM: increment and skip if zero
and = 0500000 " MEM: AND
sad = 0540000 " MEM: skip if AC different
jmp = 0600000 " MEM: jump
nop = 0740000 " OPR: no-op
i = 020000 " indirect
law = 0760000 " OPR: load accumulator with (instr)
cma = 0740001 " OPR: complement AC
las = 0750004 " OPR: load AC from switches
ral = 0740010 " OPR: rotate AC left
rar = 0740020 " OPR: rotate AC right
hlt = 0740040 " OPR: halt
sma = 0740100 " OPR: skip on minus AC
sza = 0740200 " OPR: skip on zero AC
snl = 0740400 " OPR: skip on non-zero link
skp = 0741000 " OPR: skip unconditionally
sna = 0741200 " OPR: skip on non-zero AC
szl = 0741400 " OPR: skip on zero link
rtl = 0742010 " OPR: rotate two left
rtr = 0742020 " OPR: rotate two right
cll = 0744000 " OPR: clear link
rcl = 0744010 " OPR: clear link, rotate left
rcr = 0744020 " OPR: clear link, rotate right
cla = 0750000 " OPR: clear AC
lrs = 0640500 " EAE: long right shift
lrss = 0660500 " EAE: long right shift, signed
lls = 0640600 " EAE: long left shift
llss = 0660600 " EAE: long left shift, signed
als = 0640700 " EAE: AC left shift
alss = 0660700 " EAE: AC left shift, signed
mul = 0653323 " EAE: multiply
idiv = 0653323 " EAE: integer divide
lacq = 0641002 " EAE: load AC with MQ
clq = 0650000 " EAE: clear MQ
omq = 0650002 " EAE: OR MQ into AC
cmq = 0650004 " EAE: complement MQ
lmq = 0652000 " EAE: load MQ from AC
dscs = 0707141 " DSK: clear status register
dslw = 0707124 " DSK: clear and load WC from AC
dslm = 0707142 " DSK: clear and load MAC from AC
dsld = 0707104 " DSK: clear and load TA and SA from AC
dsls = 0707144 " DSK: load status
dssf = 0707121 " DSK: skip on flags
dsrs = 0707132 " DSK: read status register
iof = 0700002 " PIC: interrupts off
ion = 0700042 " PIC: interrupts on
caf = 0703302 " CPU: clear all flags
clon = 0700044 " CLK: clear flag, enable
clsf = 0700001 " CLK: skip if overflow
"** 01-s1.pdf page 63
clof = 0700004 " CLK: clear flag, disable
ksf = 0700301 " KBD: skip if flag set
krb = 0700312 " KBD: read buffer
tsf = 0700401 " TTY: skip if flag set
tcf = 0700402 " TTY: clear flag
tls = 0700406 " TTY: load buffer, select
sck = 0704301 " S-2: skip on console keyboard
cck = 0704304 " S-2: clear console keyboard
lck = 0704312 " S-2: load console keyboard
rsf = 0700101 " PTR: skip if flag set
rsa = 0700104 " PTR: select alphanumeric mode
rrb = 0700112 " PTR: clear flag, or read buffer
psf = 0700201 " PTP: skip if flag set
pcf = 0700202 " PTP: clear flag
psa = 0700204 " PTP: alphanumeric mode
cdf = 0700501 " ???
lds = 0701052 " S-2: load display status
lda = 0701012 " S-2: load display address
wcga = 0704206 " S-2: ???
raef = 0700742 " S-2: resume after edges flag
rlpd = 0700723 " S-2: resume after light pen stop, disabled
beg = 0700547 " S-2: begin
spb = 0704401 " S-2: skip on push button flag
cpb = 0704404 " S-2: clear push button flag
lpb = 0704412 " S-2: load push buttons
wbl = 0704424 " S-2: write button lights
dprs = 0704752 " dataphone: read status
dpsf = 0704741 " dataphone: skip on flag
dpcf = 0704761 " dataphone: clear flag
dprc = 0704712 " dataphone: read character
crsf = 0706701 " CDR: skip if ready
crrb = 0706712 " CDR: read buffer

View File

@@ -1,264 +0,0 @@
"** 01-s1.pdf page 57 -- system assembly map
. 004671 r
.ac 004012 r
.chown 000426 r
.capt 000404 r
.creat 000665 r
.chdir 000622 r
.chmod 000414 r
.dskb 004105 r
.dspb 005547 r
.dsptm 004104 r
.dske 004106 r
.exit 001170 r
.fork 001116 r
.getuid 000433 r
.halt 001343 r
.int1 004100 r
.insys 004077 r
.int2 004101 r
.intrp 000257 r
.link 000474 r
.lpba 005550 r
.open 000633 r
.rmes 001204 r
.rele 000410 r
.rename 000547 r
.read 000731 r
.smes 001232 r
.savblk 004103 r
.sysloc 000262 r
.setuid 000566 r
.status 000352 r
.save 001156 r
.seek 000436 r
.tell 000466 r
.time 000615 r
.unlink 000547 r
.write 001000 r
access 002323 r
alloc 001556 r
argname 002642 r
arg 002636 r
awake 001311 r
badcal 001153 r
betwen 001654 r
c1 004270 r
chkint 000320 r
chkink1 001546 r
char 005522 r
cnop 003453 r
coldentr 004520 r
copyz 001723 r
collapse 002066 r
copy 001700 r
crdata 005551 r
crchar 005552 r
crread 005551 r
cskp 003346 r
d.name 005761 r
d.uniq 005765 r
d.i 005760 r
"** 01-s1.pdf page 58
d0 004127 r
d10 004141 r
d1 004130 r
d2 004131 r
d33 004153 r
d3 004132 r
d4 004133 r
d5 004134 r
d6 004135 r
d65 004155 r
d7999 004166 r
d7 004136 r
d8 004137 r
d9 004140 r
dacq1 004120 r
dacu 004110 r
dacisize 003413 r
dget 003115 r
di 005757 r
dm1 004215 r
dm3 004214 r
dnode 005760 r
dpdata 005543 r
dput 003147 r
dpchar 005546 r
dpwrite 005545 r
dpstat 005543 r
dpread 005544 r
dskbufp 004114 r
dskio 002173 r
dspdata 005547 r
dskrd 002127 r
dsktrans 002231 r
dsploc 004455 r
dslot 002474 r
dspino 004456 r
dspbufp3 004116 r
dspbufp 005506 r
dspresta 003523 r
dskaddr 005523 r
dskbs 005100 r
dskwr 002157 r
dspput 002551 r
dspleft 002573 r
dspbuf 004457 r
error 001542 r
exitrw 001041 r
f.badd 005771 r
f.flags 005770 r
fassign 002340 r
fallr 002436 r
fblksp 004117 r
fget 002371 r
finac 003401 r
fnode 005770 r
"** 01-s1.pdf page 59
forall 002434 r
fput 003413 r
free 001615 r
getchar 001756 r
getw 004635 r
getc 004654 r
halt 002265 r
i.flags 005743 r
i.dskps 005744 r
i.uniq 005756 r
i.size 005755 r
i.nlks 005754 r
i.uid 005753 r
icreat 002506 r
idskpp 004113 r
iget 003030 r
ii 005742 r
inode 005743 r
intrp1 004032 r
intrp2 004055 r
initf 004123 r
iput 003057 r
iread 003277 r
isown 002675 r
itrunc 002706 r
iwrite 003270 r
laci 001646 r
lacq1 004121 r
lnkaddr 005521 r
lookfor 001073 r
locsw 000275 r
locn 000317 r
lu 005525 r
maxquant 004111 r
mode 005511 r
movdsp 002626 r
name 005515 r
namei 002750 r
npptchar 005513 r
nttychar 005512 r
o10000 004167 r
o17 004144 r
o177 004160 r
o101 004152 r
o17762 004170 r
o17777 004171 r
o12 004141 r
o132 004154 r
o134 004155 r
o137 004156 r
o100000 004177 r
o140000 004200 r
o14 004142 r
o15 004143 r
0155 004157 r
o2000 004164 r
o200001 004262 r
o20001 004172 r
020 004145 r
o212 004161 r
o200000 004201 r
"** 01-s1.pdf page 60
o375 004162 r
o33 004146 r
o300000 004203 r
o4000 004165 r
o40000 004173 r
o40 004147 r
o400000 004204 r
o500000 004205 r
o55 004150 r
o577777 004206 r
o600000 004207 r
o640000 004210 r
o777 004163 r
o77 004157 r
o70000 004175 r
o77777 004176 r
o777760 004213 r
o7 004136 r
o700000 004211 r
o777700 004212 r
ofilesp 004112 r
okexit 000102 r
open1 000722 r
orig 000000 r
passone 001534 r
pbsflgs 005507 r
pget 003163 r
piret 003766 r
pibreak 003420 r
putchar 001741 r
putq 002022 r
putcr 004025 r
q1 004271 r
q2p 004122 r
q2 004311 r
rkbdi 001415 r
rppti 001472 r
rttyi 001344 r
s.tim 005570 r
s.nxfblk 005553 r
s.uniq 005567 r
s.nfblks 005554 r
s.fblks 005555 r
seektell 002656 r
searchu 001047 r
sfiles 005551 r
sleep 002445 r
srcdbs 002046 r
sum 004670 r
swr 001331 r
swp 000220 r
swn 000256 r
sww 001331 r
swap 000136 r
sysdata 005553 r
sysexit 000103 r
takeq 001770 r
tadu 004107 r
ttydelay 005514 r
ttyresta 003603 r
"** 01-s1.pdf page 61
u.dspbuf 005723 r
u.intflg 005724 r
u.ulistp 005660 r
u.pid 005656 r
u.ofiles 005665 r
u.swapre 005661 r
u.mq 005643 r
u.uid 005655 r
u.ac 005642 r
u.limit 005664 r
u.cdir 005657 r
u.count 005663 r
u.base 005662 r
u.rq 005644 r
ulsit 005562 r
uniqpid 005524 r
uquant 005505 r
userdata 005642 r
wakeup 003773 r
wdspo 001462 r
wppto 001506 r
wttyo 001364 r
xx 004667 r