home bbs files messages ]

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,901 of 56,720   
   Erik Struiksma to mspa...@ifiber.tv   
   Re: Embed binary code in Applesoft progr   
   16 Jul 21 03:24:30   
   
   From: eriknoc@gmail.com   
      
   On Thursday, July 15, 2021 at 3:05:10 PM UTC-5, mspa...@ifiber.tv wrote:   
   > The documentation of the Wizard's Toolbox has a detailed description of what   
   is going on with that method (putting binary code between the end of the   
   program and the start of variable space) as did some issue of Open Apple back   
   before it became A2-   
   Central.    
   >    
   > It sort of fell out of favor when Prodos came out as you could just ask   
   Prodos for a buffer. But that trick still works under Prodos too.   
      
   I actually prefer to keep my ML saved in a separate file to BLOAD from.  This   
   way I can pull this for multiple BASIC programs without duplicating the ML   
   each time.  But... if I really wanted to have it all in 1 file without   
   restricting my ML or binary    
   data in any way, I would try doing something like this:   
      
   * ML to set BASIC program start pointer, fix any broken BRUN hooks, and JMP to   
   somewhere to start BASIC program execution.   
   * Your ML routines & binary data   
   * Your BASIC program   
   * BSAVE everything (L$ something like: BASIC end - BASIC start + ML/data   
   length)   
      
   This does restrict you from being able to RUN/LOAD/SAVE filename, but you'll   
   at least be able to BRUN it, and you won't have to worry about BASIC messing   
   up your ML when you edit, nor will it need to be relocatable.  Once the BASIC   
   program start pointer    
   is set, you can RUN, LIST, and edit all you want.  Of course you would have   
   the inconvenience of having to BSAVE each time you want to save your work.    
   You could have a BASIC line to do this for you.  Just keep that line number   
   out of reach of normal    
   program execution, and you would RUN Ln# from the command prompt to save.    
   Either that or go though the trouble of making an ampersand routine if you   
   don't want to see or store a dedicated line for saving in your BASIC program.   
      
   --- 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