Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp EEPROM Decompiler? — Parallax Forums

Basic Stamp EEPROM Decompiler?

AmnoidAmnoid Posts: 11
edited 2005-03-02 20:43 in BASIC Stamp
Apologies if this has been dealt with in the past- but the forum search does not seem to work.

A student of mine has lost their .bas code and do not want to rewrite it. Is there a way to read the tokenized code off of the stamp (BS1 rev D)?

Comments

  • kb2hapkb2hap Posts: 218
    edited 2005-03-01 23:23
    it has been talked about in the past as far as I know Its not easy and you code will not look like the way you originally wrote it .just the commands. Someone else may be able to tell you more on who does this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DTQ
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-01 23:33
    You're his teacher, right? Make him write it 100 times for NOT wanting to rewrite it (and making it better)·-- just like when my teacher used to make me write on the board "I will not tell jokes in class" ·tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-03-02 01:41
    After decades of programming, and constantly repeating the mantra "Save early, save often." do you think I followed my own advice? Of course not. I'd get on a coding bender and 3 hours later have a system crash wipe everything out. It never failed that the second pass of writing what ever I was working on was always cleaner, shorter, and easier to understand. I've tried to get my bosses, and later clients, to buy off on the development concept of "Write once. Erase. Write again." They never did.

    Jim
  • LarryLarry Posts: 212
    edited 2005-03-02 01:53
    Interesting-

    I have had two professors tell me the same thing. Once was in a creative writing class, and was was in a programming class.

    The second time around, you have a much better idea of what you are trying to do, and what is possible.


    Sometimes it's pretty hard to scrap your first effort, though.
    -Larry

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • The Dead BugThe Dead Bug Posts: 73
    edited 2005-03-02 02:01
    Sometimes it's pretty hard to scrap your first effort, though.
    -Larry

    No problem, the computer will do that for you! [noparse];)[/noparse]

    Seriously, like you, Larry, I had a teacher tell me that "There is no such thing as good writing...only good rewriting." Which is why I usually avoid using this "Quick Reply" button!
    I have students who also don't want to rewrite their code. They don't want to do their homework, read their text, get to class on time, etc. etc. Life's rough! [noparse]:)[/noparse] Tell him (her) that he (she) has our deepest sympathy...

    Bruce

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Name: Bruce Clemens

    Work:· Clemensb@otc.edu
    Good Stuff on my Bolg: http://theDeadBug.journalspace.com
  • m_fabio2m_fabio2 Posts: 49
    edited 2005-03-02 11:23
    I use a windows command called "xcopy" along with the task scheduler. My files are backed at whatever time intervals I want. We also utilize this on our SCADA network to save files to network drives.
    ·
  • AmnoidAmnoid Posts: 11
    edited 2005-03-02 19:21
    Thaks for the input- which I completely agree with. BUT- does this mean that there is no way to read and rebuild the pbasic code from an EEPROM?
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-02 20:43
    IF you were using an OEM kit version of the BS2 (or BS1 for that matter) THEN you could read out the contents of the EEPROM. If you then fed this to a program which could read the byte-codes of PBasic and translate them to equivalent PBasic text, then you could re-generate a program.

    However, this program would have no meaningfull names in it. Any 'constants' defined would be present only as numbers.

    I understand the program to convert byte-codes into source does exist -- but I don't know where.

    IF you have to un-solder the EEPROM from the BS2 module before you do any of this -- then it's probably not worth the effort. The byte-code security of the BS2 is not huge -- but it is effective enough for a device that costs $50 and holds 2K worth of code.
Sign In or Register to comment.