Esempio n. 1
0
File: CPU.cs Progetto: wiglz4/ARMsim
 //Method:       Decode
 //Purpose:      Decodes thisCommand into a specific instruction. Handles it as generic.
 //Variables:    thisCommand - uint containing undecoded command
 public bool Decode(uint thisCommand)
 {
     unDecodedInstruction = thisCommand;
     curInstruction = Instructions.decode(thisCommand, myRegisters, myMemory, disassembling);
     //making sure the opcode is valid
     if (curInstruction != null)
     {
         curInstruction.decode();
         //if its a software interruper return false
         if (curInstruction.instructionName == "swi")
         {
             disassembly = Instructions.disassembly;
             return false;
         }
     }
     return true;
 }