Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public Memory(int size, IZmachineInputOutput io)
 {
     // Class constructor
     memory = new byte[size];
     _io    = io;
 }
Esempio n. 3
0
        uint mp = 0;                                 // Memory Pointer

        public Lex(Memory mem, IZmachineInputOutput io)
        {
            memory            = mem;
            dictionaryAddress = memory.getWord(Memory.ADDR_DICT);
            _io = io;
        }
Esempio n. 4
0
 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)
 }
Esempio n. 5
0
 public Machine(byte[] bytes, IZmachineInputOutput io)
 {
     InitMemory(io);
     memory.load(bytes);
     InitMachine(io);
 }
Esempio n. 6
0
 // Class constructor : Loads in data from file and sets Program Counter
 public Machine(string filename, IZmachineInputOutput io)
 {
     InitMemory(io);
     memory.load(filename);
     InitMachine(io);
 }