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.

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.

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.

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.

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.

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!).

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.