On Friday, May 14, 2021 at 6:07:34 AM UTC-5, Jeff Blakeney wrote:
On 2021-05-14 4:59 a.m., [email protected] wrote:
So is this technique new to you guys or did I just solve an age-old
screen PRINTing problem? :-)
If I've ever run into this issue in the past, I think I would have just POKE'd the last character on the screen. A little less typing and a
little less code in my program. :)
True. And that's probably what I would have resorted to as well. But it has been a slight annoyance not being able to just use the PRINT statement to output ALL my text to the screen. If you wanted to put different strings down there at different
times, each time you'd have to PRINT your string minus the last character, then POKE in that last character. And if you wanted to PRINT a number variable down there, you have to jump through even more hoops. You could POKE the entire string's ASCII in,
but then you're dealing with the added complexity of dealing with loops and POKEing the ASCII values of each character in the string. Although it does work, it's not very flexible, especially if you're using some of the same text in more areas of the
screen than just the bottom-right.
Now that I think about it, adjusting the WNDBTM would be a better approach than adjusting the WNDWDTH. This way no screen holes are written into, plus nothing bleeds over to another part of the screen on the left side if any screen wrapping occurs,
which includes the CLREOL (clear to end of line) monitor routine that's called every time the user presses Return from an INPUT statement or at the command prompt.
If you're putting stuff all over the screen for printing and clearing menus and stuff, you're already proactively positioning the cursor within the viewing screen. So I guess really, the only thing out of the ordinary you'd have to do is POKE once to
WNDBTM beforehand. Once you're done and ready for the screen to be able to scroll again, return the original value back to that location or issue a TEXT statement (which resets all the window values without triggering a screen scroll). Of course if you'
re in mixed screen graphics and want to stay there, you'll want to go the POKE route to restore WNDBTM and not use TEXT.
So then, my cleaned up procedure would be:
1. POKE 35,26 (no semicolons needed with PRINT)
2. Position and PRINT to draw or clear all the text you need
3. TEXT or POKE 35,24 when you're all done and ready to scroll again
Example:
10 POKE 35,26
20 A$="TEST": B$="COMPLETE"
30 VTAB 24: HTAB 37: ?A$: GET PAUSE$
40 VTAB 24: HTAB 33: ?B$
50 TEXT: VTAB 8
HOME:LIST:RUN
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)