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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 273
» Latest member: mindlin
» Forum threads: 1,085
» Forum posts: 6,486

Full Statistics

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

Latest Threads
location of heap manageme...
Forum: Help & Support
Last Post: boriel
2026-03-07, 12:13 AM
» Replies: 1
» Views: 216
non-paged supervisor code...
Forum: Help & Support
Last Post: sdo303
2026-02-20, 06:38 PM
» Replies: 8
» Views: 692
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: Duefectu
2026-02-09, 01:52 PM
» Replies: 3
» Views: 1,067
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 1,678
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 812
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 935
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 475
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 945
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 1,109
CLS/Fade out ASM Sub-rout...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-05, 03:39 PM
» Replies: 2
» Views: 839

 
  [tehkan-redclash] first test
Posted by: nitrofurano - 2016-01-07, 04:35 PM - Forum: Other Archs - No Replies

first test for the Tehkan’s Red Clash 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_-_TehkanRedClash">http://www.boriel.com/wiki/en/index.php ... anRedClash</a><!-- m --> )



Attached Files
.zip   example01d_working.zip (Size: 24.68 KB / Downloads: 1066)
Print this item

  [nichibutsu-seicross] first test
Posted by: nitrofurano - 2016-01-04, 11:32 PM - Forum: Other Archs - Replies (1)

first test for the Nichibutsu’s Seicross arcade machine (Frisky Tom 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_-_NichibutsuSeicross#test01-friskytom">http://www.boriel.com/wiki/en/index.php ... -friskytom</a><!-- m --> )



Attached Files
.zip   example01d_working.zip (Size: 30.66 KB / Downloads: 1035)
Print this item

  [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: 1026)
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: 1155)
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: 992)
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