public GcMachine() { userStack = new Varible[stackSize]; systemStack = new int[stackSize]; userStackTop = 0; systemStackTop = 0; userStackBase = 0; code = new Instruction[codeSize]; globalMap = new Dictionary <string, Varible>(); stringMap = new List <string>(); locals = new Dictionary <string, List <string> >(); wantPause = false; flags = MachineFlags.MACHINE_FLAGS_NONE; breakpointList = new Dictionary <int, bool>(); functionTable = new SortedDictionary <int, string>(); inSystemFunction = null; lineCode = new int[maxLines]; executeEvent = new System.Threading.EventWaitHandle(false, System.Threading.EventResetMode.ManualReset); for (int i = 0; i < maxLines; ++i) { lineCode[i] = -1; } status = MachineStatus.MACHINE_STATUS_PAUSED; compileComplete = false; }
public void Reset() { _current = 0; _flags = MachineFlags.Clear; AX = null; BX = null; DX = null; BBX = false; Stack.Clear(); }
public void StepOver() { stepOutStackFrame = systemStackTop; if (pc == 0) { flags = MachineFlags.MACHINE_FLAGS_STEP_IN; } else { flags = MachineFlags.MACHINE_FLAGS_STEP_OVER; } _execute(); }
public Machine() { userStack = new Varible[stackSize]; systemStack = new int[stackSize]; userStackTop = 0; systemStackTop = 0; userStackBase = 0; code = new Instruction[codeSize]; globalMap = new Dictionary <string, Varible>(); stringMap = new List <string>(); locals = new Dictionary <string, List <string> >(); wantPause = false; flags = MachineFlags.MACHINE_FLAGS_NONE; breakpointList = new Dictionary <int, bool>(); functionTable = new SortedDictionary <int, string>(); lineCode = new int[maxLines]; for (int i = 0; i < maxLines; ++i) { lineCode[i] = -1; } status = MachineStatus.MACHINE_STATUS_PAUSED; compileComplete = false; }
public void Execute() { flags = MachineFlags.MACHINE_FLAGS_NONE; _execute(); }
public void StepOut() { stepOutStackFrame = systemStackTop; flags = MachineFlags.MACHINE_FLAGS_STEP_OUT; _execute(); }
public void ClearFlag(MachineFlags flag) { _flags ^= flag; }
public void SetFlag(MachineFlags flag) { _flags |= flag; }
public bool Test(MachineFlags flag) { return((_flags & flag) == flag); }