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 54 online users.
» 0 Member(s) | 52 Guest(s)
Baidu, Bing

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,677
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 811
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 932
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: 944
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 1,108
CLS/Fade out ASM Sub-rout...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-05, 03:39 PM
» Replies: 2
» Views: 837

 
  Clarification about HEAP
Posted by: LukeBord1 - 2018-04-18, 09:49 PM - Forum: How-To & Tutorials - Replies (6)

I tried for months to make a compiled intro menu for my Arcade Game Designer projects without success... even storing the compiled menu program in a free memory area (below the AGD code), the game always crashed.

Finally I realized the importance of the HEAP setting in ZXB !
Reading various posts in this excellent forum, Boriel explained that the HEAP setting is a reserved memory area for string variables (please correct me if I'm wrong), and the memory allocation for this parameter is 4768 bytes by default !
So the light turned on and it seems I've finally discovered the cause of the memory collisions...

Since my Basic menu is very simple, including just a couple of UBYTEs without handling any string variable, I tried to set the HEAP to a minimum value like this:

Code:
zxb menu.bas --org=25000 --heap=128
...the magic is done... no crashes and a perfect compiled intro menu for my AGD game!

Now... I just wonder what could be the minimum HEAP setting when there's no string variables at all... and the reason why such an important parameter is just quoted in the ZXB command-line page without any further information !?

Print this item

  [gameatron-gotya] first test
Posted by: nitrofurano - 2018-03-06, 01:35 PM - Forum: Other Archs - No Replies

first test for the Game-A-Tron’s Got-Ya arcade machine
( the wiki page related to this thread will be at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_GameatronGotya">http://www.boriel.com/wiki/en/index.php ... atronGotya</a><!-- m --> not there yet because that wiki bug )

( <!-- m --><a class="postlink" href="http://i.xomf.com/hcjvm.png">http://i.xomf.com/hcjvm.png</a><!-- m --> )



Attached Files
.zip   example01g_improving.zip (Size: 23.38 KB / Downloads: 1044)
Print this item

  [irem-m58] first test
Posted by: nitrofurano - 2018-03-06, 01:32 PM - Forum: Other Archs - No Replies

first test for the Irem’s M58 arcade machine (10 Yard Fight)
( the wiki page related to this thread will be at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_IremM58">http://www.boriel.com/wiki/en/index.php ... _-_IremM58</a><!-- m --> not there yet because that wiki bug )

( <!-- m --><a class="postlink" href="http://i.xomf.com/cnmvh.png">http://i.xomf.com/cnmvh.png</a><!-- m --> )



Attached Files
.zip   example01d_improving.zip (Size: 31.81 KB / Downloads: 1019)
Print this item

  [murogemonaco] first test
Posted by: nitrofurano - 2018-03-03, 07:06 PM - Forum: Other Archs - No Replies

first test for the Muroge Monaco arcade machine
( the wiki page related to this thread will be at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_MurogeMonaco-">http://www.boriel.com/wiki/en/index.php ... ogeMonaco-</a><!-- m --> not there yet because that wiki bug )



Attached Files
.zip   example01c_improve.zip (Size: 25.36 KB / Downloads: 1071)
Print this item

  [jaleco-parallelturn] first test
Posted by: nitrofurano - 2018-03-03, 06:58 PM - Forum: Other Archs - No Replies

first test for the Jaleco’s Parallel Turn arcade machine
( the wiki page related to this thread will be at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_JalecoParallelTurn">http://www.boriel.com/wiki/en/index.php ... rallelTurn</a><!-- m --> - not there yet because that wiki bug )



Attached Files
.zip   example01c_improving.zip (Size: 28.53 KB / Downloads: 1000)
Print this item

  [nintendo-mariobros] first test
Posted by: nitrofurano - 2018-03-03, 12:03 PM - Forum: Other Archs - No Replies

first test for the Nintendo’s Mario Bros arcade machine
( at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_NintendoMarioBros">http://www.boriel.com/wiki/en/index.php ... oMarioBros</a><!-- m --> as soon the wiki gets fixed )

(temporary: screenshot to be placed in the wikipage: <!-- m --><a class="postlink" href="http://i.xomf.com/dfmml.png">http://i.xomf.com/dfmml.png</a><!-- m --> )



Attached Files
.zip   example01e_improving.zip (Size: 26.63 KB / Downloads: 1061)
Print this item

  [nintendo-donkeykong] first test
Posted by: nitrofurano - 2018-03-03, 11:52 AM - Forum: Other Archs - No Replies

first test for the Nintendo’s Donkey Kong arcade machine
( at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_NintendoDonkeyKong">http://www.boriel.com/wiki/en/index.php ... DonkeyKong</a><!-- m --> as soon the wiki gets fixed )


(temporary: screenshot to be placed in the wikipage: <!-- m --><a class="postlink" href="http://i.xomf.com/jzvdc.png">http://i.xomf.com/jzvdc.png</a><!-- m --> )



Attached Files
.zip   example01e_improving.zip (Size: 54.4 KB / Downloads: 1057)
Print this item

  1.8.1 error unexpected token 'ELSEIF'
Posted by: ximokom - 2018-02-07, 10:16 PM - Forum: Help & Support - Replies (2)

Estaba compilando correctamente con la version estable 1.7.2 y al actualizar a la version 1.8.1 en desarrollo me sale esto: Alguna idea?
Was compiling correctly with the stable version 1.7.2 and update to the version 1.8.1 in development I get this: any idea?

if n=0 then c="\a"
elseif n=1 then c="\{i6}\b" -->error unexpected token 'ELSEIF'
elseif n=2 then c="\{i2}\c"
end if

Print this item

  [ballyastrocade] Just Another Snake Game
Posted by: nitrofurano - 2018-01-23, 08:41 PM - Forum: Other Archs - No Replies

Just Another Snake Game for Bally Astrocade game console. Still has bugs.
( <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_BallyAstrocade#Just_Another_Snake_Game">http://www.boriel.com/wiki/en/index.php ... Snake_Game</a><!-- m --> )



Attached Files
.zip   justanothersnakegame_ballyastrocade_201801231938.zip (Size: 22.43 KB / Downloads: 1080)
Print this item

  How to manage part of a STRING?
Posted by: LukeBord1 - 2018-01-09, 12:29 AM - Forum: How-To & Tutorials - Replies (4)

In standard Basic, we have this example correctly working:

Code:
10 LET a$="123456789012345678901234567890xy"
20 PRINT AT 0,0; a$
30 IF INKEY$="0" THEN LET a$=a$(32) + a$(1 TO 31)
40 GOTO 20

...but it doesn't seem to work in ZXB:

Code:
DIM test AS STRING
test="123456789012345678901234567890xy"
mainloop:
PRINT AT 0,0; test
IF INKEY="0" THEN
test=test(32) + test(1 TO 31)
END IF
GOTO mainloop

Thoughts?

Print this item