Class Asm

java.lang.Object
  extended by Asm
Direct Known Subclasses:
Datum, Inst, Label

public abstract class Asm
extends java.lang.Object

Asm abstract class. Represents a generic unit in an assembly file such as an instruction or label. Asm is extended by Inst, Datum, and Label.


Field Summary
protected  int addr
          Address of assembly unit (note: labels do not have unique addresses, instructions and datum do have unique addresses).
protected  int lineNumber
          Line number of the assembly unit
 
Constructor Summary
Asm()
           
 
Method Summary
 int getAddr()
          Returns the assembly unit's address.
 int getLineNumber()
          Returns the assembly unit's line number.
 void setAddr(int a)
          Sets the assembly unit's address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineNumber

protected int lineNumber
Line number of the assembly unit


addr

protected int addr
Address of assembly unit (note: labels do not have unique addresses, instructions and datum do have unique addresses).

Constructor Detail

Asm

public Asm()
Method Detail

getLineNumber

public int getLineNumber()
Returns the assembly unit's line number.

Returns:
assembly unit's line number

getAddr

public int getAddr()
Returns the assembly unit's address.

Returns:
assembly unit's address

setAddr

public void setAddr(int a)
Sets the assembly unit's address.

Parameters:
a - address to set for assembly unit