The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Help with WP32S programming
Message #1 Posted by Namir on 7 June 2012, 12:47 p.m.

Hello All,

How do I create an Alpha string that concatenates values from a memory register or from the stack? For example if I wan to prompt for the elements of an array X() using an index in a memory register or the X register. How do I generate prompts like:

X(1)?
X(2)?
X(3)?

My main focus is the numeric values in the above prompts. I know how to access the characters (,), and ?

Thanks!

Namir

      
Re: Help with WP32S programming
Message #2 Posted by fhub on 7 June 2012, 1:04 p.m.,
in response to message #1 by Namir

Hi Namir,

it's the command "[alpha]IP X" which takes the integer part of X and appends it to the alpha register. And instead of X you can use any other register.

BTW, WP32S? So you have a 'special' version? ;-)

Franz

            
Re: Help with WP32S programming
Message #3 Posted by Namir on 7 June 2012, 3:27 p.m.,
in response to message #2 by fhub

That's right ... I meant the TI-32S emulator.

                  
Re: Help with WP32S programming
Message #4 Posted by Namir on 7 June 2012, 5:22 p.m.,
in response to message #3 by Namir

Oooops the cat is out of the bag. The TI32S is customized TI-NSpire brought to you by the same WP34S folks!!

:-)

I should have used this info on April 1!!!!

:-/

Namir

                        
Re: Help with WP32S programming
Message #5 Posted by fhub on 7 June 2012, 5:37 p.m.,
in response to message #4 by Namir

I knew that you had just for forgotton a ;-) smiley in your previous post!
Everything else would even have confused me more ... ;-)

BTW, have you seen my new skin for the TI-Nspire emulator? Looks like the good old HP-28S.

Franz

Edited: 7 June 2012, 5:44 p.m. after one or more responses were posted

      
Re: Help with WP32S programming
Message #6 Posted by Walter B on 7 June 2012, 1:05 p.m.,
in response to message #1 by Namir

Please look at pp. 54f and 89f :-)

Edited: 7 June 2012, 1:06 p.m.

            
Re: Help with WP32S programming
Message #7 Posted by Namir on 7 June 2012, 5:20 p.m.,
in response to message #6 by Walter B

Thanks Walter. I am focusing on programming with the WP34S. Since hands on programming is a good way to know the machine, I am starting with simple root-seeking programs that involve prompting the user for values and displaying alpha tags with the results. My question is direct for the next set of programs that prompt users for elements of arrays.

Namir

      
Re: Help with WP32S programming
Message #8 Posted by Marcus von Cube, Germany on 7 June 2012, 2:14 p.m.,
in response to message #1 by Namir

Namir, have a look at the matrix editor 'MED' I wrote for the library. It plays some more tricks. :-)

      
Re: Help with WP32S programming
Message #9 Posted by Dieter on 7 June 2012, 3:14 p.m.,
in response to message #1 by Namir

Namir, the 34s manual contains a complete map of the alpha keyboard, as well as the contents of the various alpha catalogs containing even more special characters. The desired prompts can be generated easily. Left and right parantheses are printed in gold and blue below the X<>Y key, so you simply type [f] resp. [g] [X<>Y].

In general, numbers can be appended with the alphaRC# command (which works essentially the same way as ARCL on the 41/42). You will find this and other alpha-related commands in the X.FCN catalogue. During alpha entry, only the relevant alpha command are listed there, so you will find them easily.

Appending an integer stored in, say, R01, without trailing decimals would usually require a sequence like FIX 0, alphaRC# 01, and a final FIX 4 (or ALL 03) to restore the display mode. That's why the 42s has this AIP function that appends the integer portion of X without decimal marker, thousands separators and, most important, without trailing zeroes. The 34s can do this as well, even with any register: alphaIP 01 appends the integer portion of the value stored in R01.

All this sums up to the following procedure, assuming the index number 3 is stored in R01.

Keys             comment              display
-----------------------------------------------------------
[3] [STO] [0][1] set index to "3"
[f] [ENTER]      enter Alpha mode
[h] [<-]         clear alpha           (blank)
[.]              letter X              X
[f] [X<>Y]       left paranthesis      X(
[h] [X.FCN]                            VERS (or other command)
[v][v]...        press "down" key
                 until you see...      alphaIP
[ENTER]          select command        alphaIP _
[0][1]           append R01            X(3
[g] [X<>Y]       right paranthesis     X(3)
[h] [v]          h down appends "?"    X(3)?
Since in program mode multiple characters can be entered on a single line (press [f] [ENTER] twice), the final listing may look like this:
0050 ...
0051 alpha"X("
0052 alphaIP 01
0053 alpha ")?"
0054 PROMPT
0056 ...
Dieter
            
Re: Help with WP32S programming
Message #10 Posted by Namir on 7 June 2012, 5:25 p.m.,
in response to message #9 by Dieter

Thanks Dieter!! I am a die hard HP-41C programmer so I need to tweak my knowledge when it comes to this new and beautiful machine!

I am glad you can do the parentheses with ease, instead of having to use the <> characters with the HP-41C.

Namir


[ Return to Index | Top of Index ]

Go back to the main exhibit hall