Shop OBEX P1 Docs P2 Docs Learn Events
Hidden BS2 Code — Parallax Forums

Hidden BS2 Code

bluejaybluejay Posts: 131
edited 2012-12-09 01:30 in BASIC Stamp
Whenever there's power in a Stamp, a program code is always running until a new code is written over. Is there a way to see the code that' sstored in the BS2 by using some special keys or keystokes on the keyboard or by using the Debug screen? In other words, how would someone find out what the current code is stored if someone forgot it?
Thanks in advance for a response.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2012-12-08 22:07
    Short answer, No.
    Longer answer No, but if you want to see a hex dump of most of the eprom there is a way to that. This will not get you code you can read though.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-12-08 22:12
    Not really. The Stamp code is stored in the 2K EEPROM that's part of the Stamp module. The code gets loaded at the "top end" of the EEPROM and extends "downwards" towards address zero. There's a statement that can read from this EEPROM ... the READ statement. You can write a small program that dumps most of the EEPROM to the Debug window, but the small program has to be stored in the EEPROM and there's no way to read what's "underneath" this small program. In addition, the exact format of this data (the Stamp program) is not publicly documented anywhere, so you'd have to figure it out. It's very tightly encoded to save space and this makes it hard to decode. Practically speaking, there's no way to find out what current code is stored in the Stamp and you won't get any help from Parallax on this ... it's seen as a feature.
  • bluejaybluejay Posts: 131
    edited 2012-12-08 22:15
    Thanks for the response Mike.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2012-12-09 01:30
    I learned this one the hard way. Best way to resolve is to have a debug statement with at least the program name coming up.
Sign In or Register to comment.