home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Computer / h / adfs next >
Encoding:
Text File  |  1995-08-22  |  39.0 KB  |  1,232 lines

  1. #ifndef adfs_H
  2. #define adfs_H
  3.  
  4. /* C header file for ADFS
  5.  * written by DefMod (Jul 24 1995) on Tue Aug 22 14:43:25 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. #ifndef filecore_H
  18. #include "filecore.h"
  19. #endif
  20.  
  21. /**********************************
  22.  * SWI names and SWI reason codes *
  23.  **********************************/
  24. #undef  ADFS_DiscOp
  25. #define ADFS_DiscOp                             0x40240
  26. #undef  XADFS_DiscOp
  27. #define XADFS_DiscOp                            0x60240
  28. #undef  ADFSDiscOp_Verify
  29. #define ADFSDiscOp_Verify                       0x0
  30. #undef  ADFSDiscOp_ReadSectors
  31. #define ADFSDiscOp_ReadSectors                  0x1
  32. #undef  ADFSDiscOp_WriteSectors
  33. #define ADFSDiscOp_WriteSectors                 0x2
  34. #undef  ADFSDiscOp_ReadTrack
  35. #define ADFSDiscOp_ReadTrack                    0x3
  36. #undef  ADFSDiscOp_ReadId
  37. #define ADFSDiscOp_ReadId                       0x3
  38. #undef  ADFSDiscOp_WriteTrack
  39. #define ADFSDiscOp_WriteTrack                   0x4
  40. #undef  ADFSDiscOp_FormatTrack
  41. #define ADFSDiscOp_FormatTrack                  0x4
  42. #undef  ADFSDiscOp_Seek
  43. #define ADFSDiscOp_Seek                         0x5
  44. #undef  ADFSDiscOp_Restore
  45. #define ADFSDiscOp_Restore                      0x6
  46. #undef  ADFSDiscOp_StepIn
  47. #define ADFSDiscOp_StepIn                       0x7
  48. #undef  ADFSDiscOp_StepOut
  49. #define ADFSDiscOp_StepOut                      0x8
  50. #undef  ADFSDiscOp_ReadSectorsViaCache
  51. #define ADFSDiscOp_ReadSectorsViaCache          0x9
  52. #undef  ADFSDiscOp_Specify
  53. #define ADFSDiscOp_Specify                      0xF
  54. #undef  ADFS_HDC
  55. #define ADFS_HDC                                0x40241
  56. #undef  XADFS_HDC
  57. #define XADFS_HDC                               0x60241
  58. #undef  ADFS_Drives
  59. #define ADFS_Drives                             0x40242
  60. #undef  XADFS_Drives
  61. #define XADFS_Drives                            0x60242
  62. #undef  ADFS_FreeSpace
  63. #define ADFS_FreeSpace                          0x40243
  64. #undef  XADFS_FreeSpace
  65. #define XADFS_FreeSpace                         0x60243
  66. #undef  ADFS_Retries
  67. #define ADFS_Retries                            0x40244
  68. #undef  XADFS_Retries
  69. #define XADFS_Retries                           0x60244
  70. #undef  ADFS_DescribeDisc
  71. #define ADFS_DescribeDisc                       0x40245
  72. #undef  XADFS_DescribeDisc
  73. #define XADFS_DescribeDisc                      0x60245
  74. #undef  ADFS_VetFormat
  75. #define ADFS_VetFormat                          0x40246
  76. #undef  XADFS_VetFormat
  77. #define XADFS_VetFormat                         0x60246
  78. #undef  ADFS_FlpProcessDCB
  79. #define ADFS_FlpProcessDCB                      0x40247
  80. #undef  XADFS_FlpProcessDCB
  81. #define XADFS_FlpProcessDCB                     0x60247
  82. #undef  ADFS_ControllerType
  83. #define ADFS_ControllerType                     0x40248
  84. #undef  XADFS_ControllerType
  85. #define XADFS_ControllerType                    0x60248
  86. #undef  ADFS_PowerControl
  87. #define ADFS_PowerControl                       0x40249
  88. #undef  XADFS_PowerControl
  89. #define XADFS_PowerControl                      0x60249
  90. #undef  ADFSPowerControl_ReadSpin
  91. #define ADFSPowerControl_ReadSpin               0x0
  92. #undef  ADFSPowerControl_SetAutospindown
  93. #define ADFSPowerControl_SetAutospindown        0x1
  94. #undef  ADFSPowerControl_SetSpin
  95. #define ADFSPowerControl_SetSpin                0x2
  96. #undef  ADFS_SetIDEController
  97. #define ADFS_SetIDEController                   0x4024A
  98. #undef  XADFS_SetIDEController
  99. #define XADFS_SetIDEController                  0x6024A
  100. #undef  ADFS_IDEUserOp
  101. #define ADFS_IDEUserOp                          0x4024B
  102. #undef  XADFS_IDEUserOp
  103. #define XADFS_IDEUserOp                         0x6024B
  104. #undef  ADFS_MiscOp
  105. #define ADFS_MiscOp                             0x4024C
  106. #undef  XADFS_MiscOp
  107. #define XADFS_MiscOp                            0x6024C
  108. #undef  ADFSMiscOp_Mount
  109. #define ADFSMiscOp_Mount                        0x0
  110. #undef  ADFSMiscOp_PollChanged
  111. #define ADFSMiscOp_PollChanged                  0x1
  112. #undef  ADFSMiscOp_LockDrive
  113. #define ADFSMiscOp_LockDrive                    0x2
  114. #undef  ADFSMiscOp_UnlockDrive
  115. #define ADFSMiscOp_UnlockDrive                  0x3
  116. #undef  ADFSMiscOp_PollPeriod
  117. #define ADFSMiscOp_PollPeriod                   0x4
  118. #undef  ADFSMiscOp_EjectDisc
  119. #define ADFSMiscOp_EjectDisc                    0x5
  120. #undef  ADFSMiscOp_ReadInfo
  121. #define ADFSMiscOp_ReadInfo                     0x6
  122. #undef  ADFS_SectorDiscOp
  123. #define ADFS_SectorDiscOp                       0x4024D
  124. #undef  XADFS_SectorDiscOp
  125. #define XADFS_SectorDiscOp                      0x6024D
  126. #undef  ADFSSectorDiscOp_Verify
  127. #define ADFSSectorDiscOp_Verify                 0x0
  128. #undef  ADFSSectorDiscOp_ReadSectors
  129. #define ADFSSectorDiscOp_ReadSectors            0x1
  130. #undef  ADFSSectorDiscOp_WriteSectors
  131. #define ADFSSectorDiscOp_WriteSectors           0x2
  132. #undef  ADFSSectorDiscOp_ReadTrack
  133. #define ADFSSectorDiscOp_ReadTrack              0x3
  134. #undef  ADFSSectorDiscOp_ReadId
  135. #define ADFSSectorDiscOp_ReadId                 0x3
  136. #undef  ADFSSectorDiscOp_WriteTrack
  137. #define ADFSSectorDiscOp_WriteTrack             0x4
  138. #undef  ADFSSectorDiscOp_FormatTrack
  139. #define ADFSSectorDiscOp_FormatTrack            0x4
  140. #undef  ADFSSectorDiscOp_Seek
  141. #define ADFSSectorDiscOp_Seek                   0x5
  142. #undef  ADFSSectorDiscOp_Restore
  143. #define ADFSSectorDiscOp_Restore                0x6
  144. #undef  ADFSSectorDiscOp_StepIn
  145. #define ADFSSectorDiscOp_StepIn                 0x7
  146. #undef  ADFSSectorDiscOp_StepOut
  147. #define ADFSSectorDiscOp_StepOut                0x8
  148. #undef  ADFSSectorDiscOp_ReadSectorsViaCache
  149. #define ADFSSectorDiscOp_ReadSectorsViaCache    0x9
  150. #undef  ADFSSectorDiscOp_Specify
  151. #define ADFSSectorDiscOp_Specify                0xF
  152. #undef  ADFS_ECCSAndRetries
  153. #define ADFS_ECCSAndRetries                     0x40250
  154. #undef  XADFS_ECCSAndRetries
  155. #define XADFS_ECCSAndRetries                    0x60250
  156. #undef  ADFS_LockIDE
  157. #define ADFS_LockIDE                            0x40251
  158. #undef  XADFS_LockIDE
  159. #define XADFS_LockIDE                           0x60251
  160. #undef  ADFS_FreeSpace64
  161. #define ADFS_FreeSpace64                        0x40252
  162. #undef  XADFS_FreeSpace64
  163. #define XADFS_FreeSpace64                       0x60252
  164. #undef  Service_IdentifyFormat
  165. #define Service_IdentifyFormat                  0x6B
  166. #undef  Service_DisplayFormatHelp
  167. #define Service_DisplayFormatHelp               0x6C
  168.  
  169. /********************
  170.  * Type definitions *
  171.  ********************/
  172. typedef int adfs_controller;
  173.  
  174. /************************
  175.  * Constant definitions *
  176.  ************************/
  177. #define error_ADFS_DRIVER_IN_USE                0x108A0u
  178. #define adfs_CONTROLLER_DISC_NOT_PRESENT        ((adfs_controller) 0x0u)
  179. #define adfs_CONTROLLER1772                     ((adfs_controller) 0x1u)
  180. #define adfs_CONTROLLER71X                      ((adfs_controller) 0x2u)
  181. #define adfs_CONTROLLER_ST506                   ((adfs_controller) 0x3u)
  182. #define adfs_CONTROLLER_IDE                     ((adfs_controller) 0x4u)
  183.  
  184. /*************************
  185.  * Function declarations *
  186.  *************************/
  187.  
  188. #ifdef __cplusplus
  189.    extern "C" {
  190. #endif
  191.  
  192. /* ------------------------------------------------------------------------
  193.  * Function:      adfsdiscop_verify()
  194.  *
  195.  * Description:   Verifies a disc
  196.  *
  197.  * Input:         flags - value of R1 on entry
  198.  *                disc_addr - value of R2 on entry
  199.  *                size - value of R4 on entry
  200.  *
  201.  * Output:        next_disc_addr - value of R2 on exit
  202.  *                unverified - value of R4 on exit (X version only)
  203.  *
  204.  * Returns:       R4 (non-X version only)
  205.  *
  206.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x0.
  207.  */
  208.  
  209. extern os_error *xadfsdiscop_verify (bits flags,
  210.       filecore_disc_address disc_addr,
  211.       int size,
  212.       filecore_disc_address *next_disc_addr,
  213.       int *unverified);
  214. extern int adfsdiscop_verify (bits flags,
  215.       filecore_disc_address disc_addr,
  216.       int size,
  217.       filecore_disc_address *next_disc_addr);
  218.  
  219. /* ------------------------------------------------------------------------
  220.  * Function:      adfsdiscop_read_sectors()
  221.  *
  222.  * Description:   Reads sectors from a disc
  223.  *
  224.  * Input:         flags - value of R1 on entry
  225.  *                disc_addr - value of R2 on entry
  226.  *                data - value of R3 on entry
  227.  *                size - value of R4 on entry
  228.  *
  229.  * Output:        next_disc_addr - value of R2 on exit
  230.  *                next_data - value of R3 on exit
  231.  *                unread - value of R4 on exit (X version only)
  232.  *
  233.  * Returns:       R4 (non-X version only)
  234.  *
  235.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x1.
  236.  */
  237.  
  238. extern os_error *xadfsdiscop_read_sectors (bits flags,
  239.       filecore_disc_address disc_addr,
  240.       byte *data,
  241.       int size,
  242.       filecore_disc_address *next_disc_addr,
  243.       byte **next_data,
  244.       int *unread);
  245. extern int adfsdiscop_read_sectors (bits flags,
  246.       filecore_disc_address disc_addr,
  247.       byte *data,
  248.       int size,
  249.       filecore_disc_address *next_disc_addr,
  250.       byte **next_data);
  251.  
  252. /* ------------------------------------------------------------------------
  253.  * Function:      adfsdiscop_write_sectors()
  254.  *
  255.  * Description:   Writes sectors to a disc
  256.  *
  257.  * Input:         flags - value of R1 on entry
  258.  *                disc_addr - value of R2 on entry
  259.  *                data - value of R3 on entry
  260.  *                size - value of R4 on entry
  261.  *
  262.  * Output:        next_disc_addr - value of R2 on exit
  263.  *                next_data - value of R3 on exit
  264.  *                unwritten - value of R4 on exit (X version only)
  265.  *
  266.  * Returns:       R4 (non-X version only)
  267.  *
  268.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x2.
  269.  */
  270.  
  271. extern os_error *xadfsdiscop_write_sectors (bits flags,
  272.       filecore_disc_address disc_addr,
  273.       byte const *data,
  274.       int size,
  275.       filecore_disc_address *next_disc_addr,
  276.       byte **next_data,
  277.       int *unwritten);
  278. extern int adfsdiscop_write_sectors (bits flags,
  279.       filecore_disc_address disc_addr,
  280.       byte const *data,
  281.       int size,
  282.       filecore_disc_address *next_disc_addr,
  283.       byte **next_data);
  284.  
  285. /* ------------------------------------------------------------------------
  286.  * Function:      adfsdiscop_read_track()
  287.  *
  288.  * Description:   Reads a track from a floppy disc
  289.  *
  290.  * Input:         flags - value of R1 on entry
  291.  *                disc_addr - value of R2 on entry
  292.  *                data - value of R3 on entry
  293.  *
  294.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x3.
  295.  */
  296.  
  297. extern os_error *xadfsdiscop_read_track (bits flags,
  298.       filecore_disc_address disc_addr,
  299.       byte *data);
  300. extern void adfsdiscop_read_track (bits flags,
  301.       filecore_disc_address disc_addr,
  302.       byte *data);
  303.  
  304. /* ------------------------------------------------------------------------
  305.  * Function:      adfsdiscop_read_id()
  306.  *
  307.  * Description:   Reads a hard disc ID
  308.  *
  309.  * Input:         flags - value of R1 on entry
  310.  *                disc_addr - value of R2 on entry
  311.  *                data - value of R3 on entry
  312.  *
  313.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x3.
  314.  */
  315.  
  316. extern os_error *xadfsdiscop_read_id (bits flags,
  317.       filecore_disc_address disc_addr,
  318.       byte *data);
  319. extern void adfsdiscop_read_id (bits flags,
  320.       filecore_disc_address disc_addr,
  321.       byte *data);
  322.  
  323. /* ------------------------------------------------------------------------
  324.  * Function:      adfsdiscop_write_track()
  325.  *
  326.  * Description:   Writes a track to a disc
  327.  *
  328.  * Input:         flags - value of R1 on entry
  329.  *                disc_addr - value of R2 on entry
  330.  *                data - value of R3 on entry
  331.  *
  332.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x4.
  333.  */
  334.  
  335. extern os_error *xadfsdiscop_write_track (bits flags,
  336.       filecore_disc_address disc_addr,
  337.       byte const *data);
  338. extern void adfsdiscop_write_track (bits flags,
  339.       filecore_disc_address disc_addr,
  340.       byte const *data);
  341.  
  342. /* ------------------------------------------------------------------------
  343.  * Function:      adfsdiscop_format_track()
  344.  *
  345.  * Description:   Formats a track of a disc
  346.  *
  347.  * Input:         flags - value of R1 on entry
  348.  *                disc_addr - value of R2 on entry
  349.  *                format - value of R4 on entry
  350.  *
  351.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x4, R3 = 0x0.
  352.  */
  353.  
  354. extern os_error *xadfsdiscop_format_track (bits flags,
  355.       filecore_disc_address disc_addr,
  356.       filecore_track_format const *format);
  357. extern void adfsdiscop_format_track (bits flags,
  358.       filecore_disc_address disc_addr,
  359.       filecore_track_format const *format);
  360.  
  361. /* ------------------------------------------------------------------------
  362.  * Function:      adfsdiscop_seek()
  363.  *
  364.  * Description:   Seeks to a disc location
  365.  *
  366.  * Input:         flags - value of R1 on entry
  367.  *                disc_addr - value of R2 on entry
  368.  *
  369.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x5.
  370.  */
  371.  
  372. extern os_error *xadfsdiscop_seek (bits flags,
  373.       filecore_disc_address disc_addr);
  374. extern void adfsdiscop_seek (bits flags,
  375.       filecore_disc_address disc_addr);
  376.  
  377. /* ------------------------------------------------------------------------
  378.  * Function:      adfsdiscop_restore()
  379.  *
  380.  * Description:   Does a restore operation for a disc
  381.  *
  382.  * Input:         flags - value of R1 on entry
  383.  *                disc_addr - value of R2 on entry
  384.  *
  385.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x6.
  386.  */
  387.  
  388. extern os_error *xadfsdiscop_restore (bits flags,
  389.       filecore_disc_address disc_addr);
  390. extern void adfsdiscop_restore (bits flags,
  391.       filecore_disc_address disc_addr);
  392.  
  393. /* ------------------------------------------------------------------------
  394.  * Function:      adfsdiscop_step_in()
  395.  *
  396.  * Description:   Steps a floppy disc in one track
  397.  *
  398.  * Input:         flags - value of R1 on entry
  399.  *
  400.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x7.
  401.  */
  402.  
  403. extern os_error *xadfsdiscop_step_in (bits flags);
  404. extern void adfsdiscop_step_in (bits flags);
  405.  
  406. /* ------------------------------------------------------------------------
  407.  * Function:      adfsdiscop_step_out()
  408.  *
  409.  * Description:   Steps a floppy disc out one track
  410.  *
  411.  * Input:         flags - value of R1 on entry
  412.  *
  413.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x8.
  414.  */
  415.  
  416. extern os_error *xadfsdiscop_step_out (bits flags);
  417. extern void adfsdiscop_step_out (bits flags);
  418.  
  419. /* ------------------------------------------------------------------------
  420.  * Function:      adfsdiscop_read_sectors_via_cache()
  421.  *
  422.  * Description:   Reads sectors of a disc using the RMA cache
  423.  *
  424.  * Input:         flags - value of R1 on entry
  425.  *                disc_addr - value of R2 on entry
  426.  *                data - value of R3 on entry
  427.  *                size - value of R4 on entry
  428.  *                cache_handle - value of R6 on entry
  429.  *
  430.  * Output:        next_disc_addr - value of R2 on exit
  431.  *                next_data - value of R3 on exit
  432.  *                unread - value of R4 on exit (X version only)
  433.  *                cache_handle - value of R6 on exit
  434.  *
  435.  * Returns:       R4 (non-X version only)
  436.  *
  437.  * Other notes:   Calls SWI 0x40240 with R1 |= 0x9.
  438.  */
  439.  
  440. extern os_error *xadfsdiscop_read_sectors_via_cache (bits flags,
  441.       filecore_disc_address disc_addr,
  442.       byte *data,
  443.       int size,
  444.       int cache_handle,
  445.       filecore_disc_address *next_disc_addr,
  446.       byte **next_data,
  447.       int *unread,
  448.       int *cache_handle);
  449. extern int adfsdiscop_read_sectors_via_cache (bits flags,
  450.       filecore_disc_address disc_addr,
  451.       byte *data,
  452.       int size,
  453.       int cache_handle,
  454.       filecore_disc_address *next_disc_addr,
  455.       byte **next_data,
  456.       int *cache_handle);
  457.  
  458. /* ------------------------------------------------------------------------
  459.  * Function:      adfsdiscop_specify()
  460.  *
  461.  * Description:   Does a specify operation on a hard disc
  462.  *
  463.  * Input:         flags - value of R1 on entry
  464.  *                disc_addr - value of R2 on entry
  465.  *
  466.  * Other notes:   Calls SWI 0x40240 with R1 |= 0xF.
  467.  */
  468.  
  469. extern os_error *xadfsdiscop_specify (bits flags,
  470.       filecore_disc_address disc_addr);
  471. extern void adfsdiscop_specify (bits flags,
  472.       filecore_disc_address disc_addr);
  473.  
  474. /* ------------------------------------------------------------------------
  475.  * Function:      adfs_hdc()
  476.  *
  477.  * Description:   Sets the address of an alternative ST506 hard disc
  478.  *                controller
  479.  *
  480.  * Input:         controller - value of R2 on entry
  481.  *                poll_location - value of R3 on entry
  482.  *                poll_bits - value of R4 on entry
  483.  *                enable_location - value of R5 on entry
  484.  *                enable_bits - value of R6 on entry
  485.  *
  486.  * Other notes:   Calls SWI 0x40241.
  487.  */
  488.  
  489. extern os_error *xadfs_hdc (byte *controller,
  490.       int *poll_location,
  491.       bits poll_bits,
  492.       byte *enable_location,
  493.       bits enable_bits);
  494. extern void adfs_hdc (byte *controller,
  495.       int *poll_location,
  496.       bits poll_bits,
  497.       byte *enable_location,
  498.       bits enable_bits);
  499.  
  500. /* ------------------------------------------------------------------------
  501.  * Function:      adfs_drives()
  502.  *
  503.  * Description:   Returns information on ADFS' drives
  504.  *
  505.  * Output:        default_drive - value of R0 on exit
  506.  *                floppy_count - value of R1 on exit
  507.  *                hard_disc_count - value of R2 on exit
  508.  *
  509.  * Other notes:   Calls SWI 0x40242.
  510.  */
  511.  
  512. extern os_error *xadfs_drives (int *default_drive,
  513.       int *floppy_count,
  514.       int *hard_disc_count);
  515. extern void adfs_drives (int *default_drive,
  516.       int *floppy_count,
  517.       int *hard_disc_count);
  518.  
  519. /* ------------------------------------------------------------------------
  520.  * Function:      adfs_free_space()
  521.  *
  522.  * Description:   Returns information on a disc's free space
  523.  *
  524.  * Input:         disc_name - value of R0 on entry
  525.  *
  526.  * Output:        free - value of R0 on exit (X version only)
  527.  *                max - value of R1 on exit
  528.  *
  529.  * Returns:       R0 (non-X version only)
  530.  *
  531.  * Other notes:   Calls SWI 0x40243.
  532.  */
  533.  
  534. extern os_error *xadfs_free_space (char const *disc_name,
  535.       int *free,
  536.       int *max);
  537. extern int adfs_free_space (char const *disc_name,
  538.       int *max);
  539.  
  540. /* ------------------------------------------------------------------------
  541.  * Function:      adfs_retries()
  542.  *
  543.  * Description:   Sets the number of retries used for various operations
  544.  *
  545.  * Input:         mask - value of R0 on entry
  546.  *                value - value of R1 on entry
  547.  *
  548.  * Output:        old_value - value of R2 on exit (X version only)
  549.  *                new_value - value of R3 on exit
  550.  *
  551.  * Returns:       R2 (non-X version only)
  552.  *
  553.  * Other notes:   Calls SWI 0x40244.
  554.  */
  555.  
  556. extern os_error *xadfs_retries (bits mask,
  557.       bits value,
  558.       bits *old_value,
  559.       bits *new_value);
  560. extern bits adfs_retries (bits mask,
  561.       bits value,
  562.       bits *new_value);
  563.  
  564. /* ------------------------------------------------------------------------
  565.  * Function:      adfs_describe_disc()
  566.  *
  567.  * Description:   Returns a disc record describing a disc's shape and
  568.  *                format
  569.  *
  570.  * Input:         disc_name - value of R0 on entry
  571.  *                disc - value of R1 on entry
  572.  *
  573.  * Other notes:   Calls SWI 0x40245.
  574.  */
  575.  
  576. extern os_error *xadfs_describe_disc (char const *disc_name,
  577.       filecore_disc *disc);
  578. __swi (0x40245) void adfs_describe_disc (char const *disc_name,
  579.       filecore_disc *disc);
  580.  
  581. /* ------------------------------------------------------------------------
  582.  * Function:      adfs_vet_format()
  583.  *
  584.  * Description:   Vets a format for achievability with the available
  585.  *                hardware
  586.  *
  587.  * Input:         format - value of R0 on entry
  588.  *                drive_no - value of R1 on entry
  589.  *
  590.  * Other notes:   Calls SWI 0x40246.
  591.  */
  592.  
  593. extern os_error *xadfs_vet_format (filecore_format *format,
  594.       int drive_no);
  595. __swi (0x40246) void adfs_vet_format (filecore_format *format,
  596.       int drive_no);
  597.  
  598. /* ------------------------------------------------------------------------
  599.  * Function:      adfs_controller_type()
  600.  *
  601.  * Description:   Returns the controller type of a driver
  602.  *
  603.  * Input:         drive_no - value of R0 on entry
  604.  *
  605.  * Output:        controller - value of R0 on exit (X version only)
  606.  *
  607.  * Returns:       R0 (non-X version only)
  608.  *
  609.  * Other notes:   Calls SWI 0x40248.
  610.  */
  611.  
  612. extern os_error *xadfs_controller_type (int drive_no,
  613.       adfs_controller *controller);
  614. __swi (0x40248) adfs_controller adfs_controller_type (int drive_no);
  615.  
  616. /* ------------------------------------------------------------------------
  617.  * Function:      adfspowercontrol_read_spin()
  618.  *
  619.  * Description:   Reads the spin status of a drive
  620.  *
  621.  * Input:         drive_no - value of R1 on entry
  622.  *
  623.  * Output:        spinning - value of R2 on exit (X version only)
  624.  *
  625.  * Returns:       R2 (non-X version only)
  626.  *
  627.  * Other notes:   Calls SWI 0x40249 with R0 = 0x0.
  628.  */
  629.  
  630. extern os_error *xadfspowercontrol_read_spin (int drive_no,
  631.       bool *spinning);
  632. extern bool adfspowercontrol_read_spin (int drive_no);
  633.  
  634. /* ------------------------------------------------------------------------
  635.  * Function:      adfspowercontrol_set_autospindown()
  636.  *
  637.  * Description:   Sets the autospindown characteristic of a drive
  638.  *
  639.  * Input:         drive_no - value of R1 on entry
  640.  *                spindown_time - value of R2 on entry
  641.  *
  642.  * Output:        old_spindown_time - value of R3 on exit (X version only)
  643.  *
  644.  * Returns:       R3 (non-X version only)
  645.  *
  646.  * Other notes:   Calls SWI 0x40249 with R0 = 0x1.
  647.  */
  648.  
  649. extern os_error *xadfspowercontrol_set_autospindown (int drive_no,
  650.       int spindown_time,
  651.       int *old_spindown_time);
  652. extern int adfspowercontrol_set_autospindown (int drive_no,
  653.       int spindown_time);
  654.  
  655. /* ------------------------------------------------------------------------
  656.  * Function:      adfspowercontrol_set_spin()
  657.  *
  658.  * Description:   Controls drive spin directly without affecting
  659.  *                autospindown
  660.  *
  661.  * Input:         drive_no - value of R1 on entry
  662.  *                spinning - value of R2 on entry
  663.  *
  664.  * Other notes:   Calls SWI 0x40249 with R0 = 0x2.
  665.  */
  666.  
  667. extern os_error *xadfspowercontrol_set_spin (int drive_no,
  668.       bool spinning);
  669. extern void adfspowercontrol_set_spin (int drive_no,
  670.       bool spinning);
  671.  
  672. /* ------------------------------------------------------------------------
  673.  * Function:      adfs_set_ide_controller()
  674.  *
  675.  * Description:   Gives the IDE driver the details of an alternative
  676.  *                controller
  677.  *
  678.  * Input:         controller - value of R2 on entry
  679.  *                status_location - value of R3 on entry
  680.  *                status_bits - value of R4 on entry
  681.  *                irq_location - value of R5 on entry
  682.  *                irq_bits - value of R6 on entry
  683.  *                read_code - value of R7 on entry
  684.  *                write_code - value of R8 on entry
  685.  *
  686.  * Other notes:   Calls SWI 0x4024A.
  687.  */
  688.  
  689. extern os_error *xadfs_set_ide_controller (byte *controller,
  690.       int *status_location,
  691.       bits status_bits,
  692.       int *irq_location,
  693.       bits irq_bits,
  694.       void const *read_code,
  695.       void const *write_code);
  696. extern void adfs_set_ide_controller (byte *controller,
  697.       int *status_location,
  698.       bits status_bits,
  699.       int *irq_location,
  700.       bits irq_bits,
  701.       void const *read_code,
  702.       void const *write_code);
  703.  
  704. /* ------------------------------------------------------------------------
  705.  * Function:      adfs_ide_user_op()
  706.  *
  707.  * Description:   Direct user interface for low-level IDE commands
  708.  *
  709.  * Input:         op - value of R0 on entry
  710.  *                commands - value of R2 on entry
  711.  *                buffer - value of R3 on entry
  712.  *                size - value of R4 on entry
  713.  *                timeout - value of R5 on entry
  714.  *
  715.  * Output:        status - value of R0 on exit
  716.  *                untransferred - value of R4 on exit (X version only)
  717.  *
  718.  * Returns:       R4 (non-X version only)
  719.  *
  720.  * Other notes:   Calls SWI 0x4024B.
  721.  */
  722.  
  723. extern os_error *xadfs_ide_user_op (bits op,
  724.       byte const *commands,
  725.       byte *buffer,
  726.       int size,
  727.       int timeout,
  728.       int *status,
  729.       int *untransferred);
  730. extern int adfs_ide_user_op (bits op,
  731.       byte const *commands,
  732.       byte *buffer,
  733.       int size,
  734.       int timeout,
  735.       int *status);
  736.  
  737. /* ------------------------------------------------------------------------
  738.  * Function:      adfsmiscop_mount()
  739.  *
  740.  * Description:   Mounts a disc, reading in the data asked for
  741.  *
  742.  * Input:         drive_no - value of R1 on entry
  743.  *                disc_addr - value of R2 on entry
  744.  *                buffer - value of R3 on entry
  745.  *                size - value of R4 on entry
  746.  *                disc - value of R5 on entry
  747.  *
  748.  * Other notes:   Calls SWI 0x4024C with R0 = 0x0.
  749.  */
  750.  
  751. extern os_error *xadfsmiscop_mount (int drive_no,
  752.       filecore_disc_address disc_addr,
  753.       byte *buffer,
  754.       int size,
  755.       filecore_disc *disc);
  756. extern void adfsmiscop_mount (int drive_no,
  757.       filecore_disc_address disc_addr,
  758.       byte *buffer,
  759.       int size,
  760.       filecore_disc *disc);
  761.  
  762. /* ------------------------------------------------------------------------
  763.  * Function:      adfsmiscop_poll_changed()
  764.  *
  765.  * Description:   Polls the sequence number for a drive
  766.  *
  767.  * Input:         drive_no - value of R1 on entry
  768.  *                sequence_no - value of R2 on entry
  769.  *
  770.  * Output:        sequence_no_out - value of R2 on exit
  771.  *                result - value of R3 on exit
  772.  *
  773.  * Other notes:   Calls SWI 0x4024C with R0 = 0x1.
  774.  */
  775.  
  776. extern os_error *xadfsmiscop_poll_changed (int drive_no,
  777.       int sequence_no,
  778.       int *sequence_no_out,
  779.       bits *result);
  780. extern void adfsmiscop_poll_changed (int drive_no,
  781.       int sequence_no,
  782.       int *sequence_no_out,
  783.       bits *result);
  784.  
  785. /* ------------------------------------------------------------------------
  786.  * Function:      adfsmiscop_lock_drive()
  787.  *
  788.  * Description:   Locks a disc in a floppy drive
  789.  *
  790.  * Input:         drive_no - value of R1 on entry
  791.  *
  792.  * Other notes:   Calls SWI 0x4024C with R0 = 0x2.
  793.  */
  794.  
  795. extern os_error *xadfsmiscop_lock_drive (int drive_no);
  796. extern void adfsmiscop_lock_drive (int drive_no);
  797.  
  798. /* ------------------------------------------------------------------------
  799.  * Function:      adfsmiscop_unlock_drive()
  800.  *
  801.  * Description:   Unlocks a disc in a floppy drive
  802.  *
  803.  * Input:         drive_no - value of R1 on entry
  804.  *
  805.  * Other notes:   Calls SWI 0x4024C with R0 = 0x3.
  806.  */
  807.  
  808. extern os_error *xadfsmiscop_unlock_drive (int drive_no);
  809. extern void adfsmiscop_unlock_drive (int drive_no);
  810.  
  811. /* ------------------------------------------------------------------------
  812.  * Function:      adfsmiscop_poll_period()
  813.  *
  814.  * Description:   Informs FileCore of the minimum period between polling
  815.  *                for disc insertion
  816.  *
  817.  * Input:         disc_name - value of R1 on entry
  818.  *
  819.  * Output:        poll_period - value of R5 on exit
  820.  *                media_type - value of R6 on exit
  821.  *
  822.  * Other notes:   Calls SWI 0x4024C with R0 = 0x4.
  823.  */
  824.  
  825. extern os_error *xadfsmiscop_poll_period (char const *disc_name,
  826.       int *poll_period,
  827.       char **media_type);
  828. extern void adfsmiscop_poll_period (char const *disc_name,
  829.       int *poll_period,
  830.       char **media_type);
  831.  
  832. /* ------------------------------------------------------------------------
  833.  * Function:      adfsmiscop_eject_disc()
  834.  *
  835.  * Description:   Power-ejects the disc in the specified drive
  836.  *
  837.  * Input:         drive_no - value of R1 on entry
  838.  *
  839.  * Other notes:   Calls SWI 0x4024C with R0 = 0x5.
  840.  */
  841.  
  842. extern os_error *xadfsmiscop_eject_disc (int drive_no);
  843. extern void adfsmiscop_eject_disc (int drive_no);
  844.  
  845. /* ------------------------------------------------------------------------
  846.  * Function:      adfsmiscop_read_info()
  847.  *
  848.  * Description:   Reads information on ADFS
  849.  *
  850.  * Output:        info - value of R0 on exit
  851.  *
  852.  * Other notes:   Calls SWI 0x4024C with R0 = 0x6.
  853.  */
  854.  
  855. extern os_error *xadfsmiscop_read_info (filecore_info **info);
  856. extern void adfsmiscop_read_info (filecore_info **info);
  857.  
  858. /* ------------------------------------------------------------------------
  859.  * Function:      adfssectordiscop_verify()
  860.  *
  861.  * Description:   Verifies a disc
  862.  *
  863.  * Input:         flags - value of R1 on entry
  864.  *                disc_addr - value of R2 on entry
  865.  *                size - value of R4 on entry
  866.  *
  867.  * Output:        next_disc_addr - value of R2 on exit
  868.  *                unverified - value of R4 on exit (X version only)
  869.  *
  870.  * Returns:       R4 (non-X version only)
  871.  *
  872.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x0.
  873.  */
  874.  
  875. extern os_error *xadfssectordiscop_verify (bits flags,
  876.       filecore_sector_disc_address disc_addr,
  877.       int size,
  878.       filecore_sector_disc_address *next_disc_addr,
  879.       int *unverified);
  880. extern int adfssectordiscop_verify (bits flags,
  881.       filecore_sector_disc_address disc_addr,
  882.       int size,
  883.       filecore_sector_disc_address *next_disc_addr);
  884.  
  885. /* ------------------------------------------------------------------------
  886.  * Function:      adfssectordiscop_read_sectors()
  887.  *
  888.  * Description:   Reads sectors from a disc
  889.  *
  890.  * Input:         flags - value of R1 on entry
  891.  *                disc_addr - value of R2 on entry
  892.  *                data - value of R3 on entry
  893.  *                size - value of R4 on entry
  894.  *
  895.  * Output:        next_disc_addr - value of R2 on exit
  896.  *                next_data - value of R3 on exit
  897.  *                unread - value of R4 on exit (X version only)
  898.  *
  899.  * Returns:       R4 (non-X version only)
  900.  *
  901.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x1.
  902.  */
  903.  
  904. extern os_error *xadfssectordiscop_read_sectors (bits flags,
  905.       filecore_sector_disc_address disc_addr,
  906.       byte *data,
  907.       int size,
  908.       filecore_sector_disc_address *next_disc_addr,
  909.       byte **next_data,
  910.       int *unread);
  911. extern int adfssectordiscop_read_sectors (bits flags,
  912.       filecore_sector_disc_address disc_addr,
  913.       byte *data,
  914.       int size,
  915.       filecore_sector_disc_address *next_disc_addr,
  916.       byte **next_data);
  917.  
  918. /* ------------------------------------------------------------------------
  919.  * Function:      adfssectordiscop_write_sectors()
  920.  *
  921.  * Description:   Writes sectors to a disc
  922.  *
  923.  * Input:         flags - value of R1 on entry
  924.  *                disc_addr - value of R2 on entry
  925.  *                data - value of R3 on entry
  926.  *                size - value of R4 on entry
  927.  *
  928.  * Output:        next_disc_addr - value of R2 on exit
  929.  *                next_data - value of R3 on exit
  930.  *                unwritten - value of R4 on exit (X version only)
  931.  *
  932.  * Returns:       R4 (non-X version only)
  933.  *
  934.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x2.
  935.  */
  936.  
  937. extern os_error *xadfssectordiscop_write_sectors (bits flags,
  938.       filecore_sector_disc_address disc_addr,
  939.       byte const *data,
  940.       int size,
  941.       filecore_sector_disc_address *next_disc_addr,
  942.       byte **next_data,
  943.       int *unwritten);
  944. extern int adfssectordiscop_write_sectors (bits flags,
  945.       filecore_sector_disc_address disc_addr,
  946.       byte const *data,
  947.       int size,
  948.       filecore_sector_disc_address *next_disc_addr,
  949.       byte **next_data);
  950.  
  951. /* ------------------------------------------------------------------------
  952.  * Function:      adfssectordiscop_read_track()
  953.  *
  954.  * Description:   Reads a track from a floppy disc
  955.  *
  956.  * Input:         flags - value of R1 on entry
  957.  *                disc_addr - value of R2 on entry
  958.  *                data - value of R3 on entry
  959.  *
  960.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x3.
  961.  */
  962.  
  963. extern os_error *xadfssectordiscop_read_track (bits flags,
  964.       filecore_sector_disc_address disc_addr,
  965.       byte *data);
  966. extern void adfssectordiscop_read_track (bits flags,
  967.       filecore_sector_disc_address disc_addr,
  968.       byte *data);
  969.  
  970. /* ------------------------------------------------------------------------
  971.  * Function:      adfssectordiscop_read_id()
  972.  *
  973.  * Description:   Reads a hard disc ID
  974.  *
  975.  * Input:         flags - value of R1 on entry
  976.  *                disc_addr - value of R2 on entry
  977.  *                data - value of R3 on entry
  978.  *
  979.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x3.
  980.  */
  981.  
  982. extern os_error *xadfssectordiscop_read_id (bits flags,
  983.       filecore_sector_disc_address disc_addr,
  984.       byte *data);
  985. extern void adfssectordiscop_read_id (bits flags,
  986.       filecore_sector_disc_address disc_addr,
  987.       byte *data);
  988.  
  989. /* ------------------------------------------------------------------------
  990.  * Function:      adfssectordiscop_write_track()
  991.  *
  992.  * Description:   Writes a track to a disc
  993.  *
  994.  * Input:         flags - value of R1 on entry
  995.  *                disc_addr - value of R2 on entry
  996.  *                data - value of R3 on entry
  997.  *
  998.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x4.
  999.  */
  1000.  
  1001. extern os_error *xadfssectordiscop_write_track (bits flags,
  1002.       filecore_sector_disc_address disc_addr,
  1003.       byte const *data);
  1004. extern void adfssectordiscop_write_track (bits flags,
  1005.       filecore_sector_disc_address disc_addr,
  1006.       byte const *data);
  1007.  
  1008. /* ------------------------------------------------------------------------
  1009.  * Function:      adfssectordiscop_format_track()
  1010.  *
  1011.  * Description:   Formats a track of a disc
  1012.  *
  1013.  * Input:         flags - value of R1 on entry
  1014.  *                disc_addr - value of R2 on entry
  1015.  *                format - value of R4 on entry
  1016.  *
  1017.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x4, R3 = 0x0.
  1018.  */
  1019.  
  1020. extern os_error *xadfssectordiscop_format_track (bits flags,
  1021.       filecore_sector_disc_address disc_addr,
  1022.       filecore_track_format const *format);
  1023. extern void adfssectordiscop_format_track (bits flags,
  1024.       filecore_sector_disc_address disc_addr,
  1025.       filecore_track_format const *format);
  1026.  
  1027. /* ------------------------------------------------------------------------
  1028.  * Function:      adfssectordiscop_seek()
  1029.  *
  1030.  * Description:   Seeks to a disc location
  1031.  *
  1032.  * Input:         flags - value of R1 on entry
  1033.  *                disc_addr - value of R2 on entry
  1034.  *
  1035.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x5.
  1036.  */
  1037.  
  1038. extern os_error *xadfssectordiscop_seek (bits flags,
  1039.       filecore_sector_disc_address disc_addr);
  1040. extern void adfssectordiscop_seek (bits flags,
  1041.       filecore_sector_disc_address disc_addr);
  1042.  
  1043. /* ------------------------------------------------------------------------
  1044.  * Function:      adfssectordiscop_restore()
  1045.  *
  1046.  * Description:   Does a restore operation for a disc
  1047.  *
  1048.  * Input:         flags - value of R1 on entry
  1049.  *                disc_addr - value of R2 on entry
  1050.  *
  1051.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x6.
  1052.  */
  1053.  
  1054. extern os_error *xadfssectordiscop_restore (bits flags,
  1055.       filecore_sector_disc_address disc_addr);
  1056. extern void adfssectordiscop_restore (bits flags,
  1057.       filecore_sector_disc_address disc_addr);
  1058.  
  1059. /* ------------------------------------------------------------------------
  1060.  * Function:      adfssectordiscop_step_in()
  1061.  *
  1062.  * Description:   Steps a floppy disc in one track
  1063.  *
  1064.  * Input:         flags - value of R1 on entry
  1065.  *
  1066.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x7.
  1067.  */
  1068.  
  1069. extern os_error *xadfssectordiscop_step_in (bits flags);
  1070. extern void adfssectordiscop_step_in (bits flags);
  1071.  
  1072. /* ------------------------------------------------------------------------
  1073.  * Function:      adfssectordiscop_step_out()
  1074.  *
  1075.  * Description:   Steps a floppy disc out one track
  1076.  *
  1077.  * Input:         flags - value of R1 on entry
  1078.  *
  1079.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x8.
  1080.  */
  1081.  
  1082. extern os_error *xadfssectordiscop_step_out (bits flags);
  1083. extern void adfssectordiscop_step_out (bits flags);
  1084.  
  1085. /* ------------------------------------------------------------------------
  1086.  * Function:      adfssectordiscop_read_sectors_via_cache()
  1087.  *
  1088.  * Description:   Reads sectors of a disc using the RMA cache
  1089.  *
  1090.  * Input:         flags - value of R1 on entry
  1091.  *                disc_addr - value of R2 on entry
  1092.  *                data - value of R3 on entry
  1093.  *                size - value of R4 on entry
  1094.  *                cache_handle - value of R6 on entry
  1095.  *
  1096.  * Output:        next_disc_addr - value of R2 on exit
  1097.  *                next_data - value of R3 on exit
  1098.  *                unread - value of R4 on exit (X version only)
  1099.  *                cache_handle - value of R6 on exit
  1100.  *
  1101.  * Returns:       R4 (non-X version only)
  1102.  *
  1103.  * Other notes:   Calls SWI 0x4024D with R1 |= 0x9.
  1104.  */
  1105.  
  1106. extern os_error *xadfssectordiscop_read_sectors_via_cache (bits flags,
  1107.       filecore_sector_disc_address disc_addr,
  1108.       byte *data,
  1109.       int size,
  1110.       int cache_handle,
  1111.       filecore_sector_disc_address *next_disc_addr,
  1112.       byte **next_data,
  1113.       int *unread,
  1114.       int *cache_handle);
  1115. extern int adfssectordiscop_read_sectors_via_cache (bits flags,
  1116.       filecore_sector_disc_address disc_addr,
  1117.       byte *data,
  1118.       int size,
  1119.       int cache_handle,
  1120.       filecore_sector_disc_address *next_disc_addr,
  1121.       byte **next_data,
  1122.       int *cache_handle);
  1123.  
  1124. /* ------------------------------------------------------------------------
  1125.  * Function:      adfssectordiscop_specify()
  1126.  *
  1127.  * Description:   Does a specify operation on a hard disc
  1128.  *
  1129.  * Input:         flags - value of R1 on entry
  1130.  *                disc_addr - value of R2 on entry
  1131.  *
  1132.  * Other notes:   Calls SWI 0x4024D with R1 |= 0xF.
  1133.  */
  1134.  
  1135. extern os_error *xadfssectordiscop_specify (bits flags,
  1136.       filecore_sector_disc_address disc_addr);
  1137. extern void adfssectordiscop_specify (bits flags,
  1138.       filecore_sector_disc_address disc_addr);
  1139.  
  1140. /* ------------------------------------------------------------------------
  1141.  * Function:      adfs_lock_ide()
  1142.  *
  1143.  * Description:   Locks/unlocks IDE bus - RISC OS 3.5+
  1144.  *
  1145.  * Input:         lock - value of R0 on entry
  1146.  *
  1147.  * Other notes:   Calls SWI 0x40251.
  1148.  */
  1149.  
  1150. extern os_error *xadfs_lock_ide (bool lock);
  1151. __swi (0x40251) void adfs_lock_ide (bool lock);
  1152.  
  1153. /* ------------------------------------------------------------------------
  1154.  * Function:      adfs_free_space64()
  1155.  *
  1156.  * Description:   Returns 64-bit information on a disc's free space - RISC
  1157.  *                OS 3.6+
  1158.  *
  1159.  * Input:         disc_name - value of R0 on entry
  1160.  *
  1161.  * Output:        free_lo - value of R0 on exit
  1162.  *                free_hi - value of R1 on exit
  1163.  *                max - value of R2 on exit
  1164.  *
  1165.  * Other notes:   Calls SWI 0x40252.
  1166.  */
  1167.  
  1168. extern os_error *xadfs_free_space64 (char const *disc_name,
  1169.       bits *free_lo,
  1170.       int *free_hi,
  1171.       int *max);
  1172. extern void adfs_free_space64 (char const *disc_name,
  1173.       bits *free_lo,
  1174.       int *free_hi,
  1175.       int *max);
  1176.  
  1177. /* ------------------------------------------------------------------------
  1178.  * Function:      service_identify_format()
  1179.  *
  1180.  * Description:   Identify disc format name
  1181.  *
  1182.  * Input:         format - value of R0 on entry
  1183.  *
  1184.  * Output:        command - value of R0 on exit
  1185.  *                unclaimed - value of R1 on exit (X version only)
  1186.  *                disc_format_swi - value of R2 on exit
  1187.  *                disc_format_handle - value of R3 on exit
  1188.  *                layout_structure_swi - value of R4 on exit
  1189.  *                layout_structure_handle - value of R5 on exit
  1190.  *
  1191.  * Returns:       R1 (non-X version only)
  1192.  *
  1193.  * Other notes:   Calls SWI 0x30 with R1 = 0x6B.
  1194.  */
  1195.  
  1196. extern os_error *xservice_identify_format (char const *format,
  1197.       char **command,
  1198.       bool *unclaimed,
  1199.       int *disc_format_swi,
  1200.       int *disc_format_handle,
  1201.       int *layout_structure_swi,
  1202.       int *layout_structure_handle);
  1203. extern bool service_identify_format (char const *format,
  1204.       char **command,
  1205.       int *disc_format_swi,
  1206.       int *disc_format_handle,
  1207.       int *layout_structure_swi,
  1208.       int *layout_structure_handle);
  1209.  
  1210. /* ------------------------------------------------------------------------
  1211.  * Function:      service_display_format_help()
  1212.  *
  1213.  * Description:   Display list of available formats
  1214.  *
  1215.  * Output:        error - value of R0 on exit
  1216.  *                unclaimed - value of R1 on exit (X version only)
  1217.  *
  1218.  * Returns:       R1 (non-X version only)
  1219.  *
  1220.  * Other notes:   Calls SWI 0x30 with R0 = 0x0, R1 = 0x6C.
  1221.  */
  1222.  
  1223. extern os_error *xservice_display_format_help (os_error **error,
  1224.       bool *unclaimed);
  1225. extern bool service_display_format_help (os_error **error);
  1226.  
  1227. #ifdef __cplusplus
  1228.    }
  1229. #endif
  1230.  
  1231. #endif
  1232.