com.monkeycoder.monkeynes.hardware
Class CpuRegister16
java.lang.Object
|
+--com.monkeycoder.monkeynes.hardware.CpuRegister
|
+--com.monkeycoder.monkeynes.hardware.CpuRegister16
- public class CpuRegister16
- extends CpuRegister
This class represents a 16-bit CPU register. This class was
created to better support the program counter (PC) register
which is 16-bits instead of the common 8-bits.
Originally part of the MonkeyNES project.
- Author:
- David Stephens
|
Constructor Summary |
CpuRegister16()
Creates a new CpuRegister16 set to 0. |
CpuRegister16(int inData)
Creates a new CpuRegister16 set to a specific value. |
|
Method Summary |
void |
cage()
This function sets all bits that are not supposed to be in use by a register of this size to 0. |
| Methods inherited from class com.monkeycoder.monkeynes.hardware.CpuRegister |
andEquals, decrement, getBitValue, getBooleanBitValue, getValue, increment, minusEquals, orEquals, plusEquals, setBitOff, setBitOn, setBitValue, setBitValue, setValue, toString, xorEquals |
CpuRegister16
public CpuRegister16()
- Creates a new CpuRegister16 set to 0.
CpuRegister16
public CpuRegister16(int inData)
- Creates a new CpuRegister16 set to a specific value.
- Parameters:
inData - The value to which the register will be set.
cage
public void cage()
- This function sets all bits that are not supposed to be in use by a register of this size to 0.
- Overrides:
cage in class CpuRegister