Beispiel #1
0
 public void exec() {
   UnsignedNumber pc = cpu.getReg(Reg.PC);
   UnsignedNumber op = extended();
   UnsignedNumber sp = cpu.getReg(Reg.SP);
   sp.sub(2);
   mem.write(sp, pc);
   pc.setVal((op).getVal());
 }
Beispiel #2
0
 @Override
 public int compareTo(UnsignedNumber other) {
   int otherValue = other.intValue();
   if (value > otherValue) {
     return 1;
   } else if (value < otherValue) {
     return -1;
   }
   return 0;
 }