newTIboyRob Posted August 1, 2023 Share Posted August 1, 2023 Anyone remember the command to put in a basic program for "Strike Any Key When Ready?" In IBM I remember it is INKEY$, but I can't recall for the 2c. Thanks Quote Link to comment Share on other sites More sharing options...
nick3092 Posted August 1, 2023 Share Posted August 1, 2023 (edited) The quick and dirty way is just do a GET into a variable you aren't using. The other option is to go into a loop and peek (-16384 maybe) to see if the value changed, or is more or less than 128. I don't recall off hand. There is also a poke you can do to rest that value. Edited August 1, 2023 by nick3092 Quote Link to comment Share on other sites More sharing options...
newTIboyRob Posted August 1, 2023 Author Share Posted August 1, 2023 I'd rather do it quick and dirty Thanks Nick! I remember now: GET K$ Quote Link to comment Share on other sites More sharing options...
newTIboyRob Posted August 1, 2023 Author Share Posted August 1, 2023 Nick, I would be curious to see what you come up with in my 2 questions under the listing CAT files horizontally post. Could you take a look at those too? Quote Link to comment Share on other sites More sharing options...
MarkO Posted August 2, 2023 Share Posted August 2, 2023 5 hours ago, newTIboyRob said: Anyone remember the command to put in a basic program for "Strike Any Key When Ready?" In IBM I remember it is INKEY$, but I can't recall for the 2c. Thanks INKEY$ works a bit differently than GET$.. GET$ wait for a Key Press, ( not a Modifier like SHIFT, CTRL, Open-Apple, Closed-Apple ), then continues on, letting you Assign the Key to a String Variable.. INKEY$ Tests for a Key Press, and Continues On if there isn't one, or lets you Assign the Key to a String Variable.. That Makes INKEY$, Non-Blocking and GET$ Blocking.. The INKEY$ can be "simulated" by Checking the Key Board Status and then Reading the Key if it Available... This is exactly what would need to be done to generate a Sound as the Keys are pressed.. MarkO 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.