41-MCODE: IND/ST/MATH in prompting



#2

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.


#3

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


#4

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


#5

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

#6

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.

#7

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.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Need help understanding math.... cyrille de Brébisson 9 445 12-13-2013, 02:23 AM
Last Post: Didier Lachieze
  WTF? W-here T-o F-ind the original hpmuseum forum? Alexander Oestert 40 1,661 12-05-2013, 01:25 PM
Last Post: Matthias Wehrli
  ARCL ST X on -42S Chris Rob Johnson 8 363 11-26-2013, 12:29 PM
Last Post: Mike Morrow
  HP-41 MCODE: The Last Function - at last! Ángel Martin 0 147 11-08-2013, 05:11 AM
Last Post: Ángel Martin
  OT: a math competition site Pier Aiello 0 131 09-16-2013, 06:03 AM
Last Post: Pier Aiello
  Simple Math Question Namir 2 172 08-09-2013, 06:13 PM
Last Post: Eddie W. Shore
  41-MCODE: Auto XEQ+ALPHA possible? Ángel Martin 5 273 05-29-2013, 06:15 AM
Last Post: Ángel Martin
  HP 41 Mcode related Questions Michael Fehlhammer 4 248 05-10-2013, 07:09 PM
Last Post: Michael Fehlhammer
  Cool math clock Bruce Bergman 28 1,099 04-10-2013, 03:13 AM
Last Post: Siegfried (Austria)
  Math Challenge I could not solve Meindert Kuipers 22 861 01-05-2013, 04:43 PM
Last Post: Thomas Klemm

Forum Jump: