home *** CD-ROM | disk | FTP | other *** search
- /*
- #### # # # #
- # # # # # The FreeWare C library for
- # # ## ### # # # # ### RISC OS machines
- # # # # # # # # # # # ___________________________________
- # # #### ### ## # # # #
- # # # # # # # # # # Please refer to the accompanying
- #### ### #### # # ##### # ### documentation for conditions of use
- ________________________________________________________________________
-
- File: SWI.h
- Author: Copyright © 1992 Jason Williams
- Version: 1.00 (22 Mar 1992)
- Purpose: Generic SWI call veneer function
- */
-
-
- #ifndef __dl_swi_h
- #define __dl_swi_h
-
- #ifndef __dl_core_h
- #include "Core.h"
- #endif
-
- /*
- * SWI
- * This function provides a general-purpose SWI call veneer.
- * It is not meant to be the most efficient SWI caller, but the most
- * general one. If you require faster SWI handling than this function
- * provides, then you will need to construct an assembler veneer for the SWI
- * (see WimpSWIs library source for examples)
- *
- * Call it specifying the number of arguments you are passing in,
- * the number of arguments you want passed back,
- * the SWI number to call (X or normal),
- * and a list of parameters...
- * Parameters:
- * The SWI list in should be a list of integers, exactly the number
- * specified as "numregsin". These will be passed to the SWI as registers
- * 0, 1, 2, ... A maximum of 6 such registers can be specified.
- *
- * The SWI list out should be a list of pointers to result variables
- * they will be assigned the register results from the SWI, in order.
- * Pass in a NULL pointer for any of these if the result is to be ignored
- *
- * Examples:
- * SWI(0, 0, SWI_Hourglass_On);
- * SWI(1, 0, SWI_Hourglass_Percentage, 33);
- * SWI(0, 0, SWI_XHourglass_Smash);
- *
- * { int ramsprites, romsprites;
- * \* Read rom sprite and ram sprite pool base addresses: *\
- * SWI(0, 2, SWI_Wimp_BaseOfSprites, &romsprites, &ramsprites)
- *
- * \* Read ram sprite base ONLY *\
- * SWI(0, 2, SWI_Wimp_BaseOfSprites, NULL, &ramsprites)
- * }
- *
- * -- See Hourglass.h for examples of how to make low-level SWI calls
- * look nice in your calling code without the extra expense of another
- * function call.
- */
- os_error *SWI(int numregsin, int numregsout, int swicode, ... );
-
- #endif
-