home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
golded-1.1.lha
/
GoldED
/
data
/
tools
/
EDSource
/
sprintf.a
< prev
Wrap
Text File
|
1994-02-09
|
734b
|
38 lines
;
; 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