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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 267
» Latest member: ConradoBadenas
» Forum threads: 1,083
» Forum posts: 6,474

Full Statistics

Online Users
There are currently 185 online users.
» 0 Member(s) | 182 Guest(s)
Baidu, Bing, Google

Latest Threads
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 141
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 110
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 161
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: 219
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,966

 
  [kaneko-fastfreddie] first test
Posted by: nitrofurano - 2016-01-04, 06:03 PM - Forum: Other Archs - No Replies

first test for the Kaneko’s Fast Freddie arcade machine (Boggy 84 configuration)
( the wiki page related to this thread is at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_KanekoFastFreddie">http://www.boriel.com/wiki/en/index.php ... astFreddie</a><!-- m --> )



Attached Files
.zip   example01g_working.zip (Size: 28.04 KB / Downloads: 963)
Print this item

  [taito-marinedate] first test
Posted by: nitrofurano - 2016-01-03, 04:38 PM - Forum: Other Archs - No Replies

first test for the Taito’s Marine Date arcade machine
( the wiki page related to this thread is at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_TaitoMarineDate">http://www.boriel.com/wiki/en/index.php ... MarineDate</a><!-- m --> )



Attached Files
.zip   example01g_working.zip (Size: 37.59 KB / Downloads: 1090)
Print this item

  [taito-metalsoldierisaac2] first test
Posted by: nitrofurano - 2016-01-01, 11:19 PM - Forum: Other Archs - No Replies

first test for the Taito’s Metal Soldier Isaac II arcade machine
( the wiki page related to this thread is at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_TaitoMetalSoldierIsaac2">http://www.boriel.com/wiki/en/index.php ... dierIsaac2</a><!-- m --> )



Attached Files
.zip   example01f_working.zip (Size: 22.53 KB / Downloads: 925)
Print this item

  Happy New Year!
Posted by: britlion - 2016-01-01, 01:30 PM - Forum: Off-Topic - Replies (1)

To one and all.

Print this item

  PRINT AT 23,0 and FOR NEXT Loop not working after Fastcall
Posted by: Luzie - 2015-12-27, 06:54 PM - Forum: Bug Reports - Replies (14)

Hi,

I´ve tried but now yet find the issue for this:

I´m writing a BASIC program (with help of LCDs BorIDE) with a FASTCALL Function ASM
which itself calls a machine code routine in Spectrum Betadisk / TR-DOS ROM.

If have the FASTCALL NOT active in my BASIC program then these BASIC line work:
PRINT AT 23,0;"XXX"
and
DIM A AS UINTEGER
FOR A=59999 TO 60008
PRINT A, PEEK(A); " "
NEXT A

BUT if I activate the FASTCALL
and then run those BASIC lines
I get error: 5 Out of Screen on: PRINT AT 23,0;"XXX"
and I get output 60000 to 60008 on the loop (instead of output 59999 to 60008)

Because of it´s complexity I won´t post my whole source here,
as you need BorIDE and an emulator like Fuse and some additional files (like TRDOS-Disk-Image) to test it completly.
I you like, I can send this all packed together directly to you.

But maybe on reading the above you have an Idea what could be the reason ?

Regards,

Luzie

Print this item

  Yet another optimized bug
Posted by: einar - 2015-12-17, 04:14 PM - Forum: Bug Reports - No Replies

Sample program test.bas:

Code:
GOTO 10

sub FASTCALL proc1()
    asm
start:
        ld hl,(stuff)
        ld (23672),hl
        ret
stuff:
        defw 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        defw 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        defw 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        defw 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    end asm
end sub

sub FASTCALL proc2(a AS UBYTE)
    asm
        cp      10
        jr      nz, skip
        dec     a
skip:
        jp      start
    end asm
end sub

10 proc1()
   proc2(0)

Compiling it using -O2 works correctly and produces the following code for routine proc2:

Code:
_proc2:
#line 17
        cp      10
        jr      nz, skip
        dec     a
skip:
        jp      start
#line 22
_proc2__leave:
        ret

Compiling it using -O3 produces error "Relative jump out of range" and produces the following code for routine proc2:

Code:
_proc2:
#line 17
        cp      10
        jr      nz, start
        dec     a
skip:
        jp      start
#line 22
_proc2__leave:
        ret

Again, the optimizer is supposed to try to optimize its own generated code only, not someone else's assembly code!

Print this item

  Compile error - INKEY$ can't be called in a FOR loop
Posted by: mathez - 2015-11-19, 06:59 AM - Forum: Help & Support - Replies (1)

Hello,

I am using version 1.3.0-s1121, though I've also tried 1.4.0s1967, and have the following simple program:

Code:
10 FOR l = 1 to 30
IF INKEY$ <> "" THEN GOTO 100
NEXT l
GOTO 10
100 PRINT "*"
The compiler gives these errors:
test.bas:6: Syntax Error. Unexpected token 'NEXT' <NEXT>
test.bas:7: Undeclared label "10"

I am a C/C++ programmer, so I might be missing something but looks like if I have INKEY$ in a FOR loop, it doesn't compile. I can remove the GOTO 10 and do a 10: to fix the second error, though that's not very clean syntax with the line number having to be converted to a label.

But, I haven't yet found a workaround for the INKEY$ problem in a FOR loop.

Thanks so much for the help.

Print this item

  CHR or CHR$ crashing running Spectrum
Posted by: Luzie - 2015-11-05, 10:32 PM - Forum: Bug Reports - Replies (4)

Hi,

I do my first steps into ZX Basic and found this crashing
e.g. X128 Spectrum Emulator when I compile this an run it:

FOR A=0 TO 255
PRINT CHR$ (PEEK(A));
NEXT A

Seems printing some CHR$ is like sending some control codes ...
Can work around this when I just use "printable" Characters above e.g. > CHR$ 32 and < CHR$ 127

And just le me say: I love your ZX Basic !

Print this item

  DIM At?
Posted by: Haplo - 2015-11-04, 04:53 PM - Forum: Help & Support - Replies (8)

Hi, I'm a newbie with Boriel's ZX Basic and I´m not sure if there is a way to do something like this:

DIM charset(767) As uByte At 49152 => {0,12,48,36,....,(768th byte)}

The idea is to place an array of 768 bytes (like a character set) at a specific memory direction(49152).

I was read the Wiki and I found some references to "DIM At" but it's not clear for me .

Print this item

  [taiyo-chinesehero] first test
Posted by: nitrofurano - 2015-09-24, 01:45 PM - Forum: Other Archs - Replies (4)

first test for the Taiyo-ChineseHero arcade machine
( the wiki page related to this thread is at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_TaiyoChineseHero">http://www.boriel.com/wiki/en/index.php ... hineseHero</a><!-- m --> )



Attached Files
.zip   example01d_startingtowork.zip (Size: 25.09 KB / Downloads: 1291)
Print this item