diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..130f690
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,3 @@
+language: c
+sudo: false
+script: make clean;make
diff --git a/Makefile b/Makefile
index 265a7c4..346ee05 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
diff --git a/README.md b/README.md
index 0116287..2cfff8e 100644
--- a/README.md
+++ b/README.md
@@ -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
+
-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
diff --git a/pdp7parse/.gitignore b/pdp7parse/.gitignore
deleted file mode 100644
index b04c3c2..0000000
--- a/pdp7parse/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/**/*.log
-/**/.DS_Store
-/**/.project
-/**/.classpath
-/**/.settings/
-/**/target
-/**/test-output
-ANTLRv4Lexer.g4
diff --git a/pdp7parse/README.md b/pdp7parse/README.md
deleted file mode 100644
index 091723c..0000000
--- a/pdp7parse/README.md
+++ /dev/null
@@ -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.
-
diff --git a/pdp7parse/pom.xml b/pdp7parse/pom.xml
deleted file mode 100644
index 07bd220..0000000
--- a/pdp7parse/pom.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
- 4.0.0
- com.khubla.pdp7
- pdp7parse
- jar
- khubla.com PDP7 Parser
- 1.0
-
- 4.5
-
-
-
- commons-cli
- commons-cli
- 1.2
- jar
- compile
-
-
- org.antlr
- antlr4-runtime
- ${antlr.version}
- jar
- compile
-
-
- commons-io
- commons-io
- 2.4
-
-
- junit
- junit
- 4.11
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 1.6
- 1.6
-
-
-
- org.antlr
- antlr4-maven-plugin
- ${antlr.version}
-
- pdp7.g4
- src/main/java
-
-
-
-
-
diff --git a/pdp7parse/src/main/antlr4/com/khubla/pdp7parse/antlr4/pdp7.g4 b/pdp7parse/src/main/antlr4/com/khubla/pdp7parse/antlr4/pdp7.g4
deleted file mode 100644
index ed5d7b4..0000000
--- a/pdp7parse/src/main/antlr4/com/khubla/pdp7parse/antlr4/pdp7.g4
+++ /dev/null
@@ -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
- ;
diff --git a/pdp7parse/src/main/java/com/khubla/pdp7parse/PDP7Parse.java b/pdp7parse/src/main/java/com/khubla/pdp7parse/PDP7Parse.java
deleted file mode 100644
index d12ebf1..0000000
--- a/pdp7parse/src/main/java/com/khubla/pdp7parse/PDP7Parse.java
+++ /dev/null
@@ -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";
-}
\ No newline at end of file
diff --git a/pdp7parse/src/main/java/com/khubla/pdp7parse/PDP7Parser.java b/pdp7parse/src/main/java/com/khubla/pdp7parse/PDP7Parser.java
deleted file mode 100644
index 62aac41..0000000
--- a/pdp7parse/src/main/java/com/khubla/pdp7parse/PDP7Parser.java
+++ /dev/null
@@ -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);
- }
- }
-}
diff --git a/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7BaseListener.java b/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7BaseListener.java
deleted file mode 100644
index 05ba53a..0000000
--- a/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7BaseListener.java
+++ /dev/null
@@ -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}
- *
- *
The default implementation does nothing.
- */
- @Override public void enterProg(pdp7Parser.ProgContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitProg(pdp7Parser.ProgContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterLine(pdp7Parser.LineContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitLine(pdp7Parser.LineContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterLineeol(pdp7Parser.LineeolContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitLineeol(pdp7Parser.LineeolContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDeclarations(pdp7Parser.DeclarationsContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDeclarations(pdp7Parser.DeclarationsContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDeclaration(pdp7Parser.DeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDeclaration(pdp7Parser.DeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterInstruction(pdp7Parser.InstructionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitInstruction(pdp7Parser.InstructionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterArgument(pdp7Parser.ArgumentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitArgument(pdp7Parser.ArgumentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterAssignment(pdp7Parser.AssignmentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitAssignment(pdp7Parser.AssignmentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterExpression(pdp7Parser.ExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitExpression(pdp7Parser.ExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterAtom(pdp7Parser.AtomContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitAtom(pdp7Parser.AtomContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterString(pdp7Parser.StringContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitString(pdp7Parser.StringContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterEol(pdp7Parser.EolContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitEol(pdp7Parser.EolContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterComment(pdp7Parser.CommentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitComment(pdp7Parser.CommentContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterLabel(pdp7Parser.LabelContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitLabel(pdp7Parser.LabelContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterVariable(pdp7Parser.VariableContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitVariable(pdp7Parser.VariableContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterOpcode(pdp7Parser.OpcodeContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitOpcode(pdp7Parser.OpcodeContext ctx) { }
-
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void visitTerminal(TerminalNode node) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void visitErrorNode(ErrorNode node) { }
-}
\ No newline at end of file
diff --git a/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Lexer.java b/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Lexer.java
deleted file mode 100644
index 1d27ce9..0000000
--- a/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Lexer.java
+++ /dev/null
@@ -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] = "";
- }
- }
- }
-
- @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{?}@\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\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);
- }
- }
-}
\ No newline at end of file
diff --git a/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Listener.java b/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Listener.java
deleted file mode 100644
index 687e61f..0000000
--- a/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Listener.java
+++ /dev/null
@@ -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);
-}
\ No newline at end of file
diff --git a/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Parser.java b/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Parser.java
deleted file mode 100644
index 91bed3d..0000000
--- a/pdp7parse/src/main/java/com/khubla/pdp7parse/antlr4/pdp7Parser.java
+++ /dev/null
@@ -1,1302 +0,0 @@
-// Generated from com/khubla/pdp7parse/antlr4/pdp7.g4 by ANTLR 4.5
-package com.khubla.pdp7parse.antlr4;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.misc.*;
-import org.antlr.v4.runtime.tree.*;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
-public class pdp7Parser extends Parser {
- 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 final int
- RULE_prog = 0, RULE_line = 1, RULE_lineeol = 2, RULE_declarations = 3,
- RULE_declaration = 4, RULE_instruction = 5, RULE_argument = 6, RULE_assignment = 7,
- RULE_expression = 8, RULE_multiplyingExpression = 9, RULE_atom = 10, RULE_string = 11,
- RULE_eol = 12, RULE_comment = 13, RULE_label = 14, RULE_variable = 15,
- RULE_opcode = 16;
- public static final String[] ruleNames = {
- "prog", "line", "lineeol", "declarations", "declaration", "instruction",
- "argument", "assignment", "expression", "multiplyingExpression", "atom",
- "string", "eol", "comment", "label", "variable", "opcode"
- };
-
- 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] = "";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
- @Override
- public String getGrammarFileName() { return "pdp7.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public pdp7Parser(TokenStream input) {
- super(input);
- _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
- public static class ProgContext extends ParserRuleContext {
- public TerminalNode EOF() { return getToken(pdp7Parser.EOF, 0); }
- public List lineeol() {
- return getRuleContexts(LineeolContext.class);
- }
- public LineeolContext lineeol(int i) {
- return getRuleContext(LineeolContext.class,i);
- }
- public LineContext line() {
- return getRuleContext(LineContext.class,0);
- }
- public ProgContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_prog; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterProg(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitProg(this);
- }
- }
-
- public final ProgContext prog() throws RecognitionException {
- ProgContext _localctx = new ProgContext(_ctx, getState());
- enterRule(_localctx, 0, RULE_prog);
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(35);
- _errHandler.sync(this);
- _alt = 1;
- do {
- switch (_alt) {
- case 1:
- {
- {
- setState(34);
- lineeol();
- }
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- setState(37);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,0,_ctx);
- } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
- setState(40);
- switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
- case 1:
- {
- setState(39);
- line();
- }
- break;
- }
- setState(42);
- match(EOF);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class LineContext extends ParserRuleContext {
- public DeclarationsContext declarations() {
- return getRuleContext(DeclarationsContext.class,0);
- }
- public CommentContext comment() {
- return getRuleContext(CommentContext.class,0);
- }
- public LineContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_line; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterLine(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitLine(this);
- }
- }
-
- public final LineContext line() throws RecognitionException {
- LineContext _localctx = new LineContext(_ctx, getState());
- enterRule(_localctx, 2, RULE_line);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(45);
- switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) {
- case 1:
- {
- setState(44);
- declarations();
- }
- break;
- }
- setState(48);
- _la = _input.LA(1);
- if (_la==COMMENT) {
- {
- setState(47);
- comment();
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class LineeolContext extends ParserRuleContext {
- public LineContext line() {
- return getRuleContext(LineContext.class,0);
- }
- public EolContext eol() {
- return getRuleContext(EolContext.class,0);
- }
- public LineeolContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_lineeol; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterLineeol(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitLineeol(this);
- }
- }
-
- public final LineeolContext lineeol() throws RecognitionException {
- LineeolContext _localctx = new LineeolContext(_ctx, getState());
- enterRule(_localctx, 4, RULE_lineeol);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(50);
- line();
- setState(51);
- eol();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class DeclarationsContext extends ParserRuleContext {
- public List declaration() {
- return getRuleContexts(DeclarationContext.class);
- }
- public DeclarationContext declaration(int i) {
- return getRuleContext(DeclarationContext.class,i);
- }
- public DeclarationsContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_declarations; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterDeclarations(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitDeclarations(this);
- }
- }
-
- public final DeclarationsContext declarations() throws RecognitionException {
- DeclarationsContext _localctx = new DeclarationsContext(_ctx, getState());
- enterRule(_localctx, 6, RULE_declarations);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(53);
- declaration();
- setState(58);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==T__0) {
- {
- {
- setState(54);
- match(T__0);
- setState(55);
- declaration();
- }
- }
- setState(60);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class DeclarationContext extends ParserRuleContext {
- public List label() {
- return getRuleContexts(LabelContext.class);
- }
- public LabelContext label(int i) {
- return getRuleContext(LabelContext.class,i);
- }
- public List instruction() {
- return getRuleContexts(InstructionContext.class);
- }
- public InstructionContext instruction(int i) {
- return getRuleContext(InstructionContext.class,i);
- }
- public List assignment() {
- return getRuleContexts(AssignmentContext.class);
- }
- public AssignmentContext assignment(int i) {
- return getRuleContext(AssignmentContext.class,i);
- }
- public List expression() {
- return getRuleContexts(ExpressionContext.class);
- }
- public ExpressionContext expression(int i) {
- return getRuleContext(ExpressionContext.class,i);
- }
- public DeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_declaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitDeclaration(this);
- }
- }
-
- public final DeclarationContext declaration() throws RecognitionException {
- DeclarationContext _localctx = new DeclarationContext(_ctx, getState());
- enterRule(_localctx, 8, RULE_declaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(64);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==LABEL) {
- {
- {
- setState(61);
- label();
- }
- }
- setState(66);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- setState(72);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__49) | (1L << T__50) | (1L << T__51) | (1L << T__52) | (1L << T__53) | (1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__57) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__64 - 64)) | (1L << (T__65 - 64)) | (1L << (T__66 - 64)) | (1L << (T__67 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (T__71 - 64)) | (1L << (T__72 - 64)) | (1L << (T__73 - 64)) | (1L << (T__74 - 64)) | (1L << (T__75 - 64)) | (1L << (T__76 - 64)) | (1L << (T__77 - 64)) | (1L << (T__78 - 64)) | (1L << (T__79 - 64)) | (1L << (T__80 - 64)) | (1L << (T__81 - 64)) | (1L << (T__82 - 64)) | (1L << (T__83 - 64)) | (1L << (T__84 - 64)) | (1L << (T__85 - 64)) | (1L << (T__86 - 64)) | (1L << (T__87 - 64)) | (1L << (T__88 - 64)) | (1L << (T__89 - 64)) | (1L << (T__90 - 64)) | (1L << (T__91 - 64)) | (1L << (T__92 - 64)) | (1L << (T__93 - 64)) | (1L << (LOC - 64)) | (1L << (RELOC - 64)) | (1L << (MINUS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (NUMERIC_LITERAL - 64)) | (1L << (DECIMAL - 64)) | (1L << (OCTAL - 64)) | (1L << (DECIMAL_MINUS - 64)) | (1L << (STRING - 64)))) != 0)) {
- {
- setState(70);
- switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
- case 1:
- {
- setState(67);
- instruction();
- }
- break;
- case 2:
- {
- setState(68);
- assignment();
- }
- break;
- case 3:
- {
- setState(69);
- expression();
- }
- break;
- }
- }
- setState(74);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class InstructionContext extends ParserRuleContext {
- public OpcodeContext opcode() {
- return getRuleContext(OpcodeContext.class,0);
- }
- public List argument() {
- return getRuleContexts(ArgumentContext.class);
- }
- public ArgumentContext argument(int i) {
- return getRuleContext(ArgumentContext.class,i);
- }
- public InstructionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_instruction; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterInstruction(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitInstruction(this);
- }
- }
-
- public final InstructionContext instruction() throws RecognitionException {
- InstructionContext _localctx = new InstructionContext(_ctx, getState());
- enterRule(_localctx, 10, RULE_instruction);
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(75);
- opcode();
- setState(79);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,8,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- setState(76);
- argument();
- }
- }
- }
- setState(81);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,8,_ctx);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class ArgumentContext extends ParserRuleContext {
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public ArgumentContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_argument; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterArgument(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitArgument(this);
- }
- }
-
- public final ArgumentContext argument() throws RecognitionException {
- ArgumentContext _localctx = new ArgumentContext(_ctx, getState());
- enterRule(_localctx, 12, RULE_argument);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(82);
- expression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class AssignmentContext extends ParserRuleContext {
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public OpcodeContext opcode() {
- return getRuleContext(OpcodeContext.class,0);
- }
- public VariableContext variable() {
- return getRuleContext(VariableContext.class,0);
- }
- public TerminalNode LOC() { return getToken(pdp7Parser.LOC, 0); }
- public TerminalNode RELOC() { return getToken(pdp7Parser.RELOC, 0); }
- public AssignmentContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_assignment; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterAssignment(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitAssignment(this);
- }
- }
-
- public final AssignmentContext assignment() throws RecognitionException {
- AssignmentContext _localctx = new AssignmentContext(_ctx, getState());
- enterRule(_localctx, 14, RULE_assignment);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(88);
- switch (_input.LA(1)) {
- case T__3:
- case T__4:
- case T__5:
- case T__6:
- case T__7:
- case T__8:
- case T__9:
- case T__10:
- case T__11:
- case T__12:
- case T__13:
- case T__14:
- case T__15:
- case T__16:
- case T__17:
- case T__18:
- case T__19:
- case T__20:
- case T__21:
- case T__22:
- case T__23:
- case T__24:
- case T__25:
- case T__26:
- case T__27:
- case T__28:
- case T__29:
- case T__30:
- case T__31:
- case T__32:
- case T__33:
- case T__34:
- case T__35:
- case T__36:
- case T__37:
- case T__38:
- case T__39:
- case T__40:
- case T__41:
- case T__42:
- case T__43:
- case T__44:
- case T__45:
- case T__46:
- case T__47:
- case T__48:
- case T__49:
- case T__50:
- case T__51:
- case T__52:
- case T__53:
- case T__54:
- case T__55:
- case T__56:
- case T__57:
- case T__58:
- case T__59:
- case T__60:
- case T__61:
- case T__62:
- case T__63:
- case T__64:
- case T__65:
- case T__66:
- case T__67:
- case T__68:
- case T__69:
- case T__70:
- case T__71:
- case T__72:
- case T__73:
- case T__74:
- case T__75:
- case T__76:
- case T__77:
- case T__78:
- case T__79:
- case T__80:
- case T__81:
- case T__82:
- case T__83:
- case T__84:
- case T__85:
- case T__86:
- case T__87:
- case T__88:
- case T__89:
- case T__90:
- case T__91:
- case T__92:
- case T__93:
- {
- setState(84);
- opcode();
- }
- break;
- case IDENTIFIER:
- {
- setState(85);
- variable();
- }
- break;
- case LOC:
- {
- setState(86);
- match(LOC);
- }
- break;
- case RELOC:
- {
- setState(87);
- match(RELOC);
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- setState(90);
- match(T__1);
- setState(91);
- expression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class ExpressionContext extends ParserRuleContext {
- public List multiplyingExpression() {
- return getRuleContexts(MultiplyingExpressionContext.class);
- }
- public MultiplyingExpressionContext multiplyingExpression(int i) {
- return getRuleContext(MultiplyingExpressionContext.class,i);
- }
- public List PLUS() { return getTokens(pdp7Parser.PLUS); }
- public TerminalNode PLUS(int i) {
- return getToken(pdp7Parser.PLUS, i);
- }
- public List MINUS() { return getTokens(pdp7Parser.MINUS); }
- public TerminalNode MINUS(int i) {
- return getToken(pdp7Parser.MINUS, i);
- }
- public ExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_expression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitExpression(this);
- }
- }
-
- public final ExpressionContext expression() throws RecognitionException {
- ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
- enterRule(_localctx, 16, RULE_expression);
- int _la;
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(93);
- multiplyingExpression();
- setState(98);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,10,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- setState(94);
- _la = _input.LA(1);
- if ( !(_la==PLUS || _la==MINUS) ) {
- _errHandler.recoverInline(this);
- } else {
- consume();
- }
- setState(95);
- multiplyingExpression();
- }
- }
- }
- setState(100);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,10,_ctx);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class MultiplyingExpressionContext extends ParserRuleContext {
- public List atom() {
- return getRuleContexts(AtomContext.class);
- }
- public AtomContext atom(int i) {
- return getRuleContext(AtomContext.class,i);
- }
- public List TIMES() { return getTokens(pdp7Parser.TIMES); }
- public TerminalNode TIMES(int i) {
- return getToken(pdp7Parser.TIMES, i);
- }
- public List DIV() { return getTokens(pdp7Parser.DIV); }
- public TerminalNode DIV(int i) {
- return getToken(pdp7Parser.DIV, i);
- }
- public MultiplyingExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_multiplyingExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterMultiplyingExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitMultiplyingExpression(this);
- }
- }
-
- public final MultiplyingExpressionContext multiplyingExpression() throws RecognitionException {
- MultiplyingExpressionContext _localctx = new MultiplyingExpressionContext(_ctx, getState());
- enterRule(_localctx, 18, RULE_multiplyingExpression);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(101);
- atom();
- setState(106);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==TIMES || _la==DIV) {
- {
- {
- setState(102);
- _la = _input.LA(1);
- if ( !(_la==TIMES || _la==DIV) ) {
- _errHandler.recoverInline(this);
- } else {
- consume();
- }
- setState(103);
- atom();
- }
- }
- setState(108);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class AtomContext extends ParserRuleContext {
- public VariableContext variable() {
- return getRuleContext(VariableContext.class,0);
- }
- public TerminalNode LOC() { return getToken(pdp7Parser.LOC, 0); }
- public TerminalNode RELOC() { return getToken(pdp7Parser.RELOC, 0); }
- public StringContext string() {
- return getRuleContext(StringContext.class,0);
- }
- public TerminalNode DECIMAL() { return getToken(pdp7Parser.DECIMAL, 0); }
- public TerminalNode DECIMAL_MINUS() { return getToken(pdp7Parser.DECIMAL_MINUS, 0); }
- public TerminalNode OCTAL() { return getToken(pdp7Parser.OCTAL, 0); }
- public TerminalNode NUMERIC_LITERAL() { return getToken(pdp7Parser.NUMERIC_LITERAL, 0); }
- public AtomContext atom() {
- return getRuleContext(AtomContext.class,0);
- }
- public AtomContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_atom; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterAtom(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitAtom(this);
- }
- }
-
- public final AtomContext atom() throws RecognitionException {
- AtomContext _localctx = new AtomContext(_ctx, getState());
- enterRule(_localctx, 20, RULE_atom);
- try {
- setState(119);
- switch (_input.LA(1)) {
- case IDENTIFIER:
- enterOuterAlt(_localctx, 1);
- {
- setState(109);
- variable();
- }
- break;
- case LOC:
- enterOuterAlt(_localctx, 2);
- {
- setState(110);
- match(LOC);
- }
- break;
- case RELOC:
- enterOuterAlt(_localctx, 3);
- {
- setState(111);
- match(RELOC);
- }
- break;
- case STRING:
- enterOuterAlt(_localctx, 4);
- {
- setState(112);
- string();
- }
- break;
- case DECIMAL:
- enterOuterAlt(_localctx, 5);
- {
- setState(113);
- match(DECIMAL);
- }
- break;
- case DECIMAL_MINUS:
- enterOuterAlt(_localctx, 6);
- {
- setState(114);
- match(DECIMAL_MINUS);
- }
- break;
- case OCTAL:
- enterOuterAlt(_localctx, 7);
- {
- setState(115);
- match(OCTAL);
- }
- break;
- case NUMERIC_LITERAL:
- enterOuterAlt(_localctx, 8);
- {
- setState(116);
- match(NUMERIC_LITERAL);
- }
- break;
- case MINUS:
- enterOuterAlt(_localctx, 9);
- {
- setState(117);
- match(MINUS);
- setState(118);
- atom();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class StringContext extends ParserRuleContext {
- public TerminalNode STRING() { return getToken(pdp7Parser.STRING, 0); }
- public List NUMERIC_LITERAL() { return getTokens(pdp7Parser.NUMERIC_LITERAL); }
- public TerminalNode NUMERIC_LITERAL(int i) {
- return getToken(pdp7Parser.NUMERIC_LITERAL, i);
- }
- public StringContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_string; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterString(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitString(this);
- }
- }
-
- public final StringContext string() throws RecognitionException {
- StringContext _localctx = new StringContext(_ctx, getState());
- enterRule(_localctx, 22, RULE_string);
- int _la;
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(121);
- match(STRING);
- setState(125);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,13,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- setState(122);
- match(NUMERIC_LITERAL);
- }
- }
- }
- setState(127);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,13,_ctx);
- }
- setState(129);
- _la = _input.LA(1);
- if (_la==T__2) {
- {
- setState(128);
- match(T__2);
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class EolContext extends ParserRuleContext {
- public TerminalNode EOL() { return getToken(pdp7Parser.EOL, 0); }
- public EolContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_eol; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterEol(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitEol(this);
- }
- }
-
- public final EolContext eol() throws RecognitionException {
- EolContext _localctx = new EolContext(_ctx, getState());
- enterRule(_localctx, 24, RULE_eol);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(131);
- match(EOL);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class CommentContext extends ParserRuleContext {
- public TerminalNode COMMENT() { return getToken(pdp7Parser.COMMENT, 0); }
- public CommentContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_comment; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterComment(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitComment(this);
- }
- }
-
- public final CommentContext comment() throws RecognitionException {
- CommentContext _localctx = new CommentContext(_ctx, getState());
- enterRule(_localctx, 26, RULE_comment);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(133);
- match(COMMENT);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class LabelContext extends ParserRuleContext {
- public TerminalNode LABEL() { return getToken(pdp7Parser.LABEL, 0); }
- public LabelContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_label; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterLabel(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitLabel(this);
- }
- }
-
- public final LabelContext label() throws RecognitionException {
- LabelContext _localctx = new LabelContext(_ctx, getState());
- enterRule(_localctx, 28, RULE_label);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(135);
- match(LABEL);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class VariableContext extends ParserRuleContext {
- public TerminalNode IDENTIFIER() { return getToken(pdp7Parser.IDENTIFIER, 0); }
- public VariableContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_variable; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterVariable(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitVariable(this);
- }
- }
-
- public final VariableContext variable() throws RecognitionException {
- VariableContext _localctx = new VariableContext(_ctx, getState());
- enterRule(_localctx, 30, RULE_variable);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(137);
- match(IDENTIFIER);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static class OpcodeContext extends ParserRuleContext {
- public OpcodeContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_opcode; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).enterOpcode(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof pdp7Listener ) ((pdp7Listener)listener).exitOpcode(this);
- }
- }
-
- public final OpcodeContext opcode() throws RecognitionException {
- OpcodeContext _localctx = new OpcodeContext(_ctx, getState());
- enterRule(_localctx, 32, RULE_opcode);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(139);
- _la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__49) | (1L << T__50) | (1L << T__51) | (1L << T__52) | (1L << T__53) | (1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__57) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__64 - 64)) | (1L << (T__65 - 64)) | (1L << (T__66 - 64)) | (1L << (T__67 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (T__71 - 64)) | (1L << (T__72 - 64)) | (1L << (T__73 - 64)) | (1L << (T__74 - 64)) | (1L << (T__75 - 64)) | (1L << (T__76 - 64)) | (1L << (T__77 - 64)) | (1L << (T__78 - 64)) | (1L << (T__79 - 64)) | (1L << (T__80 - 64)) | (1L << (T__81 - 64)) | (1L << (T__82 - 64)) | (1L << (T__83 - 64)) | (1L << (T__84 - 64)) | (1L << (T__85 - 64)) | (1L << (T__86 - 64)) | (1L << (T__87 - 64)) | (1L << (T__88 - 64)) | (1L << (T__89 - 64)) | (1L << (T__90 - 64)) | (1L << (T__91 - 64)) | (1L << (T__92 - 64)) | (1L << (T__93 - 64)))) != 0)) ) {
- _errHandler.recoverInline(this);
- } else {
- consume();
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public static final String _serializedATN =
- "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3p\u0090\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"+
- "\3\2\6\2&\n\2\r\2\16\2\'\3\2\5\2+\n\2\3\2\3\2\3\3\5\3\60\n\3\3\3\5\3\63"+
- "\n\3\3\4\3\4\3\4\3\5\3\5\3\5\7\5;\n\5\f\5\16\5>\13\5\3\6\7\6A\n\6\f\6"+
- "\16\6D\13\6\3\6\3\6\3\6\7\6I\n\6\f\6\16\6L\13\6\3\7\3\7\7\7P\n\7\f\7\16"+
- "\7S\13\7\3\b\3\b\3\t\3\t\3\t\3\t\5\t[\n\t\3\t\3\t\3\t\3\n\3\n\3\n\7\n"+
- "c\n\n\f\n\16\nf\13\n\3\13\3\13\3\13\7\13k\n\13\f\13\16\13n\13\13\3\f\3"+
- "\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\fz\n\f\3\r\3\r\7\r~\n\r\f\r\16\r"+
- "\u0081\13\r\3\r\5\r\u0084\n\r\3\16\3\16\3\17\3\17\3\20\3\20\3\21\3\21"+
- "\3\22\3\22\3\22\2\2\23\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"\2\5\3"+
- "\2cd\3\2ef\3\2\6`\u0097\2%\3\2\2\2\4/\3\2\2\2\6\64\3\2\2\2\b\67\3\2\2"+
- "\2\nB\3\2\2\2\fM\3\2\2\2\16T\3\2\2\2\20Z\3\2\2\2\22_\3\2\2\2\24g\3\2\2"+
- "\2\26y\3\2\2\2\30{\3\2\2\2\32\u0085\3\2\2\2\34\u0087\3\2\2\2\36\u0089"+
- "\3\2\2\2 \u008b\3\2\2\2\"\u008d\3\2\2\2$&\5\6\4\2%$\3\2\2\2&\'\3\2\2\2"+
- "\'%\3\2\2\2\'(\3\2\2\2(*\3\2\2\2)+\5\4\3\2*)\3\2\2\2*+\3\2\2\2+,\3\2\2"+
- "\2,-\7\2\2\3-\3\3\2\2\2.\60\5\b\5\2/.\3\2\2\2/\60\3\2\2\2\60\62\3\2\2"+
- "\2\61\63\5\34\17\2\62\61\3\2\2\2\62\63\3\2\2\2\63\5\3\2\2\2\64\65\5\4"+
- "\3\2\65\66\5\32\16\2\66\7\3\2\2\2\67<\5\n\6\289\7\3\2\29;\5\n\6\2:8\3"+
- "\2\2\2;>\3\2\2\2<:\3\2\2\2<=\3\2\2\2=\t\3\2\2\2><\3\2\2\2?A\5\36\20\2"+
- "@?\3\2\2\2AD\3\2\2\2B@\3\2\2\2BC\3\2\2\2CJ\3\2\2\2DB\3\2\2\2EI\5\f\7\2"+
- "FI\5\20\t\2GI\5\22\n\2HE\3\2\2\2HF\3\2\2\2HG\3\2\2\2IL\3\2\2\2JH\3\2\2"+
- "\2JK\3\2\2\2K\13\3\2\2\2LJ\3\2\2\2MQ\5\"\22\2NP\5\16\b\2ON\3\2\2\2PS\3"+
- "\2\2\2QO\3\2\2\2QR\3\2\2\2R\r\3\2\2\2SQ\3\2\2\2TU\5\22\n\2U\17\3\2\2\2"+
- "V[\5\"\22\2W[\5 \21\2X[\7a\2\2Y[\7b\2\2ZV\3\2\2\2ZW\3\2\2\2ZX\3\2\2\2"+
- "ZY\3\2\2\2[\\\3\2\2\2\\]\7\4\2\2]^\5\22\n\2^\21\3\2\2\2_d\5\24\13\2`a"+
- "\t\2\2\2ac\5\24\13\2b`\3\2\2\2cf\3\2\2\2db\3\2\2\2de\3\2\2\2e\23\3\2\2"+
- "\2fd\3\2\2\2gl\5\26\f\2hi\t\3\2\2ik\5\26\f\2jh\3\2\2\2kn\3\2\2\2lj\3\2"+
- "\2\2lm\3\2\2\2m\25\3\2\2\2nl\3\2\2\2oz\5 \21\2pz\7a\2\2qz\7b\2\2rz\5\30"+
- "\r\2sz\7j\2\2tz\7l\2\2uz\7k\2\2vz\7i\2\2wx\7d\2\2xz\5\26\f\2yo\3\2\2\2"+
- "yp\3\2\2\2yq\3\2\2\2yr\3\2\2\2ys\3\2\2\2yt\3\2\2\2yu\3\2\2\2yv\3\2\2\2"+
- "yw\3\2\2\2z\27\3\2\2\2{\177\7m\2\2|~\7i\2\2}|\3\2\2\2~\u0081\3\2\2\2\177"+
- "}\3\2\2\2\177\u0080\3\2\2\2\u0080\u0083\3\2\2\2\u0081\177\3\2\2\2\u0082"+
- "\u0084\7\5\2\2\u0083\u0082\3\2\2\2\u0083\u0084\3\2\2\2\u0084\31\3\2\2"+
- "\2\u0085\u0086\7o\2\2\u0086\33\3\2\2\2\u0087\u0088\7n\2\2\u0088\35\3\2"+
- "\2\2\u0089\u008a\7g\2\2\u008a\37\3\2\2\2\u008b\u008c\7h\2\2\u008c!\3\2"+
- "\2\2\u008d\u008e\t\4\2\2\u008e#\3\2\2\2\21\'*/\62'=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
diff --git a/pdp7parse/src/main/java/pdp7Lexer.tokens b/pdp7parse/src/main/java/pdp7Lexer.tokens
deleted file mode 100644
index ff4ed2b..0000000
--- a/pdp7parse/src/main/java/pdp7Lexer.tokens
+++ /dev/null
@@ -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
diff --git a/pdp7parse/src/test/java/com/khubla/pdp7parse/BasicTests.java b/pdp7parse/src/test/java/com/khubla/pdp7parse/BasicTests.java
deleted file mode 100644
index d04b0aa..0000000
--- a/pdp7parse/src/test/java/com/khubla/pdp7parse/BasicTests.java
+++ /dev/null
@@ -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 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();
- }
- }
-}
diff --git a/pdp7parse/src/test/resources/adm.s b/pdp7parse/src/test/resources/adm.s
deleted file mode 100644
index f747395..0000000
--- a/pdp7parse/src/test/resources/adm.s
+++ /dev/null
@@ -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;;;;012
-m2s = .-m1
-m2:
- ;;;;;;;;;;040;;040;;;;;;;;;;;;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;;;;012
-m1s = .-m1
-m2:
- ;;;;;;;;;;040;;040;;;;;;;;;;;;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;; 040; ;;;;;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
\ No newline at end of file
diff --git a/pdp7parse/src/test/resources/ds.s b/pdp7parse/src/test/resources/ds.s
deleted file mode 100644
index 2aa0f93..0000000
--- a/pdp7parse/src/test/resources/ds.s
+++ /dev/null
@@ -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:
- ; 040040; 040040; 040040
-dotdot:
- 056056; 040040; 040040; 040040
-system:
- ;;; 040040
-scrname:
- <*s>;;040040;040040
-pass2:
- [scan markup]
- jmp advanc
-1:
- ; ; 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
\ No newline at end of file
diff --git a/pdp7parse/src/test/resources/ed2.s b/pdp7parse/src/test/resources/ed2.s
deleted file mode 100644
index 3345e98..0000000
--- a/pdp7parse/src/test/resources/ed2.s
+++ /dev/null
@@ -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
diff --git a/pdp7parse/src/test/resources/init.s b/pdp7parse/src/test/resources/init.s
deleted file mode 100644
index 69284d4..0000000
--- a/pdp7parse/src/test/resources/init.s
+++ /dev/null
@@ -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; ;;;;;;<: 040
-m3s = .-m3
-dd:
- ;040040;040040;040040
-dir:
- 040040;040040;040040;040040
-
-ttyin:
- ;;;;; 040040
-keybd:
- ;;;
-displ:
- ;;;; 040040;040040;040040
-system:
- ;;; 040040
-password:
- ;;;
-
-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
diff --git a/pdp7parse/src/test/resources/s1.s b/pdp7parse/src/test/resources/s1.s
deleted file mode 100644
index 8dcf364..0000000
--- a/pdp7parse/src/test/resources/s1.s
+++ /dev/null
@@ -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
-
diff --git a/pdp7parse/src/test/resources/s2.s b/pdp7parse/src/test/resources/s2.s
deleted file mode 100644
index 3424c44..0000000
--- a/pdp7parse/src/test/resources/s2.s
+++ /dev/null
@@ -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
diff --git a/pdp7parse/src/test/resources/s3.s b/pdp7parse/src/test/resources/s3.s
deleted file mode 100644
index c0ca18d..0000000
--- a/pdp7parse/src/test/resources/s3.s
+++ /dev/null
@@ -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
diff --git a/pdp7parse/src/test/resources/s5.s b/pdp7parse/src/test/resources/s5.s
deleted file mode 100644
index 6c89ab9..0000000
--- a/pdp7parse/src/test/resources/s5.s
+++ /dev/null
@@ -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
-
diff --git a/pdp7parse/src/test/resources/s6.s b/pdp7parse/src/test/resources/s6.s
deleted file mode 100644
index 0072349..0000000
--- a/pdp7parse/src/test/resources/s6.s
+++ /dev/null
@@ -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
diff --git a/pdp7parse/src/test/resources/s8.s b/pdp7parse/src/test/resources/s8.s
deleted file mode 100644
index 7a60623..0000000
--- a/pdp7parse/src/test/resources/s8.s
+++ /dev/null
@@ -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:
- n;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
-
diff --git a/pdp7parse/src/test/resources/s9.s b/pdp7parse/src/test/resources/s9.s
deleted file mode 100644
index 044350a..0000000
--- a/pdp7parse/src/test/resources/s9.s
+++ /dev/null
@@ -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
diff --git a/pdp7parse/src/test/resources/sop.s b/pdp7parse/src/test/resources/sop.s
deleted file mode 100644
index 047a1ba..0000000
--- a/pdp7parse/src/test/resources/sop.s
+++ /dev/null
@@ -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
diff --git a/pdp7parse/src/test/resources/sysmap b/pdp7parse/src/test/resources/sysmap
deleted file mode 100644
index 07bd2e5..0000000
--- a/pdp7parse/src/test/resources/sysmap
+++ /dev/null
@@ -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
| |