home *** CD-ROM | disk | FTP | other *** search
- #ifdef __GNUC__
- #include <stdarg.h>
- #include <exec/devices.h>
- #include <exec/io.h>
- #include <inline/exec.h>
- #include "libcall.h"
-
- extern void writeone(void);
-
- asm(" .text ;" /* Oh, dear. I can't do this in C */
- " .even ;"
- "_writeone: ;"
- " moveb d0,a3@+;"
- " rts ");
-
- void sprintf(STRPTR buffer,STRPTR fmt,...)
- { RawDoFmt(fmt,(ULONG *)&fmt+1,writeone,buffer); } /* Not very clean, but ... */
-
- void BeginIO(struct IORequest *iorequest)
- { register struct IORequest *a1 asm("a1")=iorequest;
- register struct Device *a6 asm("a6")=iorequest->io_Device;
- asm(CALL("-30")::"r"(a1),"r"(a6):"a0","a1","d0","d1");
- }
- #endif
-