HP Forums

Full Version: WP 34s alpha mode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I'm a beginner to programming on HP calculators and had some confusion when I was trying to key in this program:


How are you supposed to key in this part:

"012 [alpha]IP X
013 [alpha] ,
014 [alpha]IP Y
015 [alpha] )"

I can't seem to key in this when it is alpha mode.
These commands are in the X.FCN menu.

- Pauli
OK I got it to work thanks.
An alternative to manually typing in a program with calculator keystrokes is to compile it with the library tools in the wp34s/trunk/tools directory. The 'MIO' program wouldn't be my first choice as an example, since it is already included in the standard flash library, but since you
brought it up I used it as an example of how to compile a .wp34s library source file into a custom RAM image which can be loaded into the emulator or calculator. In this particular example the original listing shown in your link above would not compile because of a couple of typos, but this one does:

001 LBL'MIO'
002 LBL A           //-- Works on entire matrix elements
003 SF 13
004 M-ALL
005 STO I
006 LBL 01        // begin of the loop through the matrix
007 RCL I
008 RCL L
009 M.IJ
010 CL[alpha]            // shows the next element indexes
011 [alpha] (
012 [alpha]IP X
013 [alpha] ,
014 [alpha]IP Y
015 [alpha] )
016 RCL[->]I
018 STO[->]I            // Store element to keep  any change
019 ISG I
020 GTO 01        // End of the loop through the matrix
021 RCL L
022 FS? 13              // Is it B who called LBL A?
023 GTO A               // Cycles through the same matrix
024 LBL B           //-- Works on one chosen matrix element
025 CF 13
026 CL[alpha]
027 [alpha]'R|C'
029 x[<->] Y
030 RCL Z
031 M.REG
032 STO I
033 GTO 01
034 RCL L
035 GTO B               // Cycles through the elements of a matrix

The original listing had "M.ALL" (line 004) instead of "M-ALL" and "x[<>]y" (line 029) instead of "x[<>] Y" so it wouldn't compile.
This version has been corrected to work with the perl library compiler tool.
Using the perl programs in the wp34s/trunk/tools directory you can compile the source file above saved as
wp34s/trunk/tools/mio.wp34s with the following steps:

Create an empty wp34s.dat file by running the emulator and executing P.FCN END then P.FCN CLALL R/S
Exit the emulator, and save the emulator's freshly emptied wp34s.dat to the wp34s/trunk./tools directory

Make sure that the wp34s/trunk/tools directory is listed in your executable PATH environment variable, and from that directory type:
wp34s_lib.pl mio.wp34s -ilib wp34s.dat -f -state

Then put the compiler updated wp34s.dat file back into the directory where your emulator expects to find it.
Start the emulator and you will find the newly compiled 'MIO' program in the program area of RAM.

If you want to copy this compiled program into a physical calculator then establish a serial link between your calculator and emulator, and
execute P.FCN SENDP on the emulator, and P.FCN RECV on the calculator.

I ran the compiler tool as described above and generated a wp34s.dat file. The attached wp34s-mio.zip file contains the above mio.wp34s source, and the compiled wp34s.dat RAM image. You can copy the unzipped wp34s.dat file to your emulator's directory
then run the emulator, and the 'MIO' program will appear in the program area of RAM. The 'MIO' program is also a standard library function in the emulator (included in wp34s-lib.dat file) and can be accessed by the CAT button scrolling through until 'MIO' appears in the display then pressing XEQ. Also if you flash your calculator with any of the "xxxx-full.bin" images then the 'MIO' program will be available in the flash area of the physical calculator as well.

I hope this was helpful, Barry
Pauli's answer was straight to the point.
Yours was above and beyond, answering the next couple of questions before they were encountered.
I'm coming to you two next time I hit the wall.
(03-25-2015 05:15 PM)Den Belillo (Martinez Ca.) Wrote: [ -> ]Your [answer] was above and beyond, answering the next couple of questions before they were encountered.

I agree... thanks Barry! ... and by the way, example typos are one of my pet peeves ( I hate doing it myself, and I really hate it when other people do it ), so when we share we need to pay attention to details and get it right; cause who knows who is up late at night wondering why the 'example' won't compile. thanks again, Barry.

I think these typos are, at least partly, because we changed the command names along the journey.

We had M.ALL at one point and it changed to M-ALL for reasons I no longer remember. We also had x[<>]y as well, although I'm not sure if its lifetime overlapped M.ALL or not -- this one disappeared fairly early in favour of x[<>] Y.

- Pauli
Thanks for this very nice description and explanation. I might put it in a further edition of the manual if you consent.

(04-08-2015 07:08 AM)walter b Wrote: [ -> ]Thanks for this very nice description and explanation. I might put it in a further edition of the manual if you consent.


Use anything you want. I didn't choose the best example, as the "MIO" program is already included in the
expanded flash area, but if that doesn't bother you then use it as it is, or choose a different program to compile. I leave that up to you.
Reference URL's