Class Registers

java.lang.Object
  extended by Registers
All Implemented Interfaces:
java.lang.Cloneable

public final class Registers
extends java.lang.Object
implements java.lang.Cloneable

This class stores the feralcore registers that include MC68000 registers. Most of the internal data types are Reg32, which is immutable. So for those, defensive copying is not needed.


Constructor Summary
Registers()
           
Registers(Registers robj)
           
 
Method Summary
 void add2A(int i)
           
 void add4A(int i)
           
 void addA(int i, int x)
           
 void addA(int i, Reg32 u32)
           
 void clear()
           
 Registers clone()
          Factory method that returns a copy of this.
 void decrementA(int i)
           
static Registersdres deserialize(ByteArray in)
           
 boolean equals(java.lang.Object o)
          Testing equality when Object o is of type IRegisters results in false.
 void generaterandomregistersstate(YYrandom yyrandomobj)
           
 Reg32 getA(int i)
           
 java.math.BigInteger getaccum1()
           
 java.math.BigInteger getaccum2()
           
 java.math.BigInteger getaccum3()
           
 ByteArray getB()
           
 boolean getC()
           
 Reg32 getD(int i)
           
 boolean getN()
           
 Reg32 getPC()
           
 java.math.BigInteger getregA1()
           
 java.math.BigInteger getregA2()
           
 java.math.BigInteger getregB1()
           
 java.math.BigInteger getregB2()
           
 java.math.BigInteger getregK()
           
 byte getrrandstate()
           
 boolean getV()
           
 boolean getX()
           
 boolean getZ()
           
 java.math.BigInteger getzeros1()
           
 java.math.BigInteger getzeros2()
           
 java.math.BigInteger getzeros3()
           
 int hashCode()
           
 void importLSByteA(int i, Reg8 in)
           
 void importLSByteD(int i, Reg8 in)
           
 void importLSWordA(int i, Reg16 in)
           
 void importLSWordD(int i, Reg16 in)
           
 void importvalD(int i, Reg16 a, Reg16 b)
           
 void incrementA(int i)
           
 void lshift1D(int i)
           
static void main()
           
 void orD(int i, Reg32 u32)
           
 void pcadd(int x)
           
 void pcadd2()
           
 void pcadd4()
           
 void printentireregistersobj()
           
 void rshift1D(int i)
           
 ByteArray serialize()
           
static int serializedlength()
           
 void setA(int i, Reg32 in)
           
 void setaccum1(java.math.BigInteger in)
           
 void setaccum2(java.math.BigInteger in)
           
 void setaccum3(java.math.BigInteger in)
           
 void setB(ByteArray in)
           
 void setbitD(int i, int biti, boolean b)
           
 void setC(boolean in)
           
 void setD(int i, Reg32 in)
           
 void setN(boolean in)
           
 void setPC(Reg32 in)
           
 void setregA1(java.math.BigInteger in)
           
 void setregA2(java.math.BigInteger in)
           
 void setregB1(java.math.BigInteger in)
           
 void setregB2(java.math.BigInteger in)
           
 void setregK(java.math.BigInteger in)
           
 void setrrandstate(byte in)
           
 void setV(boolean in)
           
 void setX(boolean in)
           
 void setZ(boolean in)
           
 void setzeros1(java.math.BigInteger in)
           
 void setzeros2(java.math.BigInteger in)
           
 void setzeros3(java.math.BigInteger in)
           
 void sub2A(int i)
           
 void sub4A(int i)
           
 void subtractA(int i, int x)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registers

public Registers()

Registers

public Registers(Registers robj)
Method Detail

clone

public Registers clone()
                throws java.lang.CloneNotSupportedException
Factory method that returns a copy of this.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

setB

public void setB(ByteArray in)

getB

public ByteArray getB()

setX

public void setX(boolean in)

setN

public void setN(boolean in)

setZ

public void setZ(boolean in)

setV

public void setV(boolean in)

setC

public void setC(boolean in)

