HP Forums
converting 41 program to Palm OS - 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: converting 41 program to Palm OS (/thread-48624.html)



converting 41 program to Palm OS - Jim - 12-07-2003

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.


Re: converting 41 program to Palm OS - Brent - 12-07-2003

You might try MathU Pro at http://www.creativecreek.com.
It's a programmable RPN calculator. It should do all you need it to.


uh oh - hugh steers - 12-07-2003

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.




Re: converting 41 program to Palm OS - Renato - 12-07-2003

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


Re: converting 41 program to Palm OS - Jim - 12-07-2003

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.


Re: converting 41 program to Palm OS - Nelson M. Sicuro (Brazil) - 12-07-2003

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!

Nelson


Re: converting 41 program to Palm OS - hugh steers - 12-07-2003

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.


Re: converting 41 program to Palm OS - Jonathan Purvis (New Zealand) - 12-07-2003

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.


Re: converting 41 program to Palm OS - Jim - 12-08-2003

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.


Re: converting 41 program to Palm OS - hugh - 12-08-2003

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.


Re: converting 41 program to Palm OS - Dia C. Tran - 12-09-2003

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.


Re: converting 41 program to Palm OS - Jim - 12-10-2003

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.




Re: converting 41 program to Palm OS - Jim - 12-10-2003

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?