public void Reset() { // If the driver is enabled if (enabled) { // Wait for the Input Buffer Full flag to clear byte StatusRegValue = 0x02; while ((StatusRegValue & 0x02) != 0) { StatusRegValue = CommandPort.Read_Byte(); } // Send the command | options // (0xF0 | 0x0E - pulse only line 0 - CPU reset line) CommandPort.Write_Byte(0xFE); } }
/// <summary> /// The internal interrupt handler. /// </summary> public void InterruptHandler() { byte scancode = DataPort.Read_Byte(); HandleScancode(scancode); }
/// <summary> /// Enables the PC speaker sound. /// </summary> public void EnableSound() { //OR with 0x03 to enable sound SpeakerPort.Write_Byte((byte)(SpeakerPort.Read_Byte() | 0x03)); }