The Museum of HP Calculators

HP Forum Archive 07

[ Return to Index | Top of Index ]

HP-49G Debugging
Message #1 Posted by Karl-Ludwig Butte on 21 Jan 2002, 6:27 a.m.

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.

      
Re: HP-49G Debugging
Message #2 Posted by Vieira, Luiz C. (Brazil) on 21 Jan 2002, 7:27 a.m.,
in response to message #1 by Karl-Ludwig Butte

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.

            
Re: HP-49G Debugging
Message #3 Posted by Karl-Ludwig Butte on 22 Jan 2002, 4:23 a.m.,
in response to message #2 by Vieira, Luiz C. (Brazil)

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.

                  
Re: HP-49G Debugging
Message #4 Posted by Vieira, Luiz C. (Brazil) on 22 Jan 2002, 7:15 p.m.,
in response to message #3 by Karl-Ludwig Butte

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.

                        
Re: HP-49G Debugging
Message #5 Posted by Karl-Ludwig Butte on 14 Feb 2002, 5:47 a.m.,
in response to message #4 by Vieira, Luiz C. (Brazil)

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


[ Return to Index | Top of Index ]

Go back to the main exhibit hall