OSDev.org https://forum.osdev.org/ |
|
Machine restarting when placing command 0xF4 on PS2 controll https://forum.osdev.org/viewtopic.php?f=1&t=47489 |
Page 1 of 1 |
Author: | Patrick367 [ Tue Jul 27, 2021 6:50 pm ] |
Post subject: | Machine restarting when placing command 0xF4 on PS2 controll |
I'm trying out the idea of creating a keyboard driver, but I have a problem: Code: [bits 16] [org 0x500] jmp StartKeyboard StartKeyboard: mov al, 0xf4 mov dx, 0x64 out dx, al mov ah, 0x0E mov al, "P" int 10h ret This is the code, I'm sure it arrives on this label because I printed a letter as soon as I got to StartKeyboard (More was just for testing) the problem is that when I run this code on qemu it keeps restarting all the time but if I put the 0xED command in al, it works normal, I wanted to know why this is |
Author: | Octocontrabass [ Wed Jul 28, 2021 9:09 am ] |
Post subject: | Re: Machine restarting when placing command 0xF4 on PS2 cont |
You're sending command 0xF4 to the keyboard controller, not the keyboard. Command 0xF4 is one of several commands that tells the keyboard controller to reset the CPU. |
Author: | Patrick367 [ Wed Jul 28, 2021 3:07 pm ] |
Post subject: | Re: Machine restarting when placing command 0xF4 on PS2 cont |
Octocontrabass wrote: You're sending command 0xF4 to the keyboard controller, not the keyboard. Command 0xF4 is one of several commands that tells the keyboard controller to reset the CPU. And how would I send this command to the keyboard?, do I need this command to receive keyboard data? |
Author: | Octocontrabass [ Wed Jul 28, 2021 3:28 pm ] |
Post subject: | Re: Machine restarting when placing command 0xF4 on PS2 cont |
Patrick367 wrote: And how would I send this command to the keyboard? Assuming the keyboard is plugged into the first PS/2 port, all you need to do is write it to port 0x60. Patrick367 wrote: do I need this command to receive keyboard data? If you want to properly initialize the keyboard controller, you'll send several different commands to the keyboard. But you can't properly initialize the keyboard controller until after you initialize USB, so I wouldn't bother right now. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |