home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Applications / Musique / PlayMF_VU.lha / Fireworks / Source / SPrintf.a < prev    next >
Text File  |  1998-03-18  |  1KB  |  48 lines

  1.         ;
  2.         ; Simple version of the C "sprintf" function.  Assumes C-style
  3.         ; stack-based function conventions.
  4.         ;
  5.  
  6.         Include    "Exec/Exec_lib.i"
  7.         Include    "Exec/Exec.i"
  8.  
  9.         SECTION TEXT,CODE
  10.  
  11.         XDEF _SPrintf
  12.         XDEF _VSPrintf
  13.  
  14.         ; ( ostring, format, Args )
  15.  
  16. _VSPrintf    movem.l a2/a3/a6,-(sp)
  17.  
  18.         move.l    4*4(sp),a3       ;Get the output string pointer
  19.         move.l    5*4(sp),a0       ;Get the FormatString pointer
  20.         move.l    6*4(sp),a1       ;Get the pointer to the DataStream
  21.         lea.l    stuffChar(pc),a2
  22.         move.l    4.w,a6
  23.         jsr    _LVORawDoFmt(a6)
  24.  
  25.         movem.l (sp)+,a2/a3/a6
  26.         rts
  27.  
  28.         ; ( ostring, format, ... )
  29.  
  30. _SPrintf    movem.l a2/a3/a6,-(sp)
  31.  
  32.         move.l    4*4(sp),a3       ;Get the output string pointer
  33.         move.l    5*4(sp),a0       ;Get the FormatString pointer
  34.         lea.l    6*4(sp),a1       ;Get the pointer to the DataStream
  35.         lea.l    stuffChar(pc),a2
  36.         move.l    4.w,a6
  37.         jsr    _LVORawDoFmt(a6)
  38.  
  39.         movem.l (sp)+,a2/a3/a6
  40.         rts
  41.  
  42.     ;------ PutChProc function used by RawDoFmt -----------
  43.  
  44. stuffChar    move.b    d0,(a3)+        ;Put data to output string
  45.         rts
  46.  
  47.         END
  48.