mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 08:18:36 +03:00
Fixed instruction handlers and tests for Group1, Group3, and XOR instructions
This commit is contained in:
@ -127,9 +127,17 @@ public class InstructionDecoder
|
||||
// Get a handler for the opcode
|
||||
var handler = _handlerFactory.GetHandler(opcode);
|
||||
|
||||
if (handler == null || !handler.Decode(opcode, instruction))
|
||||
bool handlerSuccess = false;
|
||||
|
||||
// Try to decode with a handler first
|
||||
if (handler != null)
|
||||
{
|
||||
handlerSuccess = handler.Decode(opcode, instruction);
|
||||
}
|
||||
|
||||
// If no handler is found or decoding fails, create a default instruction
|
||||
if (!handlerSuccess)
|
||||
{
|
||||
// If no handler is found or decoding fails, create a default instruction
|
||||
instruction.Mnemonic = OpcodeMap.GetMnemonic(opcode);
|
||||
instruction.Operands = "??";
|
||||
}
|
||||
|
Reference in New Issue
Block a user