| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 223 online users. » 0 Member(s) | 221 Guest(s) Baidu, Bing
|
| Latest Threads |
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
Yesterday, 11:40 AM
» Replies: 5
» Views: 98
|
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 89
|
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 140
|
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 85
|
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 190
|
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 352
|
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: zedex82
2025-10-05, 07:36 PM
» Replies: 2
» Views: 267
|
CLS/Fade out ASM Sub-rout...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-05, 03:39 PM
» Replies: 2
» Views: 263
|
ZX Basic Studio Bugs
Forum: Bug Reports
Last Post: Duefectu
2025-09-23, 04:07 PM
» Replies: 5
» Views: 1,056
|
Printing with FZX
Forum: Help & Support
Last Post: boriel
2025-07-17, 10:08 PM
» Replies: 1
» Views: 1,953
|
|
|
| Error: LET string1 = string1 ( 1 TO LEN string1) (solved) |
|
Posted by: zarsoft - 2024-08-14, 11:45 AM - Forum: Bug Reports
- Replies (3)
|
 |
In my program I had
DIM EDLINE AS STRING ' global variable
and if I wrote
EDLINE = EDLINE( TO LEN EDLINE-2)
then the test
EDLINE = ""
it didn't always work
and I had to use
LEN EDLINE = 0
Then I changed it to
aux = EDLINE( TO LEN EDLINE-2)
EDLINE = aux
and the test
EDLINE = ""
worked well.
|
|
|
| Error: loop ends every second (solved) |
|
Posted by: zarsoft - 2024-08-07, 08:37 PM - Forum: Bug Reports
- Replies (5)
|
 |
When you press "1" the loop ends every second.
Code: SUB Menu
DIM k$ AS STRING
CLS
PRINT
DO
PRINT
PRINT
PRINT "MENU"
PRINT " 1 - Test"
PRINT " 0 - Exit"
DO
k$ = INKEY$
LOOP UNTIL (k$ >= "0") AND (k$ <= "1") ' loop ends every second
'LOOP UNTIL k$ <> "" ' runs OK
'LOOP UNTIL (k$ = "0") OR (k$ = "1") ' runs OK
'LOOP UNTIL (k$ >= "0") AND (k$ <= "1") ' loop ends every second
PRINT
IF k$ = "1" THEN PRINT "Option 1"
LOOP UNTIL k$ = "0"
PRINT
PRINT
PRINT
END SUB
Menu
|
|
|
| Includes in ASM |
|
Posted by: bracckets - 2024-03-27, 04:16 PM - Forum: How-To & Tutorials
- Replies (2)
|
 |
Is it possible to use assembler includes in the inline ASM code blocks
so the assembler can be broken down into files, e.g.
INCLUDE maths.asm
Also is it possible to include binary files in the assembler e.g.
BINARY 'test.bin'
Thanks
|
|
|
| ScrollLeft function scrolling more than 1 pixels left |
|
Posted by: rbiondi - 2024-03-01, 11:42 AM - Forum: Bug Reports
- Replies (2)
|
 |
Hello,
I'm trying to use the ScrollLeft function to create a scrolling chart and the ScrollLeft function seems to be scrolling more than 1 pixel left.
The screening area on the left also seems to be not to be pixel acurate.
Sample program:
Code: #include <scroll.bas>
INK 7
PAPER 0
CLS
sub square(x1 as UBYTE, y1 as UBYTE, x2 as UBYTE, y2 as UBYTE, color as UBYTE)
DIM x AS UBYTE = 0
DIM y AS UBYTE = 0
FOR x = 0 TO x2 - x1
PLOT INK color; x1 + x, y1
PLOT INK color; x1 + x, y2
NEXT x
FOR y = 0 TO y2 - y1
PLOT ink color; x1, y1 + y
PLOT ink color; x2, y1 + y
NEXT y
END SUB
SUB plott(x as FLOAT, y as FLOAT, sx as FLOAT, sy as FLOAT, x1 as UBYTE, y1 as UBYTE, x2 as UBYTE, y2 as UBYTE, color as UBYTE)
DIM alfa AS UINTEGER
DIM beta AS UINTEGER
DIM mx AS UINTEGER
alfa = ((x/sx) * (x2 - x1)) + x1
beta = ((y/sy) * (y2 - y1)) + y1 + ((y2-y1)/2)
' Limites da tela
IF alfa >= x2 - 1 then alfa = x2 - 1
IF beta <= y1 + 1 then beta = y1 + 1
mx = alfa mod x2
IF alfa >= (x2-1) then
ScrollLeft(x1 + 1, y1 + 1, x2 - 1, y2 - 1)
alfa = x2-1
END IF
PRINT at 10,10; "alfa: "; alfa
PRINT at 11,10; "beta: "; beta
PLOT ink color; alfa, beta
END SUB
square(10, 15, 80, 60, 6)
DIM dia AS INTEGER
DIM valor AS float = 0
DIM incremento AS FLOAT = 1
' Create a sample scrolling chart
FOR dia = 1 TO 5000
plott(dia, valor, 360, 100000, 10, 15, 80, 60, 6)
valor = valor + 1000 * incremento
IF valor > 49000 then incremento = -1
IF valor < -49000 then incremento = 1
NEXT dia
Thank you very much!
|
|
|
|