home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Amiga
/
Applications
/
Musique
/
PlayMF_VU.lha
/
PianoMeter
/
Source
/
SPrintf.a
< prev
next >
Wrap
Text File
|
1998-03-19
|
1KB
|
48 lines
;
; Simple version of the C "sprintf" function. Assumes C-style
; stack-based function conventions.
;
Include "Exec/Exec_lib.i"
Include "Exec/Exec.i"
SECTION TEXT,CODE
XDEF _SPrintf
XDEF _VSPrintf
; ( ostring, format, Args )
_VSPrintf movem.l a2/a3/a6,-(sp)
move.l 4*4(sp),a3 ;Get the output string pointer
move.l 5*4(sp),a0 ;Get the FormatString pointer
move.l 6*4(sp),a1 ;Get the pointer to the DataStream
lea.l stuffChar(pc),a2
move.l 4.w,a6
jsr _LVORawDoFmt(a6)
movem.l (sp)+,a2/a3/a6
rts
; ( ostring, format, ... )
_SPrintf movem.l a2/a3/a6,-(sp)
move.l 4*4(sp),a3 ;Get the output string pointer
move.l 5*4(sp),a0 ;Get the FormatString pointer
lea.l 6*4(sp),a1 ;Get the pointer to the DataStream
lea.l stuffChar(pc),a2
move.l 4.w,a6
jsr _LVORawDoFmt(a6)
movem.l (sp)+,a2/a3/a6
rts
;------ PutChProc function used by RawDoFmt -----------
stuffChar move.b d0,(a3)+ ;Put data to output string
rts
END