Post Reply 
71B: DISP, KEY$, and keyboard buffer
04-23-2021, 12:00 PM
Post: #8
RE: 71B: DISP, KEY$, and keyboard buffer
(04-23-2021 11:26 AM)J-F Garnier Wrote:  
(04-23-2021 01:18 AM)Dave Britten Wrote:  I have to imagine there's a better way to clear the screen than saving the current DELAY settings, changing to DELAY 0,0, calling DISP with no arguments, and restoring the previously saved DELAY. I'm open to LEX files here.

To clear the display, you can use the GDISP trick: GDISP "".
However, the display buffer is not really cleared, just the LCD screen.

J-F

Ah, I was wondering if that might work! Wasn't sure if that command would only set the specified columns starting from the left, and since it was time for bed I didn't experiment with it last night. Smile This should work fine since I just want a simple way to blank the screen to indicate that the program has resumed crunching numbers.

So it seems like the simplest way to make DISP behave like PRINT on Sharp/Casio pocket computers is to first set DELAY 8,8, then follow DISP with K$=KEY$ @ GDISP "". And throwing away KEY$ is only really necessary if you know that DISP will be followed by something that will accept keyboard input (e.g. INPUT, or the program ending and returning to the command line).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 71B: DISP, KEY$, and keyboard buffer - Dave Britten - 04-23-2021 12:00 PM



User(s) browsing this thread: 1 Guest(s)