Path: republic.btigate.com!news-xfer.netaxs.com!newshub.northeast.verio.net!news-peer.gip.net!news.gsl.net!gip.net!news.maxwell.syr.edu!nntp2.dejanews.com!nnrp1.dejanews.com!not-for-mail
From: Daniel Lidstrom <danli97@ite.mh.se>
Newsgroups: comp.sys.hp48
Subject: Re: Is there a ``\->BIN'' equivalent of \->ASC ??
Date: Tue, 16 Jun 1998 14:11:04 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 87
Message-ID: <6m5udo$6mb$1@nnrp1.dejanews.com>
References: <6lomc3$tsm$1@hecate.umd.edu>
NNTP-Posting-Host: 144.57.247.5
X-Article-Creation-Date: Tue Jun 16 14:11:04 1998 GMT
X-Http-User-Agent: Mozilla/4.05 [en] (Win95; I)
Xref: republic.btigate.com comp.sys.hp48:12080

Hello Kevin! I saw your post and knew that I had the program you needed. The
problem was that I had erased it a while ago. Anyway, now I have done it
again (wow!), it is an easy task. I will send you the source as well;
hopefully you will try to learn ML after this! (program e-mailed to Kevin)

\->BIN
ASSEMBLE
=GETPTREVALC EQU #15C77
RPL
::
  CK1
  GARBAGE
CODE
	GOSBVL	=SAVPTR
	A=DAT1	A
	B=A	A
	D0=A
	A=DAT0	A
	D1=A
	A=DAT1	A
	LC(5)	=PRLG
	?C=A	A
	GOYES	OK
	LC(5)	=SETTYPEERR
	GOSBVL	=GETPTREVALC
OK	GOSBVL	=SKIPOB
	CD0EX
	C=C-B	A
	C=C+C	A
	C=C+C	A
	R1=C
	GOSBVL	=MAKE$
	A=DAT1	A
	D1=A
	C=R1
	D=C	A
	DSRB.F	A
	DSRB.F	A
Nibblp	D=D-1	A
	GOC	Exit
	LC(1)	3
	CSRC
	A=DAT1	B
Bitlp	LC(2)	#30
	?ABIT=0	3
	GOYES	NotOne
	C=C+1	P
NotOne	A=A+A	B
	DAT0=C	B
	D0=D0+	2
	C=C-1	S
	GONC	Bitlp
	D1=D1+	1
	GONC	Nibblp
Exit	GOVLNG	=GPOverWrR0Lp
ENDCODE
;

Simple piece of code, isn't it?

/Daniel Lidstrom, danli97@ite.mh.se
Maintainer of the webbased ML-guide at:
http://www.ite.mh.se/~danli97/



In article <6lomc3$tsm$1@hecate.umd.edu>,
  rauch@astro.umd.edu (Kevin Rauch) wrote:
>
> Hi all,
>
>     I have the simple desire of being able to take an object and produce a
> string containing the bit-level *binary* representation of the object---just
> like \->ASC but without the newlines/conversion to ASCII hex digits. I haven't
> found any RPL commands which do it, and although it must be trivial to code in
> ML, I don't have the ambition to learn it just to write one tiny program! :-)
> It would be easy to take the output of \->ASC and create what I want, but it
> would waste a great amount of time and memory. Is such a utility available
> anywhere?
>     On a completely different note, what's the point of the C$ operator?? That
> is, when I type, say:  C$ 6 CatDog
> in the command line and press ENTER, my (Rev. R) 48G puts the user string
> "CatDog" onto th>
<input type=

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading