Class InstructionSet
Maintains a mapping from operation codes (opcodes) to their corresponding executable instruction implementations. Acts as a registry and dispatcher for instruction behavior in the virtual machine.
Inherited Members
Namespace: VM.Core
Assembly: VM.dll
Syntax
public class InstructionSet
Constructors
InstructionSet()
Initializes the instruction set with default core VM instructions. Categorized by purpose: stack manipulation, arithmetic, logic, control flow, variables, arrays, I/O, and string operations.
Declaration
public InstructionSet()
Methods
GetInstruction(OpCode)
Retrieves the instruction implementation corresponding to the given opcode. Returns null if the opcode is not defined in this set.
Declaration
public Instruction? GetInstruction(OpCode opcode)
Parameters
Type | Name | Description |
---|---|---|
OpCode | opcode | The operation code to look up. |
Returns
Type | Description |
---|---|
Instruction | The associated Instruction or null if not found. |