home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / Hdr / ADFS next >
Encoding:
Text File  |  1994-08-25  |  7.6 KB  |  307 lines

  1. ;AAsm header file for ADFS
  2. ;written by DefMod (Aug  8 1994) on Thu Aug 25 11:48:35 1994
  3.  
  4.         [       :LNOT: :DEF: Get_Types
  5.         GBLS    Get_Types
  6. Get_Types                       SETS    "GET OS:Hdr.Types"
  7.         |
  8. Get_Types                       SETS    ""
  9.         ]
  10.         $Get_Types
  11.  
  12.         [       :LNOT: :DEF: Get_OS
  13.         GBLS    Get_OS
  14. Get_OS                          SETS    "GET OS:Hdr.OS"
  15.         |
  16. Get_OS                          SETS    ""
  17.         ]
  18.         $Get_OS
  19.  
  20.         [       :LNOT: :DEF: Get_FileCore
  21.         GBLS    Get_FileCore
  22. Get_FileCore                    SETS    "GET OS:Hdr.FileCore"
  23.         |
  24. Get_FileCore                    SETS    ""
  25.         ]
  26.         $Get_FileCore
  27.  
  28.         [       :LNOT: :DEF: ADFS_Hdr
  29.         GBLS    ADFS_Hdr
  30.  
  31. ;Symbols for constants
  32. ADFS_ControllerDiscNotPresent   *       0
  33. ADFS_Controller1772             *       1
  34. ADFS_Controller71X              *       2
  35. ADFS_ControllerST506            *       3
  36. ADFS_ControllerIDE              *       4
  37.  
  38. ;Symbols for SWI's and SWI reason codes
  39. XADFS_DiscOp                    *       &60240
  40. ADFS_DiscOp                     *       &40240
  41.  
  42. ADFSDiscOp_Verify               *       &0
  43.    ;Entry
  44.    ;  R1 = &0 :OR: flags (Bits)
  45.    ;  R2 = disc_addr (FileCore_DiscAddress)
  46.    ;  R4 = size (Int)
  47.    ;Exit
  48.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  49.    ;  R4 = unverified (Int)
  50.  
  51. ADFSDiscOp_ReadSectors          *       &1
  52.    ;Entry
  53.    ;  R1 = &1 :OR: flags (Bits)
  54.    ;  R2 = disc_addr (FileCore_DiscAddress)
  55.    ;  R3 -> data (data)
  56.    ;  R4 = size (Int)
  57.    ;Exit
  58.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  59.    ;  R3 -> next_data (data)
  60.    ;  R4 = unread (Int)
  61.  
  62. ADFSDiscOp_WriteSectors         *       &2
  63.    ;Entry
  64.    ;  R1 = &2 :OR: flags (Bits)
  65.    ;  R2 = disc_addr (FileCore_DiscAddress)
  66.    ;  R3 -> data (data)
  67.    ;  R4 = size (Int)
  68.    ;Exit
  69.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  70.    ;  R3 -> next_data (data)
  71.    ;  R4 = unwritten (Int)
  72.  
  73. ADFSDiscOp_ReadTrack            *       &3
  74.    ;Entry
  75.    ;  R1 = &3 :OR: flags (Bits)
  76.    ;  R2 = disc_addr (FileCore_DiscAddress)
  77.    ;  R3 -> data (data)
  78.  
  79. ADFSDiscOp_ReadId               *       &3
  80.    ;Entry
  81.    ;  R1 = &3 :OR: flags (Bits)
  82.    ;  R2 = disc_addr (FileCore_DiscAddress)
  83.    ;  R3 -> data (data)
  84.  
  85. ADFSDiscOp_WriteTrack           *       &4
  86.    ;Entry
  87.    ;  R1 = &4 :OR: flags (Bits)
  88.    ;  R2 = disc_addr (FileCore_DiscAddress)
  89.    ;  R3 -> data (data)
  90.  
  91. ADFSDiscOp_FormatTrack          *       &4
  92.    ;Entry
  93.    ;  R1 = &4 :OR: flags (Bits)
  94.    ;  R2 = disc_addr (FileCore_DiscAddress)
  95.    ;  R3 = &0
  96.    ;  R4 -> format (FileCore_Format)
  97.  
  98. ADFSDiscOp_Seek                 *       &5
  99.    ;Entry
  100.    ;  R1 = &5 :OR: flags (Bits)
  101.    ;  R2 = disc_addr (FileCore_DiscAddress)
  102.  
  103. ADFSDiscOp_Restore              *       &6
  104.    ;Entry
  105.    ;  R1 = &6 :OR: flags (Bits)
  106.    ;  R2 = disc_addr (FileCore_DiscAddress)
  107.  
  108. ADFSDiscOp_StepIn               *       &7
  109.    ;Entry
  110.    ;  R1 = &7 :OR: flags (Bits)
  111.  
  112. ADFSDiscOp_StepOut              *       &8
  113.    ;Entry
  114.    ;  R1 = &8 :OR: flags (Bits)
  115.  
  116. ADFSDiscOp_ReadSectorsViaCache  *       &9
  117.    ;Entry
  118.    ;  R1 = &9 :OR: flags (Bits)
  119.    ;  R2 = disc_addr (FileCore_DiscAddress)
  120.    ;  R3 -> data (data)
  121.    ;  R4 = size (Int)
  122.    ;  R6 = cache_handle (Int)
  123.    ;Exit
  124.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  125.    ;  R3 -> next_data (data)
  126.    ;  R4 = unread (Int)
  127.    ;  R6 = cache_handle (Int)
  128.  
  129. ADFSDiscOp_Specify              *       &F
  130.    ;Entry
  131.    ;  R1 = &F :OR: flags (Bits)
  132.    ;  R2 = disc_addr (FileCore_DiscAddress)
  133.  
  134. XADFS_HDC                       *       &60241
  135. ADFS_HDC                        *       &40241
  136.    ;Entry
  137.    ;  R2 = controller (pointer to data)
  138.    ;  R3 = poll_location (pointer to Int)
  139.    ;  R4 = poll_bits (Bits)
  140.    ;  R5 = enable_location (pointer to data)
  141.    ;  R6 = enable_bits (Bits)
  142.  
  143. XADFS_Drives                    *       &60242
  144. ADFS_Drives                     *       &40242
  145.    ;Exit
  146.    ;  R0 = default_drive (Int)
  147.    ;  R1 = floppy_count (Int)
  148.    ;  R2 = hard_disc_count (Int)
  149.  
  150. XADFS_FreeSpace                 *       &60243
  151. ADFS_FreeSpace                  *       &40243
  152.    ;Entry
  153.    ;  R0 -> disc_name (String)
  154.    ;Exit
  155.    ;  R0 = free (Int)
  156.    ;  R1 = max (Int)
  157.  
  158. XADFS_Retries                   *       &60244
  159. ADFS_Retries                    *       &40244
  160.    ;Entry
  161.    ;  R0 = mask (Bits)
  162.    ;  R1 = value (Bits)
  163.    ;Exit
  164.    ;  R1 corrupted
  165.    ;  R2 = old_value (Bits)
  166.    ;  R3 = new_value (Bits)
  167.  
  168. XADFS_DescribeDisc              *       &60245
  169. ADFS_DescribeDisc               *       &40245
  170.    ;Entry
  171.    ;  R0 -> disc_name (String)
  172.    ;  R1 = disc (pointer to FileCore_Disc)
  173.  
  174. XADFS_VetFormat                 *       &60246
  175. ADFS_VetFormat                  *       &40246
  176.    ;Entry
  177.    ;  R0 -> format (FileCore_Format)
  178.    ;  R1 = drive_no (Int)
  179.  
  180. XADFS_FlpProcessDCB             *       &60247
  181. ADFS_FlpProcessDCB              *       &40247
  182.  
  183. XADFS_ControllerType            *       &60248
  184. ADFS_ControllerType             *       &40248
  185.    ;Entry
  186.    ;  R0 = drive_no (Int)
  187.    ;Exit
  188.    ;  R0 = controller (Int)
  189.  
  190. XADFS_PowerControl              *       &60249
  191. ADFS_PowerControl               *       &40249
  192.  
  193. ADFSPowerControl_ReadSpin       *       &0
  194.    ;Entry
  195.    ;  R0 = &0
  196.    ;  R1 = drive_no (Int)
  197.    ;Exit
  198.    ;  R2 = spinning (Bool)
  199.  
  200. ADFSPowerControl_SetAutospindown *       &1
  201.    ;Entry
  202.    ;  R0 = &1
  203.    ;  R1 = drive_no (Int)
  204.    ;  R2 = spindown_time (Int)
  205.    ;Exit
  206.    ;  R3 = old_spindown_time (Int)
  207.  
  208. ADFSPowerControl_SetSpin        *       &2
  209.    ;Entry
  210.    ;  R0 = &2
  211.    ;  R1 = drive_no (Int)
  212.    ;  R2 = spinning (Bool)
  213.  
  214. XADFS_SetIDEController          *       &6024A
  215. ADFS_SetIDEController           *       &4024A
  216.    ;Entry
  217.    ;  R2 = controller (pointer to data)
  218.    ;  R3 = status_location (pointer to Int)
  219.    ;  R4 = status_bits (Bits)
  220.    ;  R5 = irq_location (pointer to Int)
  221.    ;  R6 = irq_bits (Bits)
  222.    ;  R7 -> read_code (code)
  223.    ;  R8 -> write_code (code)
  224.  
  225. XADFS_IDEUserOp                 *       &6024B
  226. ADFS_IDEUserOp                  *       &4024B
  227.    ;Entry
  228.    ;  R0 = op (Bits)
  229.    ;  R2 -> commands (data)
  230.    ;  R3 = buffer (pointer to data)
  231.    ;  R4 = size (Int)
  232.    ;  R5 = timeout (Int)
  233.    ;Exit
  234.    ;  R0 = status (Int)
  235.    ;  R4 = untransferred (Int)
  236.    ;  R5 corrupted
  237.  
  238. XADFS_MiscOp                    *       &6024C
  239. ADFS_MiscOp                     *       &4024C
  240.  
  241. ADFSMiscOp_Mount                *       &0
  242.    ;Entry
  243.    ;  R0 = &0
  244.    ;  R1 = drive_no (Int)
  245.    ;  R2 = disc_addr (FileCore_DiscAddress)
  246.    ;  R3 = buffer (pointer to data)
  247.    ;  R4 = size (Int)
  248.    ;  R5 = disc (pointer to FileCore_Disc)
  249.  
  250. ADFSMiscOp_PollChanged          *       &1
  251.    ;Entry
  252.    ;  R0 = &1
  253.    ;  R1 = drive_no (Int)
  254.    ;  R2 = sequence_no (Int)
  255.    ;Exit
  256.    ;  R2 = sequence_no_out (Int)
  257.    ;  R3 = result (Bits)
  258.  
  259. ADFSMiscOp_LockDrive            *       &2
  260.    ;Entry
  261.    ;  R0 = &2
  262.    ;  R1 = drive_no (Int)
  263.  
  264. ADFSMiscOp_UnlockDrive          *       &3
  265.    ;Entry
  266.    ;  R0 = &3
  267.    ;  R1 = drive_no (Int)
  268.  
  269. ADFSMiscOp_PollPeriod           *       &4
  270.    ;Entry
  271.    ;  R0 = &4
  272.    ;  R1 -> disc_name (String)
  273.    ;Exit
  274.    ;  R5 = poll_period (Int)
  275.    ;  R6 -> media_type (String)
  276.  
  277. ADFSMiscOp_EjectDisc            *       &5
  278.    ;Entry
  279.    ;  R0 = &5
  280.    ;  R1 = drive_no (Int)
  281.  
  282. XADFS_ECCSAndRetries            *       &60250
  283. ADFS_ECCSAndRetries             *       &40250
  284.  
  285. Service_IdentifyFormat          *       &6B
  286.    ;Entry
  287.    ;  R0 -> format (String)
  288.    ;  R1 = &6B
  289.    ;Exit
  290.    ;  R0 -> command (String)
  291.    ;  R1 = unclaimed (Bool)
  292.    ;  R2 = disc_format_swi (Int)
  293.    ;  R3 = disc_format_handle (Int)
  294.    ;  R4 = layout_structure_swi (Int)
  295.    ;  R5 = layout_structure_handle (Int)
  296.  
  297. Service_DisplayFormatHelp       *       &6C
  298.    ;Entry
  299.    ;  R0 = &0
  300.    ;  R1 = &6C
  301.    ;Exit
  302.    ;  R0 -> error (OS_Error)
  303.    ;  R1 = unclaimed (Bool)
  304.  
  305.         ]
  306.         END
  307.