Ejemplo n.º 1
0
 /**
  * @brief Sets the PSR flags according to the state
  *        of this Number.
  * @param PSR - The PSR to be set.
  */
 public void SetPSR(ProcessStatusRegister PSR)
 {
     PSR.SetFlag(ProcessStatusRegister.FLAGS.ZERO, IsZero());
     PSR.SetFlag(ProcessStatusRegister.FLAGS.NEGATIVE, IsNegative());
     PSR.SetFlag(ProcessStatusRegister.FLAGS.OVERFLOW, IsOverflow());
     PSR.SetFlag(ProcessStatusRegister.FLAGS.CARRY, IsCarry());
 }
Ejemplo n.º 2
0
 /**
  * @brief Links all the component so they
  *        can be used in micro instructions.
  */
 public void LinkCPUcomponents(
     ProgramCounter PC, MemoryAddressRegister MAR,
     MemoryDataRegister MDR, InstructionRegister IR,
     GeneralPurposeRegisterA GPA, GeneralPurposeRegisterB GPB,
     ProcessStatusRegister PSR,
     MemoryListControl memory, ArithmeticLogicUnit ALU,
     Clock clock, BusControl busSystem)
 {
     this.PC        = PC;
     this.MAR       = MAR;
     this.MDR       = MDR;
     this.IR        = IR;
     this.GPA       = GPA;
     this.GPB       = GPB;
     this.PSR       = PSR;
     this.memory    = memory;
     this.ALU       = ALU;
     this.clock     = clock;
     this.busSystem = busSystem;
 }