home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Simple version of the C "sprintf" function. Assumes C-style
- ; stack-based function conventions.
- ;
- ; long eyecount;
- ; eyecount=2;
- ; sprintf(string,"%s have %ld eyes.","Fish",eyecount);
- ;
- ; would produce "Fish have 2 eyes." in the string buffer.
- ;
- xdef _myprintf
- xref _LVORawDoFmt
-
- SECTION sprintf,CODE
-
- _myprintf:
- movem.l a2/a3/a6,-(sp)
-
- move.l 16(sp),a3
- move.l 20(sp),a0
- lea.l 24(sp),a1
- lea.l stuffChar(pc),a2
- move.l 4,a6
- jsr _LVORawDoFmt(a6)
-
- movem.l (sp)+,a2/a3/a6
- move.l 4(sp),d0
- rts
-
- ;------ PutChProc function used by RawDoFmt -----------
-
- stuffChar:
-
- move.b d0,(a3)+
- rts
-
- END
-