Enum Class Format

java.lang.Object
java.lang.Enum<Format>
edu.iu.jrsalata.Format
All Implemented Interfaces:
Serializable, Comparable<Format>, Constable

public enum Format extends Enum<Format>
The Format enum represents the different formats in the SIC/XE instruction set
  • ONE - Format 1
  • TWO - Format 2
  • THREE - Format 3
  • ASM - Assembly format
  • SIC - Simplified Instructional Computer format
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Represents assembler directives
    Represents format 1 1 byte containing the opcode
    Represents SIC-only statements
    Represents format 3 and 4 3/4 bytes 6 bits for opcode 2 bits for addressing mode 1/2 byte for other flags 3/2 bytes for displacement +1 byte if format 4
    Represents format 2 2 bytes 1 byte containing the opcode 1/2 byte containing register 1 1/2 byte containing register 2
  • Method Summary

    Modifier and Type
    Method
    Description
    static Format
    Returns the enum constant of this class with the specified name.
    static Format[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ONE

      public static final Format ONE
      Represents format 1 1 byte containing the opcode
    • TWO

      public static final Format TWO
      Represents format 2 2 bytes 1 byte containing the opcode 1/2 byte containing register 1 1/2 byte containing register 2
    • THREE

      public static final Format THREE
      Represents format 3 and 4 3/4 bytes 6 bits for opcode 2 bits for addressing mode 1/2 byte for other flags 3/2 bytes for displacement +1 byte if format 4
    • ASM

      public static final Format ASM
      Represents assembler directives
    • SIC

      public static final Format SIC
      Represents SIC-only statements
  • Method Details

    • values

      public static Format[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Format valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null