Pretty much the title, I got my interrupts working about two weeks ago, but I have a bug I've tried everything to fix, and now I'm giving up and asking the internet. My keyboard ISR is meant to print the PS/2 scancode to the VGA text buffer, but they stop working after a few seconds of going fine. It does work fine for the first couple of seconds, so I don't think I've done a silly basic thing like not setting up the IDT, PIC, sending EOI's, or never reading the scancode port (0x60).
Solved:
I did do a silly thing, I forgot to add a ret at the end of some ASM functions.
Shot @Octocontrabass
Solved - Keyboard Interrupts stop working after a few seconds
-
DontYellAtMe
- Posts: 2
- Joined: Tue Jun 23, 2026 4:54 pm
- Libera.chat IRC: GuysImNotAProfessionalDontYellAtMe
Solved - Keyboard Interrupts stop working after a few seconds
Last edited by DontYellAtMe on Wed Jun 24, 2026 8:25 pm, edited 1 time in total.
-
Octocontrabass
- Member

- Posts: 6275
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Bug - Keyboard Interrupts stop working after a few seconds
Does forgetting the RET instruction at the end of some assembly functions count as a silly basic thing?DontYellAtMe wrote: ↑Tue Jun 23, 2026 11:39 pmI don't think I've done a silly basic thing like not setting up the IDT, PIC, sending EOI's, or never reading the scancode port (0x60).
That can happen in virtual machines or when the PS/2 controller is emulated in SMM.DontYellAtMe wrote: ↑Tue Jun 23, 2026 11:39 pmIs it normal for IRQ1 to occasionally have multiple bytes waiting in the PS/2 controller output buffer,
Probably not. The PS/2 controller raises one IRQ per byte, so this could cause weird timing issues with the interrupt controller that result in lost or spurious IRQs.DontYellAtMe wrote: ↑Tue Jun 23, 2026 11:39 pmand should I be trying to read this in a while loop as described below?
-
DontYellAtMe
- Posts: 2
- Joined: Tue Jun 23, 2026 4:54 pm
- Libera.chat IRC: GuysImNotAProfessionalDontYellAtMe
Re: Bug - Keyboard Interrupts stop working after a few seconds
I may have done one silly thing then.Octocontrabass wrote: ↑Wed Jun 24, 2026 7:57 pm Does forgetting the RET instruction at the end of some assembly functions count as a silly basic thing?
Thank you so much, I've scanned that for days and days, put the code through every AI you can think of, and you've fixed it straight away
Your a G