[net.micro.cbm] problems loading programs into $C000

al@genrad.UUCP (Al Gudaitis) (07/06/84)

A stupid decision on the part of Commodore is the cause of problems when
loading machine language programs (especially when you put it into memory
above BASIC).  The BASIC load routine always ends by setting the pointer to
the beginning of variable space to the address returned by the KERNAL (sic)
load routine (which is the 1st address above the code you have loaded).  If
you had loaded a BASIC program, that is exactly what you would have wanted to
happen but it wreaks havoc with machine language program loads.  If you try to
do anything with strings on the command line, for instance, BASIC will find
that there is no more room between the top of its working memory and the
beginning of variable space and give you an out-of-memory error.  To clear
this condition you have to type, NEW, or load in a BASIC program which will
put the variable space pointer back where it belongs.  I think I would not
have altered BASIC pointers when doing a non-relocatable load if I were
writing BASIC.  I also wonder if machine language loads not followed by NEW
could be the reason why some people have problems with the @0: (save-and-
replace) command.  I still have not had any problems with that command.

				Al Gudaitis
				decvax!genrad!al