Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.sys.apple2    |    Discussion about Apple II micros    |    56,720 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 54,906 of 56,720    |
|    Erik Struiksma to All    |
|    Re: Embed binary code in Applesoft progr    |
|    16 Jul 21 19:05:49    |
      From: eriknoc@gmail.com              I guess the complexity of how you handle this depends on what the needs of       your code is. You would have to weigh the pros and cons of each method and       decide for yourself what's best for each case.              If your code is completely relocatable and doesn't need direct access to parts       of itself (or data), then sure, sticking it between your program end and LOMEM       would make sense. But if your code does need direct access to itself or it's       data, then you can'       t have that just floating up and down in memory... at least, not without some       overhead code. So if were sticking to wanting to use SAVE/LOAD/RUN filename,       here's a couple more ideas I could think of.              You could have some additional code that's relocatable for initialization that       would recalculate and rewrite each place with any kind of absolute addressing       reference by using indirect ZP addressing.              Here's my other idea. For program execution, you would have your ML code and       data located above HIMEM. Before you SAVE, you would need to temporally       adjust LOMEM and copy of your code/data down to the end of your BASIC       program. Once you SAVE, then you        can restore LOMEM back. After you LOAD your program, you would need to copy       the code/data at the end of your program back up and adjust LOMEM and HIMEM       accordingly.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca