Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 212 online users. » 0 Member(s) | 210 Guest(s) Bing, Google
|
Latest Threads |
.tap file code not execut...
Forum: Help & Support
Last Post: Zoran
04-28-2025, 10:59 AM
» Replies: 4
» Views: 339
|
Exit from more than one l...
Forum: Wishlist
Last Post: Duefectu
04-23-2025, 10:06 PM
» Replies: 3
» Views: 300
|
put small ASM programs li...
Forum: How-To & Tutorials
Last Post: Zoran
04-18-2025, 02:02 PM
» Replies: 6
» Views: 1,601
|
Creating +3 Menus - Loadi...
Forum: Help & Support
Last Post: merlinkv
04-16-2025, 02:08 PM
» Replies: 6
» Views: 557
|
Randomize not very random...
Forum: Help & Support
Last Post: Zoran
04-08-2025, 10:40 AM
» Replies: 4
» Views: 893
|
Scope rules
Forum: Bug Reports
Last Post: Zoran
04-04-2025, 09:46 AM
» Replies: 2
» Views: 334
|
Using constants not allow...
Forum: Bug Reports
Last Post: baltasarq
03-19-2025, 10:00 PM
» Replies: 8
» Views: 1,066
|
404 page not found
Forum: Documentation
Last Post: boriel
03-08-2025, 07:16 PM
» Replies: 5
» Views: 2,888
|
Spectrum keywords codes
Forum: Bug Reports
Last Post: boriel
03-08-2025, 11:00 AM
» Replies: 1
» Views: 419
|
ZXodus][Engine
Forum: ZX Basic Compiler
Last Post: boriel
02-19-2025, 11:43 PM
» Replies: 69
» Views: 213,813
|
|
|
Different result than expected when poking to screen |
Posted by: emook - 12-10-2016, 09: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!
|
|
|
|