Beispiel #1
0
 public void Execute()
 {
     while (true)
     {
         byte opcode = GetNextByte();
         if (opcode == 0x00)
         {
             break;                 // brk, temp
         }
         CpuInstruction instruction = _opcodeActions[opcode];
         if (instruction != null)
         {
             instruction.Action();
         }
         else
         {
             throw new UnsupportedOpcodeException(opcode);
         }
     }
 }
 public abstract void Register(CpuInstruction[] opcodeHandlers);