If you want to do it for larger programs, instead of using OPL string extension which is slow, you could call this:
Code: Select all
S$=H$ :V%(1)=ADDR(S$) :V%(2)=A%
When that is translated to OB3, replacing the string of XXXXX... with the hex code in the comment will make a procedure that can stow an arbitrary string of code or data input by H$ anywhere you can point it to by the input A%. The reason for this weird method is that the procedure cannot build itself.
Once you have it transferred to an Organiser pack, it will solve (or in a moment of misguided boredom, cause) some tough problems.
It can replace both POKCNV% and CONV$ when working with machine code in OPL.
If anyone wants to see a full listing of the ASM (and more explanation of why I did it) there's one on my site at lostgallifreyan.org in the software section.