no room error problem with getting this program to work

Discussions about the BBC BASIC language, with particular reference to BB4W and BBCSDL
777
Posts: 4
Joined: Sun 04 Sep 2022, 13:21

no room error problem with getting this program to work

Post by 777 »

im getting a no room error when i try and run this program. ive tried adjusting himem and lomem to fix this but nothing seems to work.

here is a beebem snapshot of the offending program. im running it on 128k bbc master emulation so there should be no memory problems. ive also tried running on 32k bbc model b emulation

https://easyupload.io/kxibc4

i copied and pasted this from a pdf btw, so there may be a few mistakes in the code. i had to fix a few things myself.

http://www.flaxcottage.com/Misc/Advance ... %20BBC.pdf

page 120

the program is only about 7k long but the available memory when you run the program and the error comes up is about 1k. i know it must be trying to dump a load of variables, somewhere in memory, which is causing it to run out of memory
Hated Moron

Re: no room error problem with getting this program to work

Post by Hated Moron »

777 wrote: Sun 04 Sep 2022, 13:27 i copied and pasted this from a pdf btw, so there may be a few mistakes in the code. i had to fix a few things myself.
http://www.flaxcottage.com/Misc/Advance ... %20BBC.pdf
page 120
The programs in that book are difficult to transcribe because they are not self-contained, each block of code seems to be modifying something that has gone before. For example listing 6.4 begins as follows, which is meaningless (what happened to line 1510?):

Code: Select all

1500 REM initdims
1520 DIM D(20),Z(4)
1530 ENDPROC
If you want to plot pie-charts I'd suggest you look at the program piechart.bbc supplied (in the examples/graphics/ directory) with every edition of BBC BASIC for SDL 2.0. Note that neither BB4W nor BBCSDL supports hatched patterns for filling graphics objects, at least not straightforwardly.
777
Posts: 4
Joined: Sun 04 Sep 2022, 13:21

Re: no room error problem with getting this program to work

Post by 777 »

Hated Moron wrote: Sun 04 Sep 2022, 16:43
777 wrote: Sun 04 Sep 2022, 13:27 i copied and pasted this from a pdf btw, so there may be a few mistakes in the code. i had to fix a few things myself.
http://www.flaxcottage.com/Misc/Advance ... %20BBC.pdf
page 120
The programs in that book are difficult to transcribe because they are not self-contained, each block of code seems to be modifying something that has gone before. For example listing 6.4 begins as follows, which is meaningless (what happened to line 1510?):

Code: Select all

1500 REM initdims
1520 DIM D(20),Z(4)
1530 ENDPROC
If you want to plot pie-charts I'd suggest you look at the program piechart.bbc supplied (in the examples/graphics/ directory) with every edition of BBC BASIC for SDL 2.0. Note that neither BB4W nor BBCSDL supports hatched patterns for filling graphics objects, at least not straightforwardly.
Actually all I want to do is extract the hatch fill routine from the code. But I need to get it working first. I don't want to do pie charts