the elk Posted November 14, 2019 Share Posted November 14, 2019 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? Quote Link to comment Share on other sites More sharing options...
ggn Posted November 15, 2019 Share Posted November 15, 2019 (edited) 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! Edited November 15, 2019 by ggn 1 Quote Link to comment Share on other sites More sharing options...
the elk Posted November 15, 2019 Author Share Posted November 15, 2019 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.