home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Computer / Hdr / ADFS next >
Encoding:
Text File  |  1995-08-22  |  11.0 KB  |  434 lines

  1. ;Assembler header file for ADFS
  2. ;written by DefMod (Jun 30 1995) on Tue Aug 22 14:44:34 1995
  3. ;Jonathan Coxhead, Acorn Computers Ltd
  4.  
  5.         [       :LNOT: :DEF: Get_Types
  6.         GBLS    Get_Types
  7.         ]
  8.         [       :LNOT: :DEF: Types_Hdr
  9. Get_Types                       SETS    "GET OS:Hdr.Types"
  10.         |
  11. Get_Types                       SETS    ""
  12.         ]
  13.         $Get_Types
  14.  
  15.         [       :LNOT: :DEF: Get_OS
  16.         GBLS    Get_OS
  17.         ]
  18.         [       :LNOT: :DEF: OS_Hdr
  19. Get_OS                          SETS    "GET OS:Hdr.OS"
  20.         |
  21. Get_OS                          SETS    ""
  22.         ]
  23.         $Get_OS
  24.  
  25.         [       :LNOT: :DEF: Get_FileCore
  26.         GBLS    Get_FileCore
  27.         ]
  28.         [       :LNOT: :DEF: FileCore_Hdr
  29. Get_FileCore                    SETS    "GET OS:Hdr.FileCore"
  30.         |
  31. Get_FileCore                    SETS    ""
  32.         ]
  33.         $Get_FileCore
  34.  
  35.         [       :LNOT: :DEF: ADFS_Hdr
  36.         GBLS    ADFS_Hdr
  37.  
  38. ;Symbols for constants
  39. Error_ADFSDriverInUse           *       &108A0
  40. ADFS_ControllerDiscNotPresent   *       &0
  41. ADFS_Controller1772             *       &1
  42. ADFS_Controller71X              *       &2
  43. ADFS_ControllerST506            *       &3
  44. ADFS_ControllerIDE              *       &4
  45.  
  46. ;Symbols for structure offsets and sizes
  47. ADFS_Controller                 *       Int
  48.  
  49.  
  50. ;Symbols for SWI's and SWI reason codes
  51. XADFS_DiscOp                    *       &60240
  52. ADFS_DiscOp                     *       &40240
  53.  
  54. ADFSDiscOp_Verify               *       &0
  55.    ;Entry
  56.    ;  R1 = &0 :OR: flags (Bits)
  57.    ;  R2 = disc_addr (FileCore_DiscAddress)
  58.    ;  R4 = size (Int)
  59.    ;Exit
  60.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  61.    ;  R4 = unverified (Int)
  62.  
  63. ADFSDiscOp_ReadSectors          *       &1
  64.    ;Entry
  65.    ;  R1 = &1 :OR: flags (Bits)
  66.    ;  R2 = disc_addr (FileCore_DiscAddress)
  67.    ;  R3 = data (pointer to data)
  68.    ;  R4 = size (Int)
  69.    ;Exit
  70.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  71.    ;  R3 = next_data (pointer to data)
  72.    ;  R4 = unread (Int)
  73.  
  74. ADFSDiscOp_WriteSectors         *       &2
  75.    ;Entry
  76.    ;  R1 = &2 :OR: flags (Bits)
  77.    ;  R2 = disc_addr (FileCore_DiscAddress)
  78.    ;  R3 -> data (data)
  79.    ;  R4 = size (Int)
  80.    ;Exit
  81.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  82.    ;  R3 -> next_data (data)
  83.    ;  R4 = unwritten (Int)
  84.  
  85. ADFSDiscOp_ReadTrack            *       &3
  86.    ;Entry
  87.    ;  R1 = &3 :OR: flags (Bits)
  88.    ;  R2 = disc_addr (FileCore_DiscAddress)
  89.    ;  R3 = data (pointer to data)
  90.  
  91. ADFSDiscOp_ReadId               *       &3
  92.    ;Entry
  93.    ;  R1 = &3 :OR: flags (Bits)
  94.    ;  R2 = disc_addr (FileCore_DiscAddress)
  95.    ;  R3 = data (pointer to data)
  96.  
  97. ADFSDiscOp_WriteTrack           *       &4
  98.    ;Entry
  99.    ;  R1 = &4 :OR: flags (Bits)
  100.    ;  R2 = disc_addr (FileCore_DiscAddress)
  101.    ;  R3 -> data (data)
  102.  
  103. ADFSDiscOp_FormatTrack          *       &4
  104.    ;Entry
  105.    ;  R1 = &4 :OR: flags (Bits)
  106.    ;  R2 = disc_addr (FileCore_DiscAddress)
  107.    ;  R3 = &0
  108.    ;  R4 -> format (FileCore_TrackFormat)
  109.  
  110. ADFSDiscOp_Seek                 *       &5
  111.    ;Entry
  112.    ;  R1 = &5 :OR: flags (Bits)
  113.    ;  R2 = disc_addr (FileCore_DiscAddress)
  114.  
  115. ADFSDiscOp_Restore              *       &6
  116.    ;Entry
  117.    ;  R1 = &6 :OR: flags (Bits)
  118.    ;  R2 = disc_addr (FileCore_DiscAddress)
  119.  
  120. ADFSDiscOp_StepIn               *       &7
  121.    ;Entry
  122.    ;  R1 = &7 :OR: flags (Bits)
  123.  
  124. ADFSDiscOp_StepOut              *       &8
  125.    ;Entry
  126.    ;  R1 = &8 :OR: flags (Bits)
  127.  
  128. ADFSDiscOp_ReadSectorsViaCache  *       &9
  129.    ;Entry
  130.    ;  R1 = &9 :OR: flags (Bits)
  131.    ;  R2 = disc_addr (FileCore_DiscAddress)
  132.    ;  R3 = data (pointer to data)
  133.    ;  R4 = size (Int)
  134.    ;  R6 = cache_handle (Int)
  135.    ;Exit
  136.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  137.    ;  R3 = next_data (pointer to data)
  138.    ;  R4 = unread (Int)
  139.    ;  R6 = cache_handle (Int)
  140.  
  141. ADFSDiscOp_Specify              *       &F
  142.    ;Entry
  143.    ;  R1 = &F :OR: flags (Bits)
  144.    ;  R2 = disc_addr (FileCore_DiscAddress)
  145.  
  146. XADFS_HDC                       *       &60241
  147. ADFS_HDC                        *       &40241
  148.    ;Entry
  149.    ;  R2 = controller (pointer to data)
  150.    ;  R3 = poll_location (pointer to Int)
  151.    ;  R4 = poll_bits (Bits)
  152.    ;  R5 = enable_location (pointer to data)
  153.    ;  R6 = enable_bits (Bits)
  154.  
  155. XADFS_Drives                    *       &60242
  156. ADFS_Drives                     *       &40242
  157.    ;Exit
  158.    ;  R0 = default_drive (Int)
  159.    ;  R1 = floppy_count (Int)
  160.    ;  R2 = hard_disc_count (Int)
  161.  
  162. XADFS_FreeSpace                 *       &60243
  163. ADFS_FreeSpace                  *       &40243
  164.    ;Entry
  165.    ;  R0 -> disc_name (String)
  166.    ;Exit
  167.    ;  R0 = free (Int)
  168.    ;  R1 = max (Int)
  169.  
  170. XADFS_Retries                   *       &60244
  171. ADFS_Retries                    *       &40244
  172.    ;Entry
  173.    ;  R0 = mask (Bits)
  174.    ;  R1 = value (Bits)
  175.    ;Exit
  176.    ;  R1 corrupted
  177.    ;  R2 = old_value (Bits)
  178.    ;  R3 = new_value (Bits)
  179.  
  180. XADFS_DescribeDisc              *       &60245
  181. ADFS_DescribeDisc               *       &40245
  182.    ;Entry
  183.    ;  R0 -> disc_name (String)
  184.    ;  R1 = disc (pointer to FileCore_Disc)
  185.  
  186. XADFS_VetFormat                 *       &60246
  187. ADFS_VetFormat                  *       &40246
  188.    ;Entry
  189.    ;  R0 = format (pointer to FileCore_Format)
  190.    ;  R1 = drive_no (Int)
  191.  
  192. XADFS_FlpProcessDCB             *       &60247
  193. ADFS_FlpProcessDCB              *       &40247
  194.  
  195. XADFS_ControllerType            *       &60248
  196. ADFS_ControllerType             *       &40248
  197.    ;Entry
  198.    ;  R0 = drive_no (Int)
  199.    ;Exit
  200.    ;  R0 = controller (ADFS_Controller)
  201.  
  202. XADFS_PowerControl              *       &60249
  203. ADFS_PowerControl               *       &40249
  204.  
  205. ADFSPowerControl_ReadSpin       *       &0
  206.    ;Entry
  207.    ;  R0 = &0
  208.    ;  R1 = drive_no (Int)
  209.    ;Exit
  210.    ;  R2 = spinning (Bool)
  211.  
  212. ADFSPowerControl_SetAutospindown *       &1
  213.    ;Entry
  214.    ;  R0 = &1
  215.    ;  R1 = drive_no (Int)
  216.    ;  R2 = spindown_time (Int)
  217.    ;Exit
  218.    ;  R3 = old_spindown_time (Int)
  219.  
  220. ADFSPowerControl_SetSpin        *       &2
  221.    ;Entry
  222.    ;  R0 = &2
  223.    ;  R1 = drive_no (Int)
  224.    ;  R2 = spinning (Bool)
  225.  
  226. XADFS_SetIDEController          *       &6024A
  227. ADFS_SetIDEController           *       &4024A
  228.    ;Entry
  229.    ;  R2 = controller (pointer to data)
  230.    ;  R3 = status_location (pointer to Int)
  231.    ;  R4 = status_bits (Bits)
  232.    ;  R5 = irq_location (pointer to Int)
  233.    ;  R6 = irq_bits (Bits)
  234.    ;  R7 -> read_code (code)
  235.    ;  R8 -> write_code (code)
  236.  
  237. XADFS_IDEUserOp                 *       &6024B
  238. ADFS_IDEUserOp                  *       &4024B
  239.    ;Entry
  240.    ;  R0 = op (Bits)
  241.    ;  R2 -> commands (data)
  242.    ;  R3 = buffer (pointer to data)
  243.    ;  R4 = size (Int)
  244.    ;  R5 = timeout (Int)
  245.    ;Exit
  246.    ;  R0 = status (Int)
  247.    ;  R4 = untransferred (Int)
  248.    ;  R5 corrupted
  249.  
  250. XADFS_MiscOp                    *       &6024C
  251. ADFS_MiscOp                     *       &4024C
  252.  
  253. ADFSMiscOp_Mount                *       &0
  254.    ;Entry
  255.    ;  R0 = &0
  256.    ;  R1 = drive_no (Int)
  257.    ;  R2 = disc_addr (FileCore_DiscAddress)
  258.    ;  R3 = buffer (pointer to data)
  259.    ;  R4 = size (Int)
  260.    ;  R5 = disc (pointer to FileCore_Disc)
  261.  
  262. ADFSMiscOp_PollChanged          *       &1
  263.    ;Entry
  264.    ;  R0 = &1
  265.    ;  R1 = drive_no (Int)
  266.    ;  R2 = sequence_no (Int)
  267.    ;Exit
  268.    ;  R2 = sequence_no_out (Int)
  269.    ;  R3 = result (Bits)
  270.  
  271. ADFSMiscOp_LockDrive            *       &2
  272.    ;Entry
  273.    ;  R0 = &2
  274.    ;  R1 = drive_no (Int)
  275.  
  276. ADFSMiscOp_UnlockDrive          *       &3
  277.    ;Entry
  278.    ;  R0 = &3
  279.    ;  R1 = drive_no (Int)
  280.  
  281. ADFSMiscOp_PollPeriod           *       &4
  282.    ;Entry
  283.    ;  R0 = &4
  284.    ;  R1 -> disc_name (String)
  285.    ;Exit
  286.    ;  R5 = poll_period (Int)
  287.    ;  R6 -> media_type (String)
  288.  
  289. ADFSMiscOp_EjectDisc            *       &5
  290.    ;Entry
  291.    ;  R0 = &5
  292.    ;  R1 = drive_no (Int)
  293.  
  294. ADFSMiscOp_ReadInfo             *       &6
  295.    ;Entry
  296.    ;  R0 = &6
  297.    ;Exit
  298.    ;  R0 -> info (FileCore_Info)
  299.  
  300. XADFS_SectorDiscOp              *       &6024D
  301. ADFS_SectorDiscOp               *       &4024D
  302.  
  303. ADFSSectorDiscOp_Verify         *       &0
  304.    ;Entry
  305.    ;  R1 = &0 :OR: flags (Bits)
  306.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  307.    ;  R4 = size (Int)
  308.    ;Exit
  309.    ;  R2 = next_disc_addr (FileCore_SectorDiscAddress)
  310.    ;  R4 = unverified (Int)
  311.  
  312. ADFSSectorDiscOp_ReadSectors    *       &1
  313.    ;Entry
  314.    ;  R1 = &1 :OR: flags (Bits)
  315.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  316.    ;  R3 = data (pointer to data)
  317.    ;  R4 = size (Int)
  318.    ;Exit
  319.    ;  R2 = next_disc_addr (FileCore_SectorDiscAddress)
  320.    ;  R3 = next_data (pointer to data)
  321.    ;  R4 = unread (Int)
  322.  
  323. ADFSSectorDiscOp_WriteSectors   *       &2
  324.    ;Entry
  325.    ;  R1 = &2 :OR: flags (Bits)
  326.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  327.    ;  R3 -> data (data)
  328.    ;  R4 = size (Int)
  329.    ;Exit
  330.    ;  R2 = next_disc_addr (FileCore_SectorDiscAddress)
  331.    ;  R3 -> next_data (data)
  332.    ;  R4 = unwritten (Int)
  333.  
  334. ADFSSectorDiscOp_ReadTrack      *       &3
  335.    ;Entry
  336.    ;  R1 = &3 :OR: flags (Bits)
  337.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  338.    ;  R3 = data (pointer to data)
  339.  
  340. ADFSSectorDiscOp_ReadId         *       &3
  341.    ;Entry
  342.    ;  R1 = &3 :OR: flags (Bits)
  343.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  344.    ;  R3 = data (pointer to data)
  345.  
  346. ADFSSectorDiscOp_WriteTrack     *       &4
  347.    ;Entry
  348.    ;  R1 = &4 :OR: flags (Bits)
  349.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  350.    ;  R3 -> data (data)
  351.  
  352. ADFSSectorDiscOp_FormatTrack    *       &4
  353.    ;Entry
  354.    ;  R1 = &4 :OR: flags (Bits)
  355.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  356.    ;  R3 = &0
  357.    ;  R4 -> format (FileCore_TrackFormat)
  358.  
  359. ADFSSectorDiscOp_Seek           *       &5
  360.    ;Entry
  361.    ;  R1 = &5 :OR: flags (Bits)
  362.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  363.  
  364. ADFSSectorDiscOp_Restore        *       &6
  365.    ;Entry
  366.    ;  R1 = &6 :OR: flags (Bits)
  367.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  368.  
  369. ADFSSectorDiscOp_StepIn         *       &7
  370.    ;Entry
  371.    ;  R1 = &7 :OR: flags (Bits)
  372.  
  373. ADFSSectorDiscOp_StepOut        *       &8
  374.    ;Entry
  375.    ;  R1 = &8 :OR: flags (Bits)
  376.  
  377. ADFSSectorDiscOp_ReadSectorsViaCache *       &9
  378.    ;Entry
  379.    ;  R1 = &9 :OR: flags (Bits)
  380.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  381.    ;  R3 = data (pointer to data)
  382.    ;  R4 = size (Int)
  383.    ;  R6 = cache_handle (Int)
  384.    ;Exit
  385.    ;  R2 = next_disc_addr (FileCore_SectorDiscAddress)
  386.    ;  R3 = next_data (pointer to data)
  387.    ;  R4 = unread (Int)
  388.    ;  R6 = cache_handle (Int)
  389.  
  390. ADFSSectorDiscOp_Specify        *       &F
  391.    ;Entry
  392.    ;  R1 = &F :OR: flags (Bits)
  393.    ;  R2 = disc_addr (FileCore_SectorDiscAddress)
  394.  
  395. XADFS_ECCSAndRetries            *       &60250
  396. ADFS_ECCSAndRetries             *       &40250
  397.  
  398. XADFS_LockIDE                   *       &60251
  399. ADFS_LockIDE                    *       &40251
  400.    ;Entry
  401.    ;  R0 = lock (Bool)
  402.  
  403. XADFS_FreeSpace64               *       &60252
  404. ADFS_FreeSpace64                *       &40252
  405.    ;Entry
  406.    ;  R0 -> disc_name (String)
  407.    ;Exit
  408.    ;  R0 = free_lo (Bits)
  409.    ;  R1 = free_hi (Int)
  410.    ;  R2 = max (Int)
  411.  
  412. Service_IdentifyFormat          *       &6B
  413.    ;Entry
  414.    ;  R0 -> format (String)
  415.    ;  R1 = &6B
  416.    ;Exit
  417.    ;  R0 -> command (String)
  418.    ;  R1 = unclaimed (Bool)
  419.    ;  R2 = disc_format_swi (Int)
  420.    ;  R3 = disc_format_handle (Int)
  421.    ;  R4 = layout_structure_swi (Int)
  422.    ;  R5 = layout_structure_handle (Int)
  423.  
  424. Service_DisplayFormatHelp       *       &6C
  425.    ;Entry
  426.    ;  R0 = &0
  427.    ;  R1 = &6C
  428.    ;Exit
  429.    ;  R0 -> error (OS_Error)
  430.    ;  R1 = unclaimed (Bool)
  431.  
  432.         ]
  433.         END
  434.