The Museum of HP Calculators

HP Forum Archive 06

[ Return to Index | Top of Index ]

About "Lastx" on HP41??
Message #1 Posted by Gobin on 23 Sept 2001, 6:53 p.m.

Is the lastx function on the 41cx equivalent to the lastarg on the GX? Thanks in advance

      
Re: About "Lastx" on HP41??
Message #2 Posted by Vieira, Luiz C. (Brazil) on 23 Sept 2001, 9:18 p.m.,
in response to message #1 by Gobin

LASTARG brings back to the stack ALL ARGUMENTS USED AND REMOVED BY LAST OPERATION. This makes LASTARG an equivalent operation, but Lastx works only with X-register contents. Lifting the stack will always happens with LASTARG, cause there is no need to preserve the topmost argument and there is no stack-lift disabling commands in the 48.

Besides the number of arguments managed by LASTARG, MODES menu allows enabling and disabling this (and other) features anytime. The major disadvantage on disabling LASTARG is that error recovering will be somewhat limited.

If there is anything else you need, e-mail again. Hope this helps.

Best regards.

            
Re: About "Lastx" on HP41??
Message #3 Posted by Gobin on 23 Sept 2001, 9:45 p.m.,
in response to message #2 by Vieira, Luiz C. (Brazil)

I have a program in my 41cx that i am trying to convert to the 48gx. so wherever i see lastx, could i replace it with lastarg?

thank you.

                  
Re: About "Lastx" on HP41??
Message #4 Posted by Vieiral, Luiz C. on 23 Sept 2001, 10:04 p.m.,
in response to message #3 by Gobin

Only if the operation before Lastx is a one-number function, like 1/x, SIN, e^x, or if it uses and changes X-register contents, like CLX (unusual, but valid). In these cases, LASTARG will bring the previous Level 1 argument, and the procedure will work fine. Otherwise, LASTARG can fill-in levels 1, 2 and even 3, if previous command removes them. As an example, try filling the stack with, say, 5 different arguments (numbers, lists, programs, etc.). Press LEAR and than LASTARG. See? All of them are back. If you try CLST in the HP41, LastX will bring the last X-register value used by a modifying function. CLST does not update or clear Lastx register.

It is much important being aware of these facts when translating programs from the HP41 to the HP48 (this is the English-version of the title of my book, "Da HP41 para a HP48", written in Portuguese and edited in Brazil, only). Anyway, I can try helping you with specific topics, if needed.

E-mail me.

                        
Re: About "Lastx" on HP41?? (previous have mistypo data)
Message #5 Posted by Vieira, Luiz C. (Brazil) on 23 Sept 2001, 10:08 p.m.,
in response to message #4 by Vieiral, Luiz C.

Only if the operation before Lastx is a one-number function, like 1/x, SIN, e^x, or if it uses and changes X-register contents, unlike CLX (unusual, but valid). In these cases, LASTARG will bring the previous Level 1 argument, and the procedure will work fine. Otherwise, LASTARG can fill-in levels 1, 2 and even 3, if previous command removes them. As an example, try filling the stack with, say, 5 different arguments (numbers, lists, programs, etc.). Press CLEAR and than LASTARG. See? All of them are back. If you try CLST in the HP41, LastX will bring the last X-register value used by a modifying function. CLST does not update or clear Lastx register.

It is much important being aware of these facts when translating programs from the HP41 to the HP48 (this is the English-version of the title of my book, "Da HP41 para a HP48", written in Portuguese and edited in Brazil, only). Anyway, I can try helping you with specific topics, if needed.

E-mail me.

                        
Re: About "Lastx" on HP41?? - ERROR
Message #6 Posted by Vieira, Luiz C on 23 Sept 2001, 10:15 p.m.,
in response to message #4 by Vieiral, Luiz C.

I have used a bad example this time. CLEAR does not save arguments, as CLST and CLX in the HP41. Only functions and commands save arguments. Try a simple + with two numbers and LASTARG will bring both back.

Sorry for the confusing example.

                  
Re: About "Lastx" on HP41??
Message #7 Posted by Vieira, Luiz C. (Brazil) on 23 Sept 2001, 10:44 p.m.,
in response to message #3 by Gobin

I forgot placing my e-mail address.

About the confusion, there is another error-recovering feature available in the previous 48S/SX that was LAST-STACK. I sometimes have to test for checking which arguments will LASTARG bring back to the stack, cause LAST-STACK is not the same as LASTARG.

Flag -55 controls whether or not arguments will be saved by commands in the HP48G.

                        
Re: About "Lastx" on HP41??
Message #8 Posted by gobin on 23 Sept 2001, 10:48 p.m.,
in response to message #7 by Vieira, Luiz C. (Brazil)

thanks for taking the time. gobin

                              
Re: About "Lastx" on HP41??
Message #9 Posted by Raymond Hellstern on 24 Sept 2001, 10:47 a.m.,
in response to message #8 by gobin

Hi,

you could even do it the 'hard' way: Install the HP-41 emulator for the HP-48G series, and run your HP-41 programs from inside the emulator...

Regards,

Raymond

      
Re: About "Lastx" on HP41??
Message #10 Posted by Joe Panico on 24 Sept 2001, 2:37 p.m.,
in response to message #1 by Gobin

Gobin,

And another way (an array of "ways" being the curse of all programming efforts) is to use the vectored input feature. This feature allows you to by-pass the normal ENTER input parsing for one you design yourself. The disadvantage is that it's a slow feature. I don't use it myself, so you need to consult your manual for details that I'm sure to omit if I try to post from memory (my memory!).

Joe

            
HP-71B KEYBOARD IS Directive
Message #11 Posted by Vassilis Prevelakis on 25 Sept 2001, 12:27 a.m.,
in response to message #10 by Joe Panico

I am trying to find the LEX file that provides the KEYBOARD IS command for the HP-71B. The file in the hpmuseum ftp site (ftp://ftp.hpmuseum.com/lif/swap/chhu06/keyboard.l71) does not appear to work. It messes up the HP-71B so bad, that only a hard memory lost will fix it (INIT 3).

Does anyone have this LEX file or a procedure that allows external (HP-IL) devices to act as HP-71B keyboard.

Thanks

**vp


[ Return to Index | Top of Index ]

Go back to the main exhibit hall