With .CO programs, they end up in memory twice: 1) At the top of memory you protected using CLEAR sss,mmmmm command the documentation told you to do, and 2) Stored in the File System area if you see its .CO file in the Menu. BASIC programs (.BA) and document Files (.DO) execute "in place" so there is only one copy of them in memory.
The reason is that the 80C85 processor doesn't have a "jump relative" instruction, so all .CO programs are not "relocatable" and must execute at the memory space they were assembled for, usually at the top of RAM. This is a pain with the assembler as it is about 17K total. Just remember to go to BASIC and do a "CLEAR 256, HIMEM" to release the upper memory copy from RAM when you are through with the assembler. Sometimes I use the CLEAR 256, mmmmm command to reserve the required RAM space and use RUNM to load and run a program from tape into upper memory, without saving the program to the File System. When I want to use it again I can go to BASIC and use the CALL xxxxx command to re-execute it. (xxxxx = programs entry address). This saves RAM space, but if you have a crash with your newly assembled program, which is pretty likely, it will take time to re-load the assembler from tape again. And I avoid using the CLEAR command until I am done with the .CO program. Regards, Peter ------------------------------ > > Message: 2 > Date: Thu, 29 Apr 2021 10:35:10 -0400 > From: Charles Hudson <clh...@gmail.com> > To: m100@lists.bitchin100.com > Subject: [M100] Memory release question > Message-ID: > <CAAbv= > ma9b6zlu-+b7jwwomfb2cvrvjj5nj1n3ze0tsgobdv...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > As noted, got the Model 100 assembler / debugger recently. Installed on a > Model 102 which has 32k and which, before installation, reported 28k free. > Only 1 .BA program beside the standard applications. > > Loaded ZBGASM from tape and saved it to memory, after which the free memory > was about 7k. I thought that was a big chunk as the manual says the > assembler occupies about 8.5k. But it was in memory and I was able to > invoke it from the menu so I proceeded to enter a sample program from the > manual, assemble and run it, filling the screen with character 0FFH. > > Adding the sample program, SAMPLE.DO, and executable, SAMPLE.CO, didn't > seem to reduce available memory much: still at 7K. I deleted ("KILL"ed > from BASIC) the two samples and the ZBGASM.CO files and was left with > about > 15K free memory. Hmmm.... > > So I went back into BASIC and entered NEW (no change) CLEAR (no change) and > tried hitting the reset button (no change). As far as I can tell I have > something occupying about 12k of memory that the system can't dislodge. I > suppose I could remove all power and turn off the memory backup but I'd > rather think there is another way around this. And I'd like to figure out > what I'm doing to cause this memory "hole". > > I would appreciate any suggestions for figuring out how to remove it and > restore max memory. > Thanks, > -CH- > > <snip>