Post Reply 
WP 34s alpha mode
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: 5)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
WP 34s alpha mode - bcode - 03-25-2015, 02:09 AM
RE: WP 34s alpha mode - Paul Dale - 03-25-2015, 03:09 AM
RE: WP 34s alpha mode - bcode - 03-25-2015, 03:38 AM
RE: WP 34s alpha mode - BarryMead - 03-25-2015 08:17 AM
RE: WP 34s alpha mode - walter b - 04-08-2015, 07:08 AM
RE: WP 34s alpha mode - BarryMead - 04-08-2015, 07:13 AM
RE: WP 34s alpha mode - d b - 03-25-2015, 05:15 PM
RE: WP 34s alpha mode - MarkHaysHarris777 - 04-02-2015, 03:35 AM
RE: WP 34s alpha mode - Paul Dale - 04-02-2015, 03:56 AM



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