|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttools.assembler.Assembler
public class Assembler
This application reads a text file (with includes) into a list of CodeLines and assembles the code lines to give them data and addresses. Many of the assembly steps are static methods that can be reused in other contexts.
| Constructor Summary | |
|---|---|
Assembler()
|
|
| Method Summary | |
|---|---|
static CodeLine |
assemble(java.util.List<CodeLine> codeLines,
java.util.Map<java.lang.String,java.lang.String> defines,
java.util.Map<java.lang.String,AddressSpec> addresses,
java.util.Set<java.lang.String> usedBlendLabels)
This function performs the assembly of the given code lines. |
static int[] |
extractBinary(java.util.List<CodeLine> codeLines,
int start,
int end)
|
static void |
main(java.lang.String[] args)
This tool assembles a text file into a binary file and produces an optional listing file. |
static void |
printListing(java.io.PrintStream ps,
java.util.List<CodeLine> codeLines,
java.util.Map<java.lang.String,java.lang.String> defines,
java.util.Map<java.lang.String,AddressSpec> addresses,
java.util.Set<java.lang.String> usedBlendLabels)
|
static java.util.List<CodeLine> |
readAssemblyText(java.lang.String name)
This function reads an assembly file (and includes) and parses it into CodeLines. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Assembler()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - the command line arguments
java.lang.Exception - if anything goes wrong
public static CodeLine assemble(java.util.List<CodeLine> codeLines,
java.util.Map<java.lang.String,java.lang.String> defines,
java.util.Map<java.lang.String,AddressSpec> addresses,
java.util.Set<java.lang.String> usedBlendLabels)
codeLines - the list of lines
public static java.util.List<CodeLine> readAssemblyText(java.lang.String name)
throws java.io.IOException
name - the name of the file
java.io.IOException - with file errors
public static int[] extractBinary(java.util.List<CodeLine> codeLines,
int start,
int end)
public static void printListing(java.io.PrintStream ps,
java.util.List<CodeLine> codeLines,
java.util.Map<java.lang.String,java.lang.String> defines,
java.util.Map<java.lang.String,AddressSpec> addresses,
java.util.Set<java.lang.String> usedBlendLabels)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||