While executing a loop in my 8086 assembly programs, there is a keyboard key press threshold where if you press a key too many times the PC speaker will start beeping. It's obnoxious, and it slows down my programs to a crawl since the cpu has to jump away from my program and spend half a second driving the speaker.
I didn't even know this issue existed until I started testing my programs on actual hardware a few months ago. This problem isn't an issue in DosBox, or even in Dos 6.22 installed inside DosBox. So it must be some low level hardware interrupt built into the PC BIOS, I don't know too much about this stuff.
It occurs on my 286 machine, and my Pentium mmx laptop regardless of the operating system.
Even if it's just a dead loop, and i'm not even polling for keyboard input, the beep still happens if I press too many keys
I've tried wrapping just my input code inside cli & sti to hopefully mask my keyboard input from the system, but that doesn't really work. I collect a scancode only at a singular point in my program, so the rest of the time, interrupts are enabled. So the beeping can still occur the vast majority of the time.
There must be some hardware register that I can disable or something. I took a good long look through Boch's ports list (http://bochs.sourceforge.net/techspec/PORTS.LST) looking for something like that, but didn't see anything.
Maybe I could just turn the interrupt off? I imagine that a lot of assembly programmers must've encountered this problem, but Google really isn't helping me at all here.