Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: How does RawDoFmt work? Keywords: rawdofnt, assembly, pinhead, turnip, spam Message-ID: <14896@cbmvax.commodore.com> Date: 5 Oct 90 03:33:39 GMT References: <27075958-963comp.sys.amiga.tech@tronsbox.xei.com> Reply-To: valentin@cbmvax.commodore.com (Valentin Pepelea) Organization: Commodore, West Chester, PA Lines: 34 In article <27075958-963comp.sys.amiga.tech@tronsbox.xei.com> dfrancis@tronsbox.xei.com (Dennis Francis Heffernan) writes: > > This question probably indicates that I shouldn't be messing around > with stuff like this, but here goes: I can't for the life of me figure out > how to use exec.library's RawDoFmt() from assembly. (I don't know C, and > telling me to learn it isn't a useful answer.) The autodocs are either Latin > or Greek ;-) and Compute's book doesn't want to talk about the subject. > > I'm planning to use amiga.lib's sprintf() instead- I can figure out > how THAT works; it's pretty straightforward. Well RawDoFmt() works pretty well like sprint(), except there is one additional parameter. sprintf(outstring,format,values...) puts the output starting at memory location "outstring". Well, RawDoFmt(format,values,routine,outstring) has the additional parameter "routine" which points to a function that copies the characters to "outstring" one by one. Therfore "routine" may either copy the characters to outstring, or perhaps it may choose to ignore that parameter and output all characters to the serial or parallel ports. Look at page A-36 of the blue-green Amiga ROM Kernel Reference Manual, Includes % Autodocs. It shows you how sprintf() is implemented using RawDoFmt(). Valentin -- The Goddess of democracy? "The tyrants Name: Valentin Pepelea may destroy a statue, but they cannot Phone: (215) 431-9327 kill a god." UseNet: cbmvax!valentin@uunet.uu.net - Ancient Chinese Proverb Claimer: I not Commodore spokesman be