How/where do constant strings get stored?
Andy Fox
Posts: 46
Have a question here for all the BASIC Stamp experts. I noticed a bit ago that while viewing the memory map layout of my PBASIC 2.0 programs in the BASIC Stamp Editor, I don't see any ASCII strings stored in the EEPROM memory space along with the rest of my program's P-Code, so I'm wondering, where do constant strings like the 'HELLO WORLD' in DEBUG "HELLO WORLD" go? Do the strings get converted to some encrypted format or are they missing from the memory map display?
Comments
If you want to "see" a string, just for poops n' giggles, it may be easier to put a string into a DATA statement -- data gets tokenized at the top of the memory map, program code at the bottom:
If you look at the memory map, the hex bytes at the top of the map (starting at address $000) should be the same as the output of "show_hex".
One of the appendices of the Stamp Manual has the ASCII character chart, which shows ASCII characters and their hex/decimal equivalents.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
I understand that, and that is what I expected, but it does not explain the following program...
...showing up on the memory map as...
Where is "HELLO WORLD"? I don't see it. I see an H and an L. That's all.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
and look for the repeating character.
Then Change it to
Debug "ABACAD"
etc
Thanks. I did this, actually. I did a DEBUG "AAAAAAAAAAAAAAAA" and still was not able to make complete sense of it. Seems there was some sort of repeating pattern every 17 bits, but the pattern of those 17 bits changed every 3 or 4 patterns (and nowhere in those 17 bits was the pattern "01000001", so I couldn't find any reasoning to it. I'm guessing it's some sort of propriatory Parallax format.
I know I can use DATA statements, but that was not my question.