[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apple IIe power up issues
On 08/09/2010 03:03 AM, Steve Nickolas wrote:
> Hm. CBM BASIC on the 64 says "38911 BASIC BYTES FREE" and FRE(0) = -26627
> (i.e., 38909). On the Plus/4 (which uses a banked BASIC) it says 60669 for
> 60671 bytes free. Dunno why I thought the wasted RAM was 3 bytes on all
> MSBASIC. (It's 2 bytes on EHBASIC as well.)
It depends on whether you count the one byte "before BASIC RAM proper",
i.e. $0800 on the Apple, as part of BASIC RAM or not. It needs to
contain binary zero for BASIC to work, so one could argue that it is not
free and ought to be counted, or on the other hand, that it is not
actually used for any BASIC content and ought not to be counted.
The other three bytes "wasted" are the end-of-program indicator that
needs to be there at all times (one binary zero for end-of-line and two
binary zeros forming a NULL-valued next-line pointer), either behind the
last line of BASIC, or, if there is no program at all in memory, right
at the beginning of BASIC RAM ($0801, $0802 and $0803 on the Apple).
Their presence is interpreted as an implicit END statement when
execution hits them, so I wouldn't call them actually wasted.
So, the free BASIC RAM on an Apple without any cards after power on is
from $0804 up to $BFFF inclusive - 47100 bytes.
--
Linards Ticmanis