Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I also was clearing the keyboard buffer in my own entry, there were two methods. I just found something that if I call once per frame after the input read, it mostly works fine even if it might not be the complete solution.

My solution was some interupt call.  mov ax,0c00h and then int 21h

However I have some other I didn't use that looks similar to the qbasic solution like here  https://www.tek-tips.com/threads/how-do-you-clear-the-input-buffer.77806/

Maybe this one is the easiest to try DEF SEG = &H40: POKE &H1C, PEEK(&H1A): DEF SEG like maybe call it somewhere once in the frame loop after the input checks.
There are also more proper solutions but need more work. In my case I also should have read the input in a continuous loop till the buffer empties. But I just read once and then clear the buffer. Didn't notice issues with keyboard clashing regardless.


Did you btw have the problem yourself or do you run it in Dosbox and you didn't notice the issue?

I've spent a lot of time running the code via QBASIC 1.1 on multiple PCs (including an HP 100LX) and DOSBOX, but I never noticed the keyboard buffer filled up to beep and complain. Thanks for reporting this bug. Revision 4 will correct the issue.