http://club100.org/memfiles/index.php?direction=&order=&directory=Steve%20Adolph/creating_embeddedML_basic_programs&;

repaired.   let me know if you see any errors.  thx


On Thu, Sep 19, 2019 at 1:52 PM Dan Higdon <therealh...@gmail.com> wrote:

> 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 <twospru...@gmail.com>
> 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 <twospru...@gmail.com>
>> wrote:
>>
>>> yep like that.
>>>
>>> On Thu, Sep 19, 2019 at 1:38 PM Dan Higdon <therealh...@gmail.com>
>>> 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 <twospru...@gmail.com>
>>>> 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 <therealh...@gmail.com>
>>>>> 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 <ku...@fastmail.com>
>>>>>> 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
>>>>>>>
>>>>>>

Reply via email to