This is a collection of C header files that define macros for RISC OS SWI numbers. RISC OS allows a name to be associated with each number, and has a facility for converting between names and numbers, but this is not normally accessible from C (or at least, it's not portably accessible across different compilers).
In these header files, each macro is the name of a SWI with the value of the SWI's number. For example, the directive:
#include <riscos/swi/ColourTrans.h>
…will define macros for all SWIs whose names
begin with “ColourTrans_
”, such as
ColourTrans_ReturnGCOLForMode
, and
nothing else. The macro's value is the SWI number;
0x40745 in this case. The X form is similarly
defined.
A small utility is included to generate new or up-to-date header files for macros in both X and non-X forms from loaded modules.
<riscos/swi/SWI-name
prefix.h>
— SWI codes<riscos/services.h>
—
module service codes<riscos/vectors.h>
—
software vectors<riscos/error/prefix.h>
—
error numbers<riscos/wimp/events.h>
— WIMP event codes<riscos/wimp/messages.h>
— standard
WIMP message codes<riscos/wimp/message/prefix.h>
— additional WIMP messages