How to read/load a program FROM the BS2 controller TO the editor.
Tom Howe
GuestPosts: 9
This question may have been asked before, if so, please link me to the sovled answer if there is one.
How do I know what program is already in my BS2 controller? Is there a special read or load program I need to write to recall what is already in the BS2? I have not found a way to do this in PBasic 2.5.2 yet.
From what I have been reading, it is just a matter of keeping track yourself or re-complying what you want done. I do keep good backups of the code I have already written, I just curious how someone could do what I am asking. Thanks.
How do I know what program is already in my BS2 controller? Is there a special read or load program I need to write to recall what is already in the BS2? I have not found a way to do this in PBasic 2.5.2 yet.
From what I have been reading, it is just a matter of keeping track yourself or re-complying what you want done. I do keep good backups of the code I have already written, I just curious how someone could do what I am asking. Thanks.
Comments
If you were to read the program from the EEPROM, it still wouldn't help you since the program is in compiled form and all of the labels and variable names are gone. Some of the statements, like those in PBasic 2.5, have been translated into simpler operations, so some of the structure is gone. You would also need to decode the compiled program and there is no documentation available that describes how to do this.
That'll keep you on your toes.
To PJ Allen: If there was more memory available, I would have a debug statement reflect what the program was. I see the "What's a Microcontroller?" manual does this but am a touch resistant to this with just the BS2 chip. Thank you for your idea though!!
That is a very simple command, it really wont take up very much memory. If you haven't, maybe check out the memory map in the editor. it could give you some good perspective.
~Jimmy
I'll take your suggestion up this weekend when I have some time to experiment with different sized debug statements, thanks!!
Alright, I hope it works out! If you have any more questions just let me know!
Good call, PJ. For that matter, if you have lots of extra EEPROM space, your program could initially send (via DEBUG) a text listing of every single line of your BASIC program, or just the tokenized version if you don't want people reading your code. That would allow anyone to duplicate the program. And they'll tell two friends, and so on...
I would like to thank all who replied, it helped steer me in the right direction!!
As a side note. Most of the debug statements I used testing amounts of EEPROM memory use, I average about 30-35 bytes. Since the BS2 has 2K bytes of EEPROM, that's not really a large amount. The RAM of the BS2 is unaffected of course. It is used solely for I/O and variables.
Finally, if someone could please tell me how to change the UNSOLVED to SOLVED in the title to this threat, I would greatly appreciate it! :cool:
Tom