home *** CD-ROM | disk | FTP | other *** search
- section text,code
- ;
- ; DoFmt.a
- ;
- ; DoFmt() calls the ROM RawDoFmt().
- ;
- ; Copyright 1992 Michael B. Smith
- ; All Rights Reserved.
- ;
- ;Prototype __stkargs void DoFmt (char *buf, const char *fmt, ...);
- ;Prototype __stkargs void VDoFmt (char *buf, const char *fmt, va_list va);
- ;
- ; Note that RawDoFmt expects sizeof (int) == 2 (WORD), so you will
- ; probably need "%ld" and not just "%d". For characters, the same
- ; holds true: "%lc" not just "%c".
- ;
- ; Mostly taken from the 2.04 _Includes_and_Autodocs_ RKM, page 165,
- ; then adapted for DICE's das.
- ;
- ds.l 0
- procstart
- xdef _DoFmt
- xdef _VDoFmt
- xref _LVORawDoFmt
-
- _DoFmt:
- 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
-
- movea.l 4.w,a6
- jsr _LVORawDoFmt(a6)
-
- movem.l (sp)+,a2/a3/a6
- rts
-
- _VDoFmt:
- movem.l a2/a3/a6,-(sp)
- move.l 16(sp),a3
- move.l 20(sp),a0
- movea.l 24(sp),a1
- lea.l stuffChar(pc),a2
-
- movea.l 4.w,a6
- jsr _LVORawDoFmt(a6)
-
- movem.l (sp)+,a2/a3/a6
- rts
-
- stuffChar:
- move.b d0,(a3)+
- rts
- procend
- END
-