Newsgroups: comp.sys.hp48 From: Khanh-Dang Subject: Re: Hiding things Date: Thu, 9 Feb 2006 17:32:02 +0100 User-Agent: slrn/0.9.8.1 (Linux) Lines: 50 Message-ID: <43eb6e82$0$18312$8fcfb975@news.wanadoo.fr> NNTP-Posting-Date: 09 Feb 2006 17:32:02 CET NNTP-Posting-Host: 82.120.188.105 X-Trace: 1139502722 news.wanadoo.fr 18312 82.120.188.105:58189 X-Complaints-To: abuse@wanadoo.fr Xref: news.wanadoo.fr comp.sys.hp48:129870 Here is a little UserRPL I wrote in order to hide things into an array of real numbers. ---------------------------------- %%HP: T(3)A(R)F(.); DIR Ahide \<< \-> ob arry \<< arry IF DUP TYPE 3. \=/ THEN # 202h DOERR END \->H DUP SIZE 5. - ob BYTES SWAP DROP 2. * + R\->B A\->H 6. SWAP REPL ob \->H + H\-> \>> \>> Aunhide \<< \-> arry \<< arry IF DUP TYPE 3. \=/ THEN # 202h DOERR END BYTES SWAP DROP 2. * arry SIZE LIST\-> IF 2. == THEN * 16. * 30. + ELSE 16. * 25. + END IF DUP2 \=/ THEN arry \->H UNROT 1. + SWAP SUB H\-> 1. ELSE DROP2 0. END \>> \>> END ---------------------------------- BYTES gives # A89Eh and 412.5. The two programs use some commands (H->, ->H and A->H) of library 256 so they only work on HP49. To hide any object into an array, put the object and the array on the stack and launch Ahide. An array is left on the stack. This array looks like the one you gave to Ahide, but it contains your object. To recall a hidden object, just put the array on the stack and launch Aunhide. If the array does contain a hidden object, then the object and 1. are returned ; 0 is returned in the other case.