Uses of Class
edu.iu.jrsalata.HexNum

  • Uses of HexNum in edu.iu.jrsalata

    Fields in edu.iu.jrsalata declared as HexNum
    Modifier and Type
    Field
    Description
    protected HexNum
    BaseStatement.location
    stores the location of this statement
    protected HexNum
    BaseStatement.opcode
    stores the operation code of this statement
    protected HexNum
    Statement.size
    size represents how many bytes long the statement is
    Fields in edu.iu.jrsalata with type parameters of type HexNum
    Modifier and Type
    Field
    Description
    protected final HashMap<String,HexNum>
    AbstractStatementBuilder.instructionTable
    instructionTable is a map that holds each of the assembler instructions
    protected final HashMap<String,HexNum>
    AbstractStatementBuilder.locctrTable
    locctrTable holds the location counter of each program block
    protected final HashMap<String,HexNum>
    AbstractStatementBuilder.registerTable
    registerTable is a map that holds each valid register
    protected final LinkedHashMap<String,HexNum>
    AbstractStatementBuilder.startTable
    startTable handles the starting location of each program block Note that we are making startTable a LinkedHashMap this is so that we can maintain the order of each program block which is needed for calculating the relative start locations of each block
    Methods in edu.iu.jrsalata that return HexNum
    Modifier and Type
    Method
    Description
    HexNum.add(int value)
    Adds the specified integer value to the current value.
    HexNum.add(HexNum value)
    Adds the given HexNum value to this HexNum and returns the result as a new HexNum.
    BaseStatement.getLocation()
    Retrieves the location of this statement.
    AbstractStatementBuilder.getLocctr()
    Retrieves the location counter (LOCCTR) for the current block.
    AbstractStatementBuilder.getLocctr(String block)
    Retrieves the location counter (LOCCTR) for the specified block.
    ExtendedStatement.getSize()
    Returns the size of the statement.
    Statement.getSize()
    Returns the size of the statement as a HexNum.
    AbstractStatementBuilder.getStart()
    Retrieves the starting address as a HexNum for the default starting block
    AbstractStatementBuilder.getStart(String block)
    Retrieves the starting HexNum for the specified block.
    static HexNum
    SymTable.getSymbol(String symbol, String controlSection)
    Retrieves the HexNum associated with the given symbol in the specified control section.
    AbstractStatementBuilder.getTotalLength()
    Calculates the total length of all program blocks by summing up the location counters of each block in the start table.
    protected HexNum
    AbstractStatementBuilder.handleExpression(String label, String args)
    Handles the evaluation of an expression, replacing symbols with their decimal values, and determining if the expression is absolute or relative.
    HexNum.subtract(int value)
    Subtracts a given integer value from the current hexadecimal value.
    HexNum.subtract(HexNum value)
    Subtracts the given HexNum value from this HexNum and returns the result as a new HexNum.
    Methods in edu.iu.jrsalata with parameters of type HexNum
    Modifier and Type
    Method
    Description
    HexNum.add(HexNum value)
    Adds the given HexNum value to this HexNum and returns the result as a new HexNum.
    protected void
    AbstractStatementBuilder.addLocctr(HexNum locctr)
    Adds a given value to the location counter (locctr) of the current block.
    protected void
    AbstractStatementBuilder.addLocctr(String block, HexNum locctr)
    Adds the specified location counter (locctr) value to the current location counter for the given block in the locctrTable.
    static void
    SymTable.addSymbol(String symbol, HexNum location, String block, String controlSection)
    Adds a symbol to the symbol table with the specified location, block, and control section.
    void
    BaseStatement.setLocation(HexNum location)
    Sets the location of this BaseStatement.
    void
    RegisterStatement.setOpcode(HexNum opcode)
    Sets the opcode for this RegisterStatement.
    void
    RegisterStatement.setReg1(HexNum reg1)
    Sets the value of the first register.
    void
    RegisterStatement.setReg2(HexNum reg2)
    Sets the value of the second register.
    void
    DirectiveStatement.setSize(HexNum size)
    Sets the size of the directive statement.
    protected void
    AbstractStatementBuilder.setStart(String block, HexNum start)
    Sets the starting address for a given block in the start table.
    HexNum.subtract(HexNum value)
    Subtracts the given HexNum value from this HexNum and returns the result as a new HexNum.
    Constructors in edu.iu.jrsalata with parameters of type HexNum
    Modifier
    Constructor
    Description
    protected
    BaseStatement(HexNum location, HexNum opcode)
    Constructs a BaseStatement with the specified location and opcode.
     
    DirectiveStatement(HexNum size, String directive)
    Constructs a DirectiveStatement with the specified size and directive.
     
    ExtendedStatement(HexNum location, HexNum opcode, String args)
    Constructs an ExtendedStatement with the specified location, opcode, and arguments.
     
    RegisterStatement(HexNum location, HexNum opcode, HexNum reg1)
    Constructs a RegisterStatement with the specified location, opcode, and register 1.
     
    RegisterStatement(HexNum location, HexNum opcode, HexNum reg1, HexNum reg2)
    Constructs a RegisterStatement with the specified location, opcode, and registers.
     
    SicStatement(HexNum location, HexNum opcode, String args)
    Constructs a SicStatement object with the specified location, opcode, and arguments.
     
    SingleStatement(HexNum location, HexNum opcode)
    Constructs a SingleStatement object with the specified location and opcode.
    protected
    Constructs a new Statement with the specified size.
    protected
    Statement(HexNum size, String block)
    Constructs a new Statement with the specified size and block.