HP-49G Debugging



#3

Hello,

I tried to single step through an easy program on the HP-49 but alas didn't succed. First I loaded the "run & debug" menu, then I typed in the name of the program and pressed F1 (debug). The program started with an INFORM and after entering the values and pressing OK the rest of the program was executed never giving me the chance to single step through it. What did I wrong and what is the difference between STEP, STEP down-arrow, and NEXT ? Any hint will be very much aprreciated - thank you in advance.


#4

Hi;

Instead of [OK], you should use [SST]. I am not sure right now, but I think INFORM would not force the running condition, unless the INFORM is in a 'subroutine'. That lead us to the difference between [SST] and [SSTv].

When stepping into a program, any user-defined call will be treated as an internal call, say, if you have a programm named AUX and you execute [SST] for having AUX as the next step, AUX will be evaluated completely. If you want to step through AUX, you first use [SSTv] and then you step through AUX with [SST]. If you are in doubt about which to use, both have the same action for internal commands/functions.

That also leads us to other question: If I am using [SST], how will I know when to use [SSTv]? You would have to know which is the [NEXT] command - see? - without executing it. So, you press [NEXT] (the softkey [NEXT] is different of the keyboard [NEXT]!!!) to see what is the next instruction. Most of the times, the two next instructions will appear, but you may have access to only one next instruction.

I believe this is all. I still cannot understand why is the program running free after INFORM, unless it is in another programm called by the one you are debbuging. Please, check it and post the results OR the (even partial) listings.

Cheers.


#5

Hi,

thank you very much for your answer. The explanations were very good. Alas, the problem, debugging my test program, didn't work, yet. So here's the listing:
«
"PLEASE ENTER" @Put INFORM paramters on stack
{{"K" "" 0} {"T" "" 0}}
DUP DUP
INFORM @perform INFORM
DROP @throw return code away
-> TAB @store INFORM result
«
'TAB' 1 GET @GET first value from list
'TAB' 2 GET @GET second value from list
»
»

When INFORM is processed, the debug menu is replaced by the INFORM menu (OK, CANCEL, etc.). Although I can load the debug menu, the HP-49 doesn't accept them and protests with a beep.


#6

Hi, Ludwig.

I loaded your program in the calc this way:

« "PLEASE ENTER"     @Put INFORM paramters on stack
{{"K" "" 0} {"T" "" 0}}
{ } @ I added this cause it seems it's missing
DUP
DUP
INFORM @ perform INFORM
DROP @throw return code away
-> TAB @store INFORM result
« 'TAB' 1 GET @GET first value from list
'TAB' 2 GET @GET second value from list
»
»
It worked fine. I stored as PG1, entered it's name in the stack ('PG1'), activated RUN/DEBUG menu and pressed [DEBUG] softkey. After a few [SST], I entered 45 [down-arrow] 12 [OK] [OK] (I had to press [OK] twice, I don't know why). The RUN/DEBUG softkeys ([DEBUG],[SST], etc) became available again and I could step through the program.

I did not place it in the 48 to see what happens, but it seems fine to me. If you need/want something more specific, feel free sending me an e-mail.

Regards.


#7

Hi Luiz,

thank you very much for your response and sorry for the late answer. So my mistake was to leave out th '' around the program name. I tried it out and it worked fine. Thanks again.

Regards


Possibly Related Threads…
Thread Author Replies Views Last Post
  [prime] Insert a breakpoint in a program for debugging ? Olivier Lecluse 3 1,744 11-09-2013, 09:41 PM
Last Post: Joseph Ec
  Re: Porting 49G Programs to 49G+/50G Les Wright 0 762 02-21-2007, 10:16 AM
Last Post: Les Wright
  Porting 49G Programs to 49G+/50G Les Wright 6 2,030 02-20-2007, 06:27 PM
Last Post: Tim Wessman
  TI-57 Emulator for HP-48S/SX/G/G+/GX, HP-49G and HP-49G+ is finished HrastProgrammer 9 2,654 01-17-2006, 12:57 AM
Last Post: HrastProgrammer
  HP 49G vs. HP 49G+ Prices Ed Look 5 1,550 10-24-2003, 12:43 AM
Last Post: Ed Look
  HP 49G Keyboard and future HP 49g's Nick Nicholas 1 909 05-31-2003, 10:26 AM
Last Post: R Lion

Forum Jump: