Package jminusminus

Class NRegister

java.lang.Object
jminusminus.NRegister
Direct Known Subclasses:
NPhysicalRegister, NVirtualRegister

abstract class NRegister extends Object
An abstract representation for a (physical and virtual) register.
  • Field Details

    • number

      protected int number
      Register number.
    • name

      protected String name
      Register name.
  • Constructor Details

    • NRegister

      protected NRegister(int number, String name)
      Constructs an NRegister.
      Parameters:
      number - register number.
      name - register name.
  • Method Details

    • number

      public int number()
      Returns the number of this register.
      Returns:
      the number of this register.
    • name

      public String name()
      Returns the name of this register.
      Returns:
      the name of this register.