home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / armedit / Code / SWI_H < prev    next >
Text File  |  1997-02-21  |  1KB  |  48 lines

  1. /*
  2.     File        : swi.h
  3.     Date        : 21-Feb-97
  4.     Author      : © A.Thoukydides, 1995, 1996, 1997
  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_GBPB 0x0c
  20. #define OS_Module 0x1e
  21. #define OS_NumberFromString 0x39
  22. #define OS_ReadMonotonicTime 0x42
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. /*
  29.     Parameters  : swi           - The name of the SWI to call.
  30.                   in            - Pointer to the values for the ARM registers
  31.                                   on entry to the SWI.
  32.                   out           - Pointer to the values that the ARM
  33.                                   registers contained on exit from the SWI.
  34.     Returns     : talk_error    - A pointer to a RISC OS style error block
  35.                                   (in PC memory), or NULL if there was no
  36.                                   error.
  37.     Description : Call the specified RISC OS SWI. The SWI is always called
  38.                   with the X bit set.
  39. */
  40. const talk_error *swi_swi(const char *swi, const talk_swi_regs *in,
  41.                           talk_swi_regs *out);
  42.  
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46.  
  47. #endif
  48.