Jump to content
IGNORED

clear keyboard buffer in GFA BASIC


the elk

Recommended Posts

Hey all, I'm sorry if this has been answered elsewhere but I'm a bit stumped:

 

I'm using a simple inkey$ to jump out of DO LOOP which has the user press the <spacebar> when they are ready to move on and it works nicely, except for the fact I can't find a way to clear the keyboard buffer? If the user has stabbed away the keys earlier on then it whizzes through the stops quick-fast O_0.

 

Back in BBC BASIC it was a *FX command to clear various buffers, including the keyboard, but I can't find a way in GFA? I've tried the CLEAR command, which didn't seem to do what I needed.

 

Any ideas?

Link to comment
Share on other sites

5 hours ago, ggn said:

From the GFA Basic manual:

 


    LPOKE XBIOS(14,1)+6,0

--> Sets the head and tail pointers to the keyboard buffer to the buffer start,
    effectively erasing the buffer.

or alternately:

    REPEAT
    UNTIL INKEY$=""

--> Deletes the keyboard buffer, character by character.

 

Hope this helps!

That is most excellent; thank you!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...