HP Forums
Help with WP32S programming - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Help with WP32S programming (/thread-224372.html)



Help with WP32S programming - Namir - 06-07-2012

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 - fhub - 06-07-2012

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 - Walter B - 06-07-2012

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

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


Re: Help with WP32S programming - Marcus von Cube, Germany - 06-07-2012

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


Re: Help with WP32S programming - Dieter - 06-07-2012

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 - Namir - 06-07-2012

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


Re: Help with WP32S programming - Namir - 06-07-2012

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 - Namir - 06-07-2012

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 - Namir - 06-07-2012

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


Re: Help with WP32S programming - fhub - 06-07-2012

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