home *** CD-ROM | disk | FTP | other *** search
- /*
- File : swi.h
- Date : 12/1/96
- Author : © A.Thoukydides, 1995, 1996
- Description : Call RISC OS SWIs by name. Note that this is a very
- inefficient operation.
- */
-
- // Only include header file once
- #ifndef SWI_H
- #define SWI_H
-
- // Include project header files
- #include "talk.h"
-
- // Define some useful SWI numbers
- #define OS_CLI 0x05
- #define OS_File 0x08
- #define OS_Module 0x1e
- #define OS_NumberFromString 0x39
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /*
- Parameters : swi - The name of the SWI to call.
- in - Pointer to the values for the ARM registers
- on entry to the SWI.
- out - Pointer to the values that the ARM
- registers contained on exit from the SWI.
- Returns : talk_error - A pointer to a RISC OS style error block
- (in PC memory), or NULL if there was no
- error.
- Description : Call the specified RISC OS SWI. The SWI is always called
- with the X bit set.
- */
- const talk_error *swi_swi(const char *swi, const talk_swi_regs *in,
- talk_swi_regs *out);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-