Re: [M100] TPDD checksum

2019-09-19 Thread John R. Hogerhuis
On Thu, Sep 19, 2019 at 9:36 PM Bill Nobel wrote: > I should also note an observation I’ve had with my code. I’m going from > the Teensy to a Max3232 to the T-102. Even with power off on the 102 I > receive garbage on the port. My code seems to catch all the preambles > though to start a

Re: [M100] TPDD checksum

2019-09-19 Thread Bill Nobel
I should also note an observation I’ve had with my code. I’m going from the Teensy to a Max3232 to the T-102. Even with power off on the 102 I receive garbage on the port. My code seems to catch all the preambles though to start a packet. Code is starting to get larger so I’m going to post a

Re: [M100] TPDD checksum

2019-09-19 Thread Bill Nobel
Hi John, yes I receive 2 packets fine (with response) then things go strange only on checksum. Your C# routine is different from DLPlus for the Calc, I’ll try that in the morning and see if that changes. Sent from my iPhone > On Sep 19, 2019, at 9:58 PM, John R. Hogerhuis wrote: > > Are you

Re: [M100] TPDD checksum

2019-09-19 Thread John R. Hogerhuis
Are you sure you got a full, aligned packet? It starts with ZZ , counted length, no missing characters? The DLPlus checksum is correct. More likely you're misaligned, or somehow dropped, swapped, or corrupted a character. Here is the C# code too for comparison public byte

[M100] TPDD checksum

2019-09-19 Thread Bill Nobel
Hey guys, not posted much but have to ask. I am doing a TPDD server on a Teensy 3.6 using the internal SD and a touch LCD. Problem I am having is with checksums. I receive the initial 2 sequences fine with checksums, but on the moment of directory request I get a bad checksum coming from

Re: [M100] compact embedded ML coding

2019-09-19 Thread Stephen Adolph
http://club100.org/memfiles/index.php?direction===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 wrote: > Cool, thanks. I thought I had a handle on how BASIC was storing strings, > but I was

Re: [M100] compact embedded ML coding

2019-09-19 Thread Dan Higdon
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,

Re: [M100] compact embedded ML coding

2019-09-19 Thread Stephen Adolph
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 wrote: > yep like that. > > On Thu, Sep 19, 2019 at 1:38 PM Dan Higdon wrote: > >> It was earlier in this thread. >> I would have thought that the proper code would look more

Re: [M100] compact embedded ML coding

2019-09-19 Thread Stephen Adolph
yep like that. On Thu, Sep 19, 2019 at 1:38 PM Dan Higdon 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

Re: [M100] compact embedded ML coding

2019-09-19 Thread Dan Higdon
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 wrote: > yah thats not up to date. where did you get that? > I can

Re: [M100] compact embedded ML coding

2019-09-19 Thread Stephen Adolph
If you got this from my personal directory, I will post a correction later today. On Thu, Sep 19, 2019 at 1:33 PM Stephen Adolph 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 wrote: > >> I'm still

Re: [M100] compact embedded ML coding

2019-09-19 Thread Stephen Adolph
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 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,

Re: [M100] compact embedded ML coding

2019-09-19 Thread Dan Higdon
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