home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsa / armedit / Code / SWI_H < prev    next >
Encoding:
Text File  |  1996-01-12  |  1.1 KB  |  46 lines

  1. /*
  2.     File        : swi.h
  3.     Date        : 12/1/96
  4.     Author        : © A.Thoukydides, 1995, 1996
  5.     Description    : Call RISC OS SWIs by name. Note that this is a very
  6.                   inefficient operation.
  7. */
  8.  
  9. // Only include header file once
  10. #ifndef SWI_H
  11. #define SWI_H
  12.  
  13. // Include project header files
  14. #include "talk.h"
  15.  
  16. // Define some useful SWI numbers
  17. #define OS_CLI 0x05
  18. #define OS_File 0x08
  19. #define OS_Module 0x1e
  20. #define OS_NumberFromString 0x39
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. /*
  27.     Parameters    : swi            - The name of the SWI to call.
  28.                   in            - Pointer to the values for the ARM registers
  29.                                   on entry to the SWI.
  30.                   out            - Pointer to the values that the ARM
  31.                                   registers contained on exit from the SWI.
  32.     Returns        : talk_error    - A pointer to a RISC OS style error block
  33.                                   (in PC memory), or NULL if there was no
  34.                                   error.
  35.     Description    : Call the specified RISC OS SWI. The SWI is always called
  36.                   with the X bit set.
  37. */
  38. const talk_error *swi_swi(const char *swi, const talk_swi_regs *in,
  39.                           talk_swi_regs *out);
  40.  
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44.  
  45. #endif
  46.