private void InitMachine(IZmachineInputOutput io) { setProgramCounter(); for (int i = 0; i < 128; ++i) { callStack[i] = new RoutineCallState(); } objectTable = new ObjectTable(memory); lex = new Lex(memory, io); }
public Memory(int size, IZmachineInputOutput io) { // Class constructor memory = new byte[size]; _io = io; }
uint mp = 0; // Memory Pointer public Lex(Memory mem, IZmachineInputOutput io) { memory = mem; dictionaryAddress = memory.getWord(Memory.ADDR_DICT); _io = io; }
private void InitMemory(IZmachineInputOutput io) { _io = io; memory = new Memory(1024 * 128, io); // Initialize memory stack = new Memory(1024 * 32, io); // Stack of size 32768 (can be larger, but this should be fine) }
public Machine(byte[] bytes, IZmachineInputOutput io) { InitMemory(io); memory.load(bytes); InitMachine(io); }
// Class constructor : Loads in data from file and sets Program Counter public Machine(string filename, IZmachineInputOutput io) { InitMemory(io); memory.load(filename); InitMachine(io); }