Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site genrad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!genrad!al From: al@genrad.UUCP (Al Gudaitis) Newsgroups: net.micro.cbm Subject: Re: machine load problem Message-ID: <1218@genrad.UUCP> Date: Mon, 3-Feb-86 18:26:39 EST Article-I.D.: genrad.1218 Posted: Mon Feb 3 18:26:39 1986 Date-Received: Wed, 5-Feb-86 01:25:39 EST References: <2986@ncsu.UUCP> Organization: GenRad, Inc., Bolton, Mass. Lines: 32 > Recently, I discovered a malfunction in my c64. I'm stumped as to what > could be causing it, and would appreciate some help. The story goes like this: > > I turned on my c64 and typed LOAD "PRT",8,1. > > Prt is a simple routine which prints the current screen contents to the > printer. > > The program loaded correctly at $c000. However, the c64 also sets the > end of basic pointers (start of variable space) to the last address loaded, > namely, $c0d4. > > I then typed "10 REM" and hit return, the system prints an OUT OF MEMORY > error, because the basic pointers are corrupt. > There is nothing peculiar about your C64. They ALL have this problem. If one disassembles BASIC in the area of the LOAD command, one discovers that the end of program pointer always gets updated to point to the last memory location loaded, even if it is a machine language program (BASIC makes no distinction). If the program loaded below $A000, the problem usually won't even be noticed though the amount of memory available for variables could be drastically reduced. With program loads above the "normal" top of memory used by BASIC, there will be problems with trying to type in program lines or creating variables because the "end of program" and "variable area" pointers will be in the wrong order which BASIC interprets as an OUT OF MEMORY error. I forget how I came across the problem exactly, but try typing something like: A$="TEST" after your program load and I think you will see the same OUT OF MEMORY message.