| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 187 online users. » 0 Member(s) | 184 Guest(s) Baidu, Bing, Google
|
| Latest Threads |
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
Yesterday, 11:52 AM
» Replies: 7
» Views: 140
|
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 109
|
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 160
|
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 92
|
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 217
|
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 383
|
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: zedex82
2025-10-05, 07:36 PM
» Replies: 2
» Views: 280
|
CLS/Fade out ASM Sub-rout...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-05, 03:39 PM
» Replies: 2
» Views: 273
|
ZX Basic Studio Bugs
Forum: Bug Reports
Last Post: Duefectu
2025-09-23, 04:07 PM
» Replies: 5
» Views: 1,083
|
Printing with FZX
Forum: Help & Support
Last Post: boriel
2025-07-17, 10:08 PM
» Replies: 1
» Views: 1,965
|
|
|
| Different result than expected when poking to screen |
|
Posted by: emook - 2016-12-10, 10:31 PM - Forum: ZX Basic Compiler
- Replies (5)
|
 |
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]](http://imgur.com/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]](http://i.imgur.com/UdGaSL2.png)
Anyone know what I am doing wrong here?
Thanks!
|
|
|
|