Shop OBEX P1 Docs P2 Docs Learn Events
BS2e RUN(0)...RUN(1)...RUN(2) — Parallax Forums

BS2e RUN(0)...RUN(1)...RUN(2)

hmlittle59hmlittle59 Posts: 404
edited 2009-10-29 04:42 in General Discussion
Programming problem:
My program was working well, then I made some changes and now when I hit the button to return to the Main Menu, the Program resets the chip upon return to slot(0). It was acting as tho there was an extra ADDRESS on the STACK. So after a couple of days of trouble shooting(Placing "RETURN's" in until it went back to the Main Menu cleanly), I've found were the problem seems to be........YES the problem was their. I think it was Dave that I talked to at Parallax Tech. Support and he mentioned about variables being all in the same location from Bank(0)...to...Bank(7) but wasn't sure of this problem after I sad they were correct. I forgot that I had changed (Work VAR Word) to (Work VAR BYTE) so that I could add another Variable. But I only did it in Bank(2) and trying to return to Bank(0)/RUN 0 the system would reset and start over if and ONLY if the Program went pass that point. If the program did not go pass that point it would always return PROPERLY.

Things to Remember:

1) Keep Variable Declaration the same....Exactly in the same order...I forgot
2) I was not thinking at the time and needed that extra variable in that Bank()....Always change all
How I found it.(Old C-64 Assembly Language programming, working with the stack)
1) Moved "RETURN" around in the Code until I had a Clean return back to Bank(0)/RUN 0....with no full RESET
2) that line below the "RETURN" had the variable that was out of place compared to the other Banks\

thanks Dave(Tech Support ) for putting that thought in my head
Howard

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'M STILL LEARNING SO MUCH...BUT STILL KNOW SO LITTLE!!!

hmlittle59
Sign In or Register to comment.