T
T
Type Programmer2018-07-06 19:31:11
assembler
Type Programmer, 2018-07-06 19:31:11

The keyboard buffer is clogged, what to do?

There is a simple game where clicks are processed only if they are

mov ah,01h
int 16h
jz p0
mov ah,0
int 16h
p0:

So, next goes the code that makes the delay, otherwise the game flies at breakneck speed
mov ah,0
int 1Ah
mov [wait_commets],dx 
pcomm1:
mov ah,00h
int 1Ah    
cmp dx,[wait_commets]
jz pcomm1

And then all the trouble because of the delay, the keyboard buffer manages to clog up, the speaker starts to squeak, if it is not completely clogged, then all pressings are processed with a delay.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-07-06
@MegaCraZy6

a game where clicks are processed only if there are any ...
due to the delay, the keyboard buffer has time to clog

What prevents inserting the code for polling and reading the keyboard inside the delay loop?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question