Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu From: cloos@acsu.buffalo.edu (James H. Cloos) Newsgroups: comp.sys.handhelds Subject: RE: ->PRG & PRG-> RPL Versions Message-ID: <41354@eerie.acsu.Buffalo.EDU> Date: 18 Oct 90 01:32:30 GMT Sender: news@acsu.Buffalo.EDU Organization: State University of New York @ Buffalo Lines: 51 Nntp-Posting-Host: lictor.acsu.buffalo.edu In article <8979@helios.TAMU.EDU> Rick Grevelle posts the 2 programs \->PRG and PRG\->. He also mentions the addresses of routines to do \->ALG, plus that the routine used to do PRG\-> also will break up an algebraic or a list. We already have LIST\-> and \->LIST, he gave us PRG\-> anmd \->PRG, so here, based on his routines (to check for args, etc.) are ALG\-> and \->ALG: They are in ASC form, in the following directory: ===========CUT==============BEGIN============== %%HP: T(3)A(R)F(.); DIR ALG\->.ASC "D9D202BA812BF8194040379C1B2130C3D2" \->ALG.ASC "D9D2043C81D6450B2130474F" END -_-_-_-_-_-CUT-_-_-_-_-_-_-_-END-_-_-_-_-_-_-_- These routines work exactly like those Rick posted; the decomp is: ALG\-> 02D9D : :: 18AB2 : need one arg from stack 18FB2 : check one argument for following type 04049 : <9h> 1C973 : program->, algebraic->, list-> 0312B : ; \->ALG 029D9 : :: 18C34 : need % n arguments from stack {% n == real_n} 0546D : ->algebraic 0312B : ; Now, in the start of his article, he listed 0x054AF as the address of the alg,list,prg-> routine, but used 0x1C973 in his programs. I used the 0x1C973 as I didn't notice this at first; it does work, though, with algebraics. With these, you can easily convert between algebraic and rpn display formats; this could be helpful in understanding rpn if you don't already. (Please backup before playing with, just in case.) -JimC -- James H. Cloos, Jr. Phone: +1 716 673-1250 cloos@ACSU.Buffalo.EDU Snail: PersonalZipCode: 14048-0772, USA cloos@ub.UUCP