home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / duucp-1.17 / AU-117b4-src.lha / src / lib / DoFmt.a < prev    next >
Encoding:
Text File  |  1993-12-24  |  1.0 KB  |  57 lines

  1.     section text,code
  2. ;
  3. ;   DoFmt.a
  4. ;
  5. ;   DoFmt() calls the ROM RawDoFmt().
  6. ;
  7. ;   Copyright 1992 Michael B. Smith
  8. ;   All Rights Reserved.
  9. ;
  10. ;Prototype __stkargs void DoFmt (char *buf, const char *fmt, ...);
  11. ;Prototype __stkargs void VDoFmt (char *buf, const char *fmt, va_list va);
  12. ;
  13. ;   Note that RawDoFmt expects sizeof (int) == 2 (WORD), so you will
  14. ;   probably need "%ld" and not just "%d". For characters, the same
  15. ;   holds true: "%lc" not just "%c".
  16. ;
  17. ;   Mostly taken from the 2.04 _Includes_and_Autodocs_ RKM, page 165,
  18. ;   then adapted for DICE's das.
  19. ;
  20.     ds.l 0
  21.     procstart
  22.     xdef    _DoFmt
  23.     xdef    _VDoFmt
  24.     xref    _LVORawDoFmt
  25.  
  26. _DoFmt:
  27.     movem.l a2/a3/a6,-(sp)
  28.     move.l    16(sp),a3
  29.     move.l    20(sp),a0
  30.     lea.l    24(sp),a1
  31.     lea.l    stuffChar(pc),a2
  32.  
  33.     movea.l 4.w,a6
  34.     jsr    _LVORawDoFmt(a6)
  35.  
  36.     movem.l (sp)+,a2/a3/a6
  37.     rts
  38.  
  39. _VDoFmt:
  40.     movem.l a2/a3/a6,-(sp)
  41.     move.l    16(sp),a3
  42.     move.l    20(sp),a0
  43.     movea.l 24(sp),a1
  44.     lea.l    stuffChar(pc),a2
  45.  
  46.     movea.l 4.w,a6
  47.     jsr    _LVORawDoFmt(a6)
  48.  
  49.     movem.l (sp)+,a2/a3/a6
  50.     rts
  51.  
  52. stuffChar:
  53.     move.b    d0,(a3)+
  54.     rts
  55.     procend
  56.     END
  57.