tools.processor
Enum OpcodeParamField

java.lang.Object
  extended by java.lang.Enum<OpcodeParamField>
      extended by tools.processor.OpcodeParamField
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OpcodeParamField>

public enum OpcodeParamField
extends java.lang.Enum<OpcodeParamField>

This enum defines the parameter primitives that opcodes are built from. Don't think about mnemonics. This is purely binary opcode. For instance: DD36bbii the 'b' field is an immediate byte and the 'i' field is an index byte. 28tltm the 't' field is an address word pointing to code (text). The "tl" is the lsb and the "tm" is the msb. Parameter info: bytes number of opcode bytes taken by the parameter sub the lower-case letter representing the parameter signed true if the numeric value is signed (branch offsets, for instance) address true if the numeric value is an address and not a constant (a RAM address, for instance) pc-offset true if the numeric value is offset from the PC (branch offsets, for instance) io true if the numeric value is a port (IO) address


Enum Constant Summary
ADDRESS_WORD_DATA
           
ADDRESS_WORD_TEXT
           
BASE_ADDRESS_BYTE_DATA
           
IMMEDIATE_BYTE
           
IMMEDIATE_WORD
           
INDEX_BYTE
           
PORT_ADDRESS_BYTE
           
POST_6809
           
PULL_6809_S
           
PULL_6809_U
           
PUSH_6809_S
           
PUSH_6809_U
           
REG_6809_TFR
           
REL_BYTE_ADDRESS_TEXT
           
REL_WORD_ADDRESS_TEXT
           
SIGNED_INDEX_BYTE
           
SIGNED_INDEX_WORD
           
 
Method Summary
 int getNumBytes()
           
static OpcodeParamField getParamField(char tag)
          This static method returns the OpcodeParamField based on single-letter name.
 char getSubChar()
           
 boolean isAddress()
           
 boolean isIO()
           
 boolean isPCOffset()
           
 boolean isSigned()
           
static OpcodeParamField valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static OpcodeParamField[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INDEX_BYTE

public static final OpcodeParamField INDEX_BYTE

SIGNED_INDEX_BYTE

public static final OpcodeParamField SIGNED_INDEX_BYTE

SIGNED_INDEX_WORD

public static final OpcodeParamField SIGNED_INDEX_WORD

IMMEDIATE_BYTE

public static final OpcodeParamField IMMEDIATE_BYTE

IMMEDIATE_WORD

public static final OpcodeParamField IMMEDIATE_WORD

ADDRESS_WORD_DATA

public static final OpcodeParamField ADDRESS_WORD_DATA

BASE_ADDRESS_BYTE_DATA

public static final OpcodeParamField BASE_ADDRESS_BYTE_DATA

PORT_ADDRESS_BYTE

public static final OpcodeParamField PORT_ADDRESS_BYTE

ADDRESS_WORD_TEXT

public static final OpcodeParamField ADDRESS_WORD_TEXT

REL_BYTE_ADDRESS_TEXT

public static final OpcodeParamField REL_BYTE_ADDRESS_TEXT

REL_WORD_ADDRESS_TEXT

public static final OpcodeParamField REL_WORD_ADDRESS_TEXT

PUSH_6809_U

public static final OpcodeParamField PUSH_6809_U

PUSH_6809_S

public static final OpcodeParamField PUSH_6809_S

PULL_6809_U

public static final OpcodeParamField PULL_6809_U

PULL_6809_S

public static final OpcodeParamField PULL_6809_S

REG_6809_TFR

public static final OpcodeParamField REG_6809_TFR

POST_6809

public static final OpcodeParamField POST_6809
Method Detail

values

public static OpcodeParamField[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OpcodeParamField c : OpcodeParamField.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OpcodeParamField valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getParamField

public static OpcodeParamField getParamField(char tag)
This static method returns the OpcodeParamField based on single-letter name.

Parameters:
tag - the single letter name
Returns:
the OpcodeParamField that maps to the given letter

getNumBytes

public int getNumBytes()

getSubChar

public char getSubChar()

isAddress

public boolean isAddress()

isPCOffset

public boolean isPCOffset()

isIO

public boolean isIO()

isSigned

public boolean isSigned()