On Fri, Apr 21, 2017 at 12:38 PM, Lee Olivares <l...@braains.net> wrote:
> Definitely saw that link and once I got over the hump of actually > transferring the CO file using TEENY or SXM.BA it got me further than I > was for sure. > > So I guess I understand how loadm works, once the CO file exists in file > storage RAM, loadm copies into work RAM and spits out the load points. > > Once it's copied to work RAM you have to reserve that memory by CLEARing > to the start (Top) address to actually execute it. > > Actually, first CLEAR and then LOADM. LOADM'ing first is technically an error. But, the nice thing about that error is it gives you a clue what you need to clear. > Cool, got it, now how do you "unload" something? Just load on top and do > an appropriate clear? > > Generally you don't need to do anything. If you need the memory back from the CLEAR for something else (for other files, or a different CO program), you do a new CLEAR command. If you usually keep, say TEENY loaded, you can go one step further: CLEAR and LOADM it once, then delete the original file and replace it with a tiny trigger file instead. The reason for that is to not use the memory twice (once for the RAM file, and once for the loaded instance). > Final clarification, I notice some apps in warm.ba have clear256,XXXXX, > and others have clear0,XXXXX, and I suppose the runm lines without loadm > are for ROM based apps like xtel? > > The first parameter to CLEAR is to reserve string memory for BASIC programs. It's unrelated to running CO files. There's one other kind of memory allocation, file control buffers. There's a different command for that MAXFILES. If you don't reserve enough string space some BASIC programs could fail or run really slow due to hitting time consuming garbage collection more frequently. > PS, Is it accurate that XTEL is only available in the Booster Pak? > > Yes. It would be nice to extract it and make it compatible with REX. Maybe include the flow control feature and unicode translation demonstrated by HTERM. -- John.