Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PRINT AT 23,0 and FOR NEXT Loop not working after Fastcall
Luzie Wrote:I put the Fastcall / MCode out and get the "5 Out of screen" Error
while only running this BASIC lines:

FOR A=0 TO 40
PRINT AT A,15; INK 6; PAPER 0;A;"###"
This wraps around (e.g. AT 24,0 is printed on line 0). But these wrapped lines donĀ“t print from column 15,
they are printed from column 0. And at program end, this rises the "5 Out of screen" error.
This behaviour is expected.
The ZX Spectrum screen has only 24 physical rows (from 0 to 23). Printing beyond 23 just wraps around and resets the X coordinate (back to 0).

It also puts an "Out Of Screen" signal in the ROM Variable, hence when you exit back to Sinclair BASIC you get the 5 Out of Screen Error.
This is done this way because you can check if your latest print has been out of screen or not.
Also, if you enable ZX BASIC check error flag, printing or plotting out of screen will trigger an Out of Screen error and exit to BASIC.

Messages In This Thread

Forum Jump:

Users browsing this thread: 1 Guest(s)