71B: DISP, KEY$, and keyboard buffer
|
04-23-2021, 09:33 PM
Post: #14
|
|||
|
|||
RE: 71B: DISP, KEY$, and keyboard buffer
(04-23-2021 09:28 PM)rprosperi Wrote: Since the intended use is to ultimately resume execution after a long wait, you should strongly re-consider replacing KEY$ with KEYWAIT$, which puts the 71B into a sleep-like, low-power mode until a key is hit. KEY$ does appear to similarly just wait, but it's really running a near full program execution level inside (probably just looping and checking the key buffer), so if the calculations run for 30 secs and then you don't notice it has been waiting for another 30 secs, it's about the same as if the calculations ran for the full minute. KEY$ eats batteries for sure. I'm not using KEY$ to implement the pause though, it's just there to clear the keyboard buffer after the pause. The DELAY 8,8 @ DISP ... does the pause. I simply don't want the key that was pressed "falling through" to later instructions that accept keyboard input, so gobbling it up with a single call to KEY$ gets rid of it before moving on. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)