getX

public boolean getX()

getN

public boolean getN()

getZ

public boolean getZ()

getV

public boolean getV()

getC

public boolean getC()

getrrandstate

public byte getrrandstate()

setrrandstate

public void setrrandstate(byte in)

setregK

public void setregK(java.math.BigInteger in)

setzeros1

public void setzeros1(java.math.BigInteger in)

setzeros2

public void setzeros2(java.math.BigInteger in)

setzeros3

public void setzeros3(java.math.BigInteger in)

setaccum1

public void setaccum1(java.math.BigInteger in)

setaccum2

public void setaccum2(java.math.BigInteger in)

setaccum3

public void setaccum3(java.math.BigInteger in)

setregA1

public void setregA1(java.math.BigInteger in)

setregB1

public void setregB1(java.math.BigInteger in)

setregA2

public void setregA2(java.math.BigInteger in)

setregB2

public void setregB2(java.math.BigInteger in)

getregK

public java.math.BigInteger getregK()

getaccum1

public java.math.BigInteger getaccum1()

getaccum2

public java.math.BigInteger getaccum2()

getaccum3

public java.math.BigInteger getaccum3()

getzeros1

public java.math.BigInteger getzeros1()

getzeros2

public java.math.BigInteger getzeros2()

getzeros3

public java.math.BigInteger getzeros3()

getregA1

public java.math.BigInteger getregA1()

getregB1

public java.math.BigInteger getregB1()

getregA2

public java.math.BigInteger getregA2()

getregB2

public java.math.BigInteger getregB2()

setD

public void setD(int i,
                 Reg32 in)

setbitD

public void setbitD(int i,
                    int biti,
                    boolean b)

importvalD

public void importvalD(int i,
                       Reg16 a,
                       Reg16 b)

getD

public Reg32 getD(int i)

setA

public void setA(int i,
                 Reg32 in)

incrementA

public void incrementA(int i)

decrementA

public void decrementA(int i)

sub2A

public void sub2A(int i)

sub4A

public void sub4A(int i)

add2A

public void add2A(int i)

add4A

public void add4A(int i)

lshift1D

public void lshift1D(int i)

rshift1D

public void rshift1D(int i)

importLSByteA

public void importLSByteA(int i,
                          Reg8 in)

importLSWordA

public void importLSWordA(int i,
                          Reg16 in)

importLSByteD

public void importLSByteD(int i,
                          Reg8 in)

importLSWordD

public void importLSWordD(int i,
                          Reg16 in)

getA

public Reg32 getA(int i)

subtractA

public void subtractA(int i,
                      int x)

addA

public void addA(int i,
                 int x)

addA

public void addA(int i,
                 Reg32 u32)

orD

public void orD(int i,
                Reg32 u32)

getPC

public Reg32 getPC()

setPC

public void setPC(Reg32 in)

pcadd

public void pcadd(int x)

pcadd2

public void pcadd2()

pcadd4

public void pcadd4()

clear

public void clear()

serializedlength

public static int serializedlength()

serialize

public ByteArray serialize()

deserialize

public static Registersdres deserialize(ByteArray in)
                                 throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

generaterandomregistersstate

public void generaterandomregistersstate(YYrandom yyrandomobj)
                                  throws FeralcoreException,
                                         java.io.FileNotFoundException,
                                         java.io.IOException
Throws:
FeralcoreException
java.io.FileNotFoundException
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Testing equality when Object o is of type IRegisters results in false.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

printentireregistersobj

public void printentireregistersobj()

main

public static void main()
                 throws FeralcoreException,
                        java.security.NoSuchAlgorithmException,
                        java.io.FileNotFoundException,
                        java.io.IOException,
                        java.lang.InterruptedException,
                        java.lang.CloneNotSupportedException
Throws:
FeralcoreException
java.security.NoSuchAlgorithmException
java.io.FileNotFoundException
java.io.IOException
java.lang.InterruptedException
java.lang.CloneNotSupportedException