[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Memory Use in a ][+? (or how much is left?)
carndt@netcom.com (Chris Arndt) writes:
>I recently revived one of my ][+s for a project. My program moves DOS to
>the language card (David-DOS), loads several (6) binary files and a small
>text file, and waits for input from a card. I would like to add some more
>functions to the program. How can I tell how much memory I have left, as
>I don't want the binaries to overwrite the Applesoft?
Probably the best way is by watching the HIMEM: setting change as the DOS
mover executes. All of the DOS 3.3 movers had to leave at least a page or
two of code and variables at the top of normal RAM (0000-BFFF). In order
to allow Applesoft the extra memory for variables, they have to adjust the
MIMEM: setting when they move DOS, so look up the zero page addresses it's
at (should be two bytes, containing the lowest address in use by DOS, in
the $6X or $7X range somewhere).
Depending on the DOS mover, the adjusted HIMEM: setting is probably either
$BF00 or $BD00 (I seem to remember one of them using almost no memory, and
another leaving more code in main memory for convenience/speed).
Todd Whitesel
toddpw @ ugcs.caltech.edu