Esempio n. 1
0
        public override void Invoke(AsmCommand cmd, VirtualMachine vm)
        {
            var in_addr = (int)cmd[0];
            var in_reg  = (Registers)(int)cmd[1];

            PortMappedDeviceManager.Read(in_addr, in_reg, vm);
        }
Esempio n. 2
0
        public override void Invoke(AsmCommand cmd, VirtualMachine vm)
        {
            var out_addr  = (int)cmd[0];
            var out_value = (int)cmd[1];

            PortMappedDeviceManager.Write(out_addr, out_value, vm);
        }
Esempio n. 3
0
        public VirtualMachine(Assembly file)
        {
            Assembly = file;
            Register = new RegisterCollection(this);
            Stack    = new Stack();

            ScanInstructions();
            PortMappedDeviceManager.ScanDevices();
            InterruptTable.ScanHandlers();

            ErrorTable.Add(0x1, "The Register is protected"); //ToDo: add ErrorAttribute to Instructions
        }