[A83] Re: Last free mem byte


[Prev][Next][Index][Thread]

[A83] Re: Last free mem byte




> Van: Tijl Coosemans <tijl@ulyssis.org>
>
> > > On the 83-, free mem starts at (930Dh) and ends at (9311h).
> > >
> > > The 83+'s dev guide has some good information about that, ram
> > > structure and such (chapter 2 page 5).
> >
> > Okay, but that's only true while running an asm program, as since at
> > that moment there isn't any edit-buffer opened. During normal
> > operation (prompt, BASIC editor, etc.) the TIOS allocates all memory
> > for the inputbuffer or program.
> >
> > So with a stay-resident interrupt program things are a bit different.
> >
> > Henk Poley <><
> 
> I've never tested it, but when there's an edit buffer open and you
> calculate the amount of free mem the way you'd otherwise do, I assume
> you get 0000h.

That depends how you calculate it... If you use the 'normal' _memfree call
(HL = amount of free mem) it will first check if there is an inputbuffer
open and if so calculate the free RAM inside the buffer (if I remember
well). Just take a look at the ROM code.

	Henk Poley <><