|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--asm.AsmFile
Represents a file of assembly code. Basically contains a list of instructions, and some tables that are used to generate the object file (a Module).
AsmIns
,
Module
Field Summary | |
(package private) java.util.Map |
dataMap
Maps data label -> data item. |
(package private) java.util.ArrayList |
instructions
|
(package private) java.util.Map |
labelMap
Maps instruction label -> integer (instruction index) |
(package private) java.util.Map |
refMap
Maps symbol -> List[integer] (instruction indeces) |
(package private) java.lang.String |
refTabString
A string representation of the reference table. |
(package private) java.lang.String |
symTabString
A string representation of the symbol table. |
Constructor Summary | |
AsmFile()
|
Method Summary | |
void |
add(AsmIns i)
Add an assembly instruction. |
void |
addData(java.lang.String label,
AsmData data)
Add a data item with this label |
void |
addLabel(java.lang.String label)
Add a label for the current location. |
void |
asm(java.io.DataOutputStream w,
boolean bare,
boolean opt)
Assemble the file. |
void |
buildRefMap()
Build a reference table. |
void |
dumpData(java.io.DataOutputStream w)
Dump the data segment. |
void |
dumpText(java.io.DataOutputStream w)
Dump the text segment. |
int |
getDataSize()
Right now just tallies up the size of the strings (padded). |
void |
optimize()
|
void |
print()
Print the contents of the file. |
void |
printData()
Dump the data to standard output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.util.ArrayList instructions
java.util.Map labelMap
java.util.Map dataMap
java.util.Map refMap
java.lang.String symTabString
java.lang.String refTabString
Constructor Detail |
public AsmFile()
Method Detail |
public void addData(java.lang.String label, AsmData data)
public void printData()
public void add(AsmIns i)
public void addLabel(java.lang.String label)
public void print()
public int getDataSize()
public void asm(java.io.DataOutputStream w, boolean bare, boolean opt) throws java.io.IOException
java.io.IOException
public void optimize()
public void dumpData(java.io.DataOutputStream w) throws java.io.IOException
java.io.IOException
public void dumpText(java.io.DataOutputStream w) throws java.io.IOException
java.io.IOException
public void buildRefMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |