Cool, thanks. I thought I had a handle on how BASIC was storing strings, but I was starting to have doubts. :) It's nice that constant strings seem to be referenced out of the actual source code though, and not copied into the string table. Maybe Bill knew what he was doing after all. :)
On Thu, Sep 19, 2019 at 12:49 PM Stephen Adolph <[email protected]> wrote: > ok the root of the issue is my posted file. I'll fix that tonight. > > On Thu, Sep 19, 2019 at 1:40 PM Stephen Adolph <[email protected]> > wrote: > >> yep like that. >> >> On Thu, Sep 19, 2019 at 1:38 PM Dan Higdon <[email protected]> wrote: >> >>> It was earlier in this thread. >>> I would have thought that the proper code would look more like: >>> >>> 10 a$="your machine code here" >>> 20 a%=varptr(a$): call (peek(a%+1)+256*peek(a%+2)) >>> >>> On Thu, Sep 19, 2019 at 12:33 PM Stephen Adolph <[email protected]> >>> wrote: >>> >>>> yah thats not up to date. where did you get that? >>>> I can post a correction. >>>> >>>> On Thu, Sep 19, 2019 at 1:31 PM Dan Higdon <[email protected]> >>>> wrote: >>>> >>>>> I'm still struggling to understand how this works: >>>>> >>>>> 10 a$="Code in ASCII" >>>>> 20 call varptr(a$) >>>>> >>>>> Doesn't varptr(a$) return the address of the string descriptor, which >>>>> is [len,lo,hi]? Wouldn't you have to synthesize the call address from >>>>> lo+hi*256? >>>>> >>>>> Or is there something magical about how constant strings are stored? >>>>> And how do you relocate the code? Or is the first entry in the string >>>>> table >>>>> a known address, and you just assemble for that position? >>>>> >>>>> Thanks! >>>>> >>>>> On Fri, Sep 13, 2019 at 10:30 AM Kurt McCullum <[email protected]> >>>>> wrote: >>>>> >>>>>> >>>>>> It would appear that Steve already came up with a simple solution to >>>>>> my problem. I just had to find the file "embedding short ML routines in >>>>>> BASIC.txt" >>>>>> >>>>>> 10 a$="Code in ASCII" Zeros not valid but I can work with that. >>>>>> 20 call varptr(a$) >>>>>> >>>>>> Simple solution Steve. My thanks to you for putting that file >>>>>> together. >>>>>> >>>>>> Kurt >>>>>> >>>>>
