Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 296
» Latest member: rezwanah
» Forum threads: 1,031
» Forum posts: 6,226

Full Statistics

Online Users
There are currently 362 online users.
» 0 Member(s) | 360 Guest(s)
Bing, Google

Latest Threads
Error: LET string1 = stri...
Forum: Bug Reports
Last Post: zarsoft
08-15-2024, 06:06 PM
» Replies: 3
» Views: 451
Error: loop ends every se...
Forum: Bug Reports
Last Post: zarsoft
08-11-2024, 05:41 PM
» Replies: 5
» Views: 629
Error: -1
Forum: Bug Reports
Last Post: boriel
08-10-2024, 08:17 AM
» Replies: 1
» Views: 296
attr.bas syntax error
Forum: Bug Reports
Last Post: csk
07-15-2024, 05:16 AM
» Replies: 2
» Views: 560
My computer is haunted!
Forum: Bug Reports
Last Post: zarsoft
05-22-2024, 10:30 AM
» Replies: 0
» Views: 526
Includes in ASM
Forum: How-To & Tutorials
Last Post: bracckets
04-04-2024, 12:17 AM
» Replies: 2
» Views: 2,025
Store array information i...
Forum: Help & Support
Last Post: rbiondi
03-10-2024, 09:42 PM
» Replies: 0
» Views: 1,180
ScrollLeft function scrol...
Forum: Bug Reports
Last Post: rbiondi
03-07-2024, 03:57 PM
» Replies: 2
» Views: 2,390
string.bas errors when co...
Forum: Bug Reports
Last Post: rbiondi
03-01-2024, 10:10 AM
» Replies: 2
» Views: 2,099
Using Beepola with ZX BAS...
Forum: How-To & Tutorials
Last Post: edtoo
02-29-2024, 09:47 AM
» Replies: 15
» Views: 40,247

 
  Error: LET string1 = string1 ( 1 TO LEN string1) (solved)
Posted by: zarsoft - 08-14-2024, 10: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.

Print this item

  Error: loop ends every second (solved)
Posted by: zarsoft - 08-07-2024, 07: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

Print this item

  Error: -1
Posted by: zarsoft - 08-06-2024, 08:54 AM - Forum: Bug Reports - Replies (1)

DIM s AS STRING
s = ""
PRINT LEN s-1 ' gives 65535
PRINT LEN ""-1 ' gives -1

Print this item

  attr.bas syntax error
Posted by: csk - 07-14-2024, 05:38 PM - Forum: Bug Reports - Replies (2)

Hi! I'm writing a game about a pig that has to eat various food items. Food items are realized by means of UDG's stored in DATA lines and READ in en masse at the beginning of the game. Then, to draw the necessary items, I move address 23675/-76 to the required location. Until yesterday, the system worked flawlessly. Now I added a new item, and the compiler began to throw the following errors. The highest address an UDG byte is stored is 65294, i.e. AFAIK it is still allowed. I did nothing else than add the new DATA files and jump conditions to draw the new item, and what previously worked impeccably, just stopped doing so. I simply don't know what to do. Could you help? Thanks in advance!


.jpg   Clipboard01.jpg (Size: 232.31 KB / Downloads: 116)

Print this item

  My computer is haunted!
Posted by: zarsoft - 05-22-2024, 10:30 AM - Forum: Bug Reports - No Replies

My program gives intermittent errors.
The result also depends on the emulator.
What's going on here?
Program error? Is the compiler broken?

[Image: Trace.png]
files: files.zip

Print this item

  Includes in ASM
Posted by: bracckets - 03-27-2024, 03: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

Print this item

  Store array information in extended memory (128kb)
Posted by: rbiondi - 03-10-2024, 09:42 PM - Forum: Help & Support - No Replies

Hello,

Is it possible storing arrays and/or Strings in Zx Spectrum Extended Memory (128kb)? 
How could this would be accomplished?

Thank you very much!
Rogerio

Print this item

  ScrollLeft function scrolling more than 1 pixels left
Posted by: rbiondi - 03-01-2024, 10: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!

Print this item

  string.bas errors when compiling with strict
Posted by: rbiondi - 02-23-2024, 11:29 AM - Forum: Bug Reports - Replies (2)

Hello,

I'm trying to compile my program with --strict option and getting some errors in string.bas:


Code:
zxbasic/src/arch/zx48k/library/string.bas:124: error: strict mode: missing type declaration for 's$'

I just fixed and tried to create a branch and send a merge request to zxbasic git repository but I'm not authorized.


Thank you,
Rogerio

Print this item

  Johnny Bravo
Posted by: zarsoft - 02-11-2024, 11:20 PM - Forum: Gallery - No Replies

To play online, click HERE.

[Image: Johnny%20Bravo%20-%20Run%20Johnny%20Run%...oft%5d.png]

Print this item