converting 41 program to Palm OS


Which programming language would I use to convert a 41 program to run on a PDA using Palm OS? Do I have options? What is pro and con of each, if so? Thanks.


You might try MathU Pro at
It's a programmable RPN calculator. It should do all you need it to.


for $35 im not impressed. it looks like a hp but is far from it. here are some immediate observations:

(1) f & g are silly on a silk screen.
(2) it doesnt calculate properly, eg 2+.2+.2+.2+.2+.2-3 isnt zero. no proper calculator would get this wrong.
(3) large trig arguments go wrong, eg sin 36e30 isnt zero. it is on all hps because they mod 360 properly.
(4) -27^1/3 is an error, this a lame.

there's a coconut hp41 emulator for the palm thats free, but no fancy graphics. this emulates the real thing.


Maybe you can try p41cx from palmgear. It has a compiler for turning text files into 41 programs.


I think there is some misunderstanding. I'm not looking for a 41 emulator for OS. I'm asking how I can take my program, now worked out on the 41, and make it available to OS users, who know nothing about HP programmables. What language is being used for handhelds? Thanks.


You will need to re-write your program in another *totally different* language, for example, C, Pascal, Assembler (68000 or Arm), Basic, Java.

Even your logic will need to be re-writed, as those languages aren't even similar of the 41 keystroke programming.

If I where you, I'll stick with some emulator to preserve your work, or re-do all if it in another language from scratch.

Just my 2¢

Good luck!



yes indeed. i do all my palm programming in C. there are however, some other more friendly environments java etc.

i cross compile all my C once ive debugged as much logic as possible before it hits the palm. most of the palm world is still emitting m68k. thats because, to my surprise, its not so easy to build an ARM code app with this current OS (v5).

good luck.


C is the most commonly use language for writing Palm OS applications and probably the best at the moment, imho. The other ones out their either give you no advantage over C (they make you follow the the C API too closely) or force large and slow runtime libraries on you. As to which ones best suits your needs, you'll have to tell us what your program does first and what sort of user interface it needs.


This program goes one step beyond EOQ. Let's say you've established your order quantity at a given price, but then your vendor or a competitive vendor approaches you with a deal of a lower price but you have to order in larger quantities. It then becomes a decision, depending on the parameters, do you want to invest in more inventory in order to enjoy the lower price. This decision process primarily involves items THAT WILL DEFINITELY be used, not items like clothes that may have to be discounted. Usually the decision boils down to: Does the return produced by the lower price justify the INCEMENTAL investment. There are nine variables to the problem, with six given variables and three to solve for, depending on how you, the purchasing agent, wishes to approach it. I.e., do you want to solve for new price, P2, new quantity, Q2, or return on incremental investment, ROII?
This program has been done in Lotus and Quattro Pro macros, DOS, and both the 41 and 19BII. But DOS is now kaput and the other two modes are too limited for general use. I want a purchasing agent AND the salesman to have this program available as a handy PDA application. However, I am not a programmer. I did fine with the 41, and some programs were fairly complicated, and Lotus macros presented no problem but I flamed out with Virtual Basic, which it's my understanding, is used for Excel macros. But if you're using Excel, you don't even need a macro but it would be convenient. So, now C looks to be the best approach but I cannot invest the time to become proficient in C for a limited amount of production. I will farm it out at a local college. I have a couple other decision-making programs that need to be programmed as well. I appreciate your help.


hi jim,

if your problem could be built as a spreadsheet, this might be a good way. it would also make it easy to customise and so on. there are several pda spreadsheet apps on the market and some are quite good.

one thing tho' is that your problem sounds a lot like linear optimisation and it might be that your original spreadsheets used solvers for this kind of problem on lotus/excell. i'd be surprised if pda spreadsheets could do this.

nevertheless it might be worth checking out.

best of luck.


I wonder if you could post the problem and the original 41 program. May be even get Dave to put it in the library. That way people can look at it and suggest solution on the PDA.


Chan, I like your suggestion. I've never done this but I like the idea because I have another program that is rather comprehensive but highly helpful to people who are trying to plan for retirement. It consists of 7 variables and all boils down to how much you will receive when you retire, based on 7 inputs. This also would be an excellent app for OS or Excel. I now have it on my 19BII and Excel and it works great so I will have to write a -41 program and submit it to Dave. I now have a Windows emulator for my -41 that I like a lot. I will use that because the memory requirements will be large.

Since I've never done this, can you give me some guidelines on how I go about this. Thanks.

Also, how hard is C to learn? How does it compare to Visual BASIC in terms of difficulty? Is it imaginable that someone of limited programming affinity could learn enough to write simple programs like these?


Hugh, you are correct. The program is a form of linear optimization; however, you don't have to resort to a solver type mode to find P2, Q2 or ROII. These can be solved algebraically. But Q2 is the most difficult and actually boils down to a quadratic equation. Well, as you know, a quadratic can also be solved algebraically, although difficult to minipulate. With the 41 that has iterative features, you can ask it to loop until...and that is about as easy as solving the quadratic.

But you're right, without a macro the Excel app on a PDA, you would have to "hunt" manually for a value in order to optimize some stipulated null. This would appear awkward for someone who was in a hurry. So then this brings in the idea of say, C, language that would enable the program to loop and because the equations are straightforward, it would execute instantaneously, whereas with a program like this for a -41, the looping would take time, depending on how finely you incremented your decision variable. There is a trick to the looping and incrementing process where the loop decision error is cut in half with each loop or use some kind of exponent theme where the error gets smaller with each loop until a "null" is found.

I really think it should be offered both ways on one CD-ROM: for those who have an IPAQ or AXIM and those who use OS.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Writing RPL programs on OS X Sean Freeman 18 3,730 11-30-2013, 03:59 PM
Last Post: Sean Freeman
  Converting Great Circle Navigation from 41C to 42S Bill Triplett 11 2,494 11-13-2013, 07:24 AM
Last Post: Kimberly Thompson
  HP Prime: Converting number to Sci notation and back BruceTTT 1 944 11-12-2013, 02:11 AM
Last Post: Phil Wipf
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 1,822 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  Updated PPC DVD Version 2.10: HP-41 Searchable Program Files and Scannable Barcode Jake Schwartz 3 1,345 09-27-2013, 09:51 PM
Last Post: Olivier (Wa)
  [wp34s] Converting to/from IEEE 754 Binary64 (Double Precision) David Maier 1 817 06-15-2013, 09:21 PM
Last Post: Paul Dale
  Pilbox speedup on Mac OS X Håkan Thörngren 1 853 06-07-2013, 03:27 PM
Last Post: Egan Ford
  OT - Converting 9 track 6250 bpi tapes Marcel Samek 0 675 05-31-2013, 08:26 PM
Last Post: Marcel Samek
  PILBox on Mac OS X success Håkan Thörngren 5 1,468 03-25-2013, 11:45 AM
Last Post: Egan Ford
  Saturn on Android_OS and i-OS CompSystems 6 1,631 03-17-2013, 01:40 PM
Last Post: hugh steers

Forum Jump: