T.R | Title | User | Personal Name | Date | Lines |
---|
2245.1 | wild guess | GUCCI::HERB | | Wed Feb 15 1989 20:20 | 7 |
| I have a 1 meg A500 and when I load up basic it says something like
700000 bytes free in system,25000 bytes free in basic. Is 25000
bytes all you can have in basic? Is his program more than 25000
bytes?
Matt
|
2245.2 | | BAGELS::BRANNON | Dave Brannon | Wed Feb 15 1989 20:35 | 5 |
| It's been a long while since I tried it, but I believe if you
look for the description of the CLEAR command you will see
an option for telling basic how much memory it can use.
-dave
|
2245.3 | | GUCCI::HERB | | Wed Feb 15 1989 20:46 | 4 |
| The Fre command tells you how much memory is availible.
Matt
|
2245.4 | Maybe you need more stack | VCSESU::MOORE | Tom Moore MRO1-3/SL1 297-5224 | Wed Feb 15 1989 21:02 | 5 |
| We had a program like that that we got out of Compute Magazine. You had to
start basic, ask for more stack or something like that and then load the
program. I'll look it up when I get a chance (if someone else doesn't beat me
to it).
-Tom-
|
2245.5 | | WJG::GUINEAU | | Thu Feb 16 1989 07:48 | 33 |
|
Tried stack out of Amiga experience. No luck.
Then remembered something about the CLEAR command. Sure enough:
AmigaBASIC has 3 memory areas it deals with:
STACK - for gosubs etc..
DATA SEGMENT - For program and it's variables
HEAP - Shared with whole system
so
CLEAR [,[data-segment-size][,heap]]
is the command to set these areas.
The default is 25000 data segment bytes. Jeff's program was apparently
bigger than that when he started allocating variables. so
CLEAR ,30000
Fixed this.
FRE(-1) returns remaining size of stack
FRE(-2) returns size of heap
FRE(anything else) returns remaining size of data segment.
You can put CLEAR ,30000 as the first lin in a program (he did). Then use
the FRE() statement to keep tabs...
John
|