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); }
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); }
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 }