Post Reply 
WP 34s alpha mode
03-25-2015, 02:09 AM
Post: #1
WP 34s alpha mode
Hi,

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

http://www.hpmuseum.org/cgi-sys/cgiwrap/...?read=1102

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.
Find all posts by this user
Quote this message in a reply
03-25-2015, 03:09 AM
Post: #2
RE: WP 34s alpha mode
These commands are in the X.FCN menu.


- Pauli
Find all posts by this user
Quote this message in a reply
03-25-2015, 03:38 AM
Post: #3
RE: WP 34s alpha mode
OK I got it to work thanks.
Find all posts by this user
Quote this message in a reply
03-25-2015, 08:17 AM (This post was last modified: 04-08-2015 07:45 AM by BarryMead.)
Post: #4
RE: WP 34s alpha mode
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:
Code:

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
017 PROMPT
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'
028 PROMPT
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


Attached File(s)
.zip  wp34s-mio.zip (Size: 813 bytes / Downloads: 4)
Find all posts by this user
Quote this message in a reply
03-25-2015, 05:15 PM
Post: #5
RE: WP 34s alpha mode
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.
Find all posts by this user
Quote this message in a reply
04-02-2015, 03:35 AM
Post: #6
RE: WP 34s alpha mode
(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.

marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
04-02-2015, 03:56 AM
Post: #7
RE: WP 34s alpha mode
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
Find all posts by this user
Quote this message in a reply
04-08-2015, 07:08 AM
Post: #8
RE: WP 34s alpha mode
Thanks for this very nice description and explanation. I might put it in a further edition of the manual if you consent.

d:-)
Find all posts by this user
Quote this message in a reply
04-08-2015, 07:13 AM
Post: #9
RE: WP 34s alpha mode
(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.

d:-)

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.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)