Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PRINT AT 22,0
#2
(01-27-2021, 06:57 PM)patters Wrote: Is it normal that the entire screen scrolls every time I print at line 22 - not even filling the line? Surely it should behave like the other lines, no? Or else it's not much of an improvement over Sinclair BASIC's PRINT #0; AT 1,0;

No, it should now scroll up until you print at 23, 0 and fill the line or put no semicolon. i. e.
Code:
PRINT AT 22, 0; "22"
PRINT "at 23";
print " ... and More";
pause 0
This program won't scroll the screen (just tested).
ZX Basic uses 0 to 23 coordinates.
To mimic Sinclair BASIC screen behaviour the scroll starts just before printing the next character that should go in "line 24".
In other words:
Code:
PRINT AT 23, 0; "Hello world" : REM no ; at the end, will scroll
PAUSE 0
REM screen will scroll up just before printing this
PRINT "This is now at line 23"

You can disable scroll entirely if compiling with -D DISABLE_SCROLL
Reply


Messages In This Thread
PRINT AT 22,0 - by patters - 01-27-2021, 06:57 PM
RE: PRINT AT 22,0 - by boriel - 01-27-2021, 11:32 PM
RE: PRINT AT 22,0 - by patters - 01-28-2021, 12:40 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)