home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp48
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!news.funet.fi!ajk.tele.fi!funic!nntp.hut.fi!nntp.hut.fi!mheiskan
- From: mheiskan@hut.fi (Mika Heiskanen)
- Subject: Re: LISP in system RPL
- In-Reply-To: brianw@iat.holonet.net's message of Fri, 13 Nov 1992 22:44:43 GMT
- Message-ID: <MHEISKAN.92Nov18214543@lk-hp-1.hut.fi>
- Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
- Nntp-Posting-Host: lk-hp-1.hut.fi
- Reply-To: mheiskan@vipunen.hut.fi
- Organization: Helsinki University of Technology, Finland
- References: <BxoF6K.43I@iat.holonet.net>
- Date: 18 Nov 92 19:45:42 GMT
- Lines: 32
-
-
- In article <BxoF6K.43I@iat.holonet.net> brianw@iat.holonet.net (Brian Walsh) writes:
-
- >LISP rewritten in system RPL
- [...]
- >@ Example: { 4 5 6 } << SQ >> LISP --> { 16 25 36 }
- >@ Note: The process may be a program or a list.
-
- >Well here is a system RPL version:
- >:: SWAP DUPLENCOMP @ get the size of the list
- >ROT { LAM '{n' LAM '{p' } BIND @ save the list size and process
- >INNERCOMP reversym @ unpack the list
- >#1+_ONE_DO @ initialize loop
- >INDEX@ ROLL @ rearrange the stack
- >LAM '{p' xEVAL @ evaluate the process (prgm or list)
- >LOOP @ continue the loop
- >LAM '{n' {}N @ pack the results list
- >ABND @ abandon temp vars
- >;
-
- Slightly shorter and faster:
-
- ::
- ' :: SWAP#1+ TRUE ;
- 2Ob>Seco 1LAMBIND
- ZEROSWAP
- :: GOTO PTR 58CF8 ; @ The first instruction is symcomp :(
- ABND {}N
- ;
-
- --
- --> mheiskan@vipunen.hut.fi
-