The Museum of HP Calculators

HP Forum Archive 19

 41-MCODE: IND/ST/MATH in promptingMessage #1 Posted by Ángel Martin on 14 Sept 2009, 5:12 a.m. Greetings, I'm looking for information on how's the coding done for prompting functions using the extra options, like IND, ST, IND_ST, and MATH. It's easy for the standard and simple IND cases, but how about the rest? This should be well know to the community but I can't trace the information anywhere - got no VASM listings myself :( 1.- Standard: reg# address in S&X field of A 2a.- IND: (reg# + 80) in S&X field of A 2b.- IND ST 3.- ST (X/Y/Z/T/L...) 5a.- MATH (+/-/*//) 5b.- MATH IND 5c.- MATH IND ST Cheers, ÁM Edited: 14 Sept 2009, 5:27 a.m.

 Re: 41-MCODE: IND/ST/MATH in promptingMessage #2 Posted by Meindert Kuipers on 14 Sept 2009, 2:10 p.m.,in response to message #1 by Ángel Martin Angel, The VASM listings are a must, and they are on the various DVD's. The listing below is from my disassembler and it has the 2 bits of the last words of the function name combined in the prompt variable, hope this helps! ``` case prompt of \$00 : Cmt := ''; // no prompting \$01 : Cmt := 'Prompt: Alpha (null input valid)'; \$02 : Cmt := 'Prompt: 2 digit ST IND IND_ST + - * /'; \$03 : Cmt := 'Prompt: 2 digit or non-null Alpha'; \$11 : Cmt := 'Prompt: 3 digits'; \$12 : Cmt := 'Prompt: 2 digits ST IND IND_ST'; \$13 : Cmt := 'Prompt: 2 digits IND IND_ST non-null Alpha'; \$21 : Cmt := 'Prompt: non-null Alpha'; \$22 : Cmt := 'Prompt: 2 digits IND IND_ST'; \$23 : Cmt := 'Prompt: 2 digits or non-null Alpha'; \$31 : Cmt := 'Prompt: 1 digit IND IND_ST'; \$32 : Cmt := 'Prompt: 2 digits IND IND_ST'; \$33 : Cmt := 'Prompt: 2 digits IND IND_ST non-null Alpha . ..'; ``` Meindert

 Re: 41-MCODE: IND/ST/MATH in promptingMessage #3 Posted by Angel Martin on 14 Sept 2009, 2:29 p.m.,in response to message #2 by Meindert Kuipers Thanks Meindert, sorry I didn' t explain it better but the issue is not with the coding of the function NAMES (using the leftmost bits of the first two function name bytes as per the table you attached) but with the way the actual values are coded when used. For instance. I have not figured out where is the input "IND ST Y" stored when using such a prompt. Not in the S&X field of the A register, which only "knows" about the IND part but not about the ST... mystery or plain ignorance on my part? Likely the latter... Best, 'AM

 Re: 41-MCODE: IND/ST/MATH in promptingMessage #4 Posted by Meindert Kuipers on 15 Sept 2009, 12:12 p.m.,in response to message #3 by Angel Martin That will be more difficult, you will have to look for examples using the various types of prompting. If you have a copy (also on the DVD's) of Ken Emery's famous HP41 M Code For Beginners, there is a nice introduction on page 135 and on which should get you started. Meindert

 Re: 41-MCODE: IND/ST/MATH in promptingMessage #5 Posted by Eric Smith on 15 Sept 2009, 2:30 p.m.,in response to message #3 by Angel Martin Is the A S&X field formatted as a postfix byte? If so, isn't the "ST Y" implicit in the postfix value? If not, how are you finding that "IND" is indicated? If I had to make a wild-ass guess, I'd think that any additional information from prompting might be stored in the "Q" status register. That's where alpha prompting goes, but maybe numeric prompting affects it also.

 Re: 41-MCODE: IND/ST/MATH in promptingMessage #6 Posted by Hĺkan Thörngren on 15 Sept 2009, 4:32 p.m.,in response to message #1 by Ángel Martin A stack argument is stored in the postfix byte of the function, just like numeric registers. Low numbers are for data registers, while higher numbers (112-127) are for stack / status registers. The quick reference card for synthetic programming shows the coding, for example 112 is T register, add 128 for IND T. Math STOre functions are encoded in the prefix byte, postfix bytes works the same as all others.

Go back to the main exhibit hall