The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different result than expected when poking to screen
#1
Hello,

In normal basic we can do this following code :

Code:
10 BORDER 0: PAPER 0: INK 6: CLS 20 FOR i=1 TO 7 30 FOR y=0 TO 21 40 FOR x=0 TO 31 50 LET l=22528+x+y*32 60 POKE l,8*i 70 NEXT x 80 NEXT y 90 NEXT i

[Image: tK1VcJ5.png]

To fill the screen with the desired colour (I know this example seems pointless, but the same method to poke a screen char is used quite a bit for me)

however, in ZXB it only seems to pokes to the top third of the screen :

Code:
border 0 paper 0 ink 6 cls dim i as ubyte dim x as ubyte dim y as ubyte dim l as uinteger FOR i=1 TO 6 FOR y=0 TO 23 FOR x=0 TO 31 l=22528+x+y*32 POKE l,8*i NEXT NEXT NEXT

[Image: UdGaSL2.png]

Anyone know what I am doing wrong here?

Thanks!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)