home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / Hdr / FileCore < prev    next >
Encoding:
Text File  |  1994-09-22  |  11.6 KB  |  382 lines

  1. ;AAsm header file for FileCore
  2. ;written by DefMod (Aug  8 1994) on Thu Sep 22 15:28:42 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: FileCore_Hdr
  21.         GBLS    FileCore_Hdr
  22.  
  23. ;Symbols for constants
  24. FileCore_HardDiscsNeedFIQ       *       &1
  25. FileCore_FloppiesNeedFIQ        *       &2
  26. FileCore_UseScratchForTemporary *       &8
  27. FileCore_HardDiscsCanMount      *       &10
  28. FileCore_HardDiscsCanPollChange *       &20
  29. FileCore_FloppiesCanEject       *       &40
  30. FileCore_HardDiscsCanEject      *       &100
  31. FileCore_LowSectorSequenceSides *       &40
  32. FileCore_LowSectorDoubleStep    *       &80
  33. FileCore_DiscAddressOffset      *       &1FFFFFFF
  34. FileCore_DiscAddressDrive       *       &E0000000
  35. FileCore_DiscAddressOffsetShift *       0
  36. FileCore_DiscAddressDriveShift  *       29
  37. FileCore_DiscOpGivenAlternativeDefectList *       &10
  38. FileCore_DiscOpGivenSectorList  *       &20
  39. FileCore_DiscOpIgnoreEscape     *       &40
  40. FileCore_DiscOpIgnoreTimeout    *       &80
  41. FileCore_DiscOpAlternativeRecord *       &FFFFFF00
  42. FileCore_DiscOpAlternativeRecordShift *       6
  43. FileCore_CreateFloppyCount      *       &FF
  44. FileCore_CreateFloppyCountShift *       0
  45. FileCore_CreateHardDiscCount    *       &FF00
  46. FileCore_CreateHardDiscCountShift *       8
  47. FileCore_CreateDefaultDrive     *       &FF0000
  48. FileCore_CreateDefaultDriveShift *       16
  49. FileCore_CreateNoDirState       *       &40000000
  50. FileCore_FloppyOldStructure     *       &80
  51. FileCore_FloppyOldMap           *       &100
  52. FileCore_FormatL                *       128
  53. FileCore_FormatD                *       129
  54. FileCore_FormatE                *       130
  55. FileCore_FormatF                *       131
  56. FileCore_PollNotChanged         *       &1
  57. FileCore_PollMayBeChanged       *       &2
  58. FileCore_PollChanged            *       &4
  59. FileCore_PollEmpty              *       &8
  60. FileCore_PollReady              *       &10
  61. FileCore_PollFortyTrack         *       &20
  62. FileCore_PollEmptyWorks         *       &40
  63. FileCore_PollChangedWorks       *       &80
  64. FileCore_PollHighDensity        *       &100
  65. FileCore_PollDensitySenseWorks  *       &200
  66. FileCore_PollReadyWorks         *       &400
  67.  
  68. ;Symbols for structure offsets and sizes
  69.                                 ^       0
  70. FileCore_Descriptor_flags       #       3*Byte
  71. FileCore_Descriptor_fs_no       #       Byte
  72. FileCore_Descriptor_title_offset #       Int
  73. FileCore_Descriptor_boot_text_offset #       Int
  74. FileCore_Descriptor_disc_op_offset #       Int
  75. FileCore_Descriptor_misc_op_offset #       Int
  76. FileCore_Descriptor             *       @
  77.  
  78.                                 ^       0
  79. FileCore_Disc_log2secsize       #       Byte
  80. FileCore_Disc_secspertrack      #       Byte
  81. FileCore_Disc_heads             #       Byte
  82. FileCore_Disc_density           #       Byte
  83. FileCore_Disc_idlen             #       Byte
  84. FileCore_Disc_log2bpmb          #       Byte
  85. FileCore_Disc_skew              #       Byte
  86. FileCore_Disc_bootoption        #       Byte
  87. FileCore_Disc_lowsector         #       Byte
  88. FileCore_Disc_nzones            #       Byte
  89. FileCore_Disc_zone_spare        #       Short
  90. FileCore_Disc_root              #       Int
  91. FileCore_Disc_disc_size         #       Int
  92. FileCore_Disc_disc_id           #       Short
  93. FileCore_Disc_disc_name         #       10*Char
  94. FileCore_Disc_disctype          #       Int
  95. FileCore_Disc_reserved          #       24*Byte
  96. FileCore_Disc                   *       @
  97.  
  98. FileCore_DiscAddress            *       Bits
  99.  
  100.                                 ^       0
  101. FileCore_Format_sector_size     #       Int
  102. FileCore_Format_gap1_side0      #       Int
  103. FileCore_Format_gap1_side1      #       Int
  104. FileCore_Format_gap3            #       Int
  105. FileCore_Format_secspertrack    #       Byte
  106. FileCore_Format_density         #       Byte
  107. FileCore_Format_options         #       Byte
  108. FileCore_Format_lowsector       #       Byte
  109. FileCore_Format_interleave      #       Byte
  110. FileCore_Format_side_skew       #       Byte
  111. FileCore_Format_track_skew      #       Byte
  112. FileCore_Format_sector_fill     #       Byte
  113. FileCore_Format_track_count     #       Int
  114. FileCore_Format_reserved        #       36*Byte
  115. FileCore_Format                 *       @
  116.  
  117.                                 ^       0
  118. FileCore_TrackFormat_sector_size #       Int
  119. FileCore_TrackFormat_gap1_side0 #       Int
  120. FileCore_TrackFormat_gap1_side1 #       Int
  121. FileCore_TrackFormat_gap3       #       Int
  122. FileCore_TrackFormat_secspertrack #       Byte
  123. FileCore_TrackFormat_density    #       Byte
  124. FileCore_TrackFormat_options    #       Byte
  125. FileCore_TrackFormat_sector_fill #       Byte
  126. FileCore_TrackFormat_track_count #       Int
  127. FileCore_TrackFormat_reserved   #       12*Byte
  128. FileCore_TrackFormat_sectors    #       Bits
  129. FileCore_TrackFormat            *       @
  130.  
  131.                                 ^       0
  132. FileCore_DefectList_defect      #       Int
  133. FileCore_DefectList             *       @
  134.  
  135.  
  136. ;Symbols for SWI's and SWI reason codes
  137. XFileCore_DiscOp                *       &60540
  138. FileCore_DiscOp                 *       &40540
  139.  
  140. FileCoreDiscOp_Verify           *       &0
  141.    ;Entry
  142.    ;  R1 = &0 :OR: flags (Bits)
  143.    ;  R2 = disc_addr (FileCore_DiscAddress)
  144.    ;  R4 = size (Int)
  145.    ;  R8 = instance (pointer to Void)
  146.    ;Exit
  147.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  148.    ;  R4 = unverified (Int)
  149.  
  150. FileCoreDiscOp_ReadSectors      *       &1
  151.    ;Entry
  152.    ;  R1 = &1 :OR: flags (Bits)
  153.    ;  R2 = disc_addr (FileCore_DiscAddress)
  154.    ;  R3 -> data (data)
  155.    ;  R4 = size (Int)
  156.    ;  R8 = instance (pointer to Void)
  157.    ;Exit
  158.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  159.    ;  R3 -> next_data (data)
  160.    ;  R4 = unread (Int)
  161.  
  162. FileCoreDiscOp_WriteSectors     *       &2
  163.    ;Entry
  164.    ;  R1 = &2 :OR: flags (Bits)
  165.    ;  R2 = disc_addr (FileCore_DiscAddress)
  166.    ;  R3 -> data (data)
  167.    ;  R4 = size (Int)
  168.    ;  R8 = instance (pointer to Void)
  169.    ;Exit
  170.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  171.    ;  R3 -> next_data (data)
  172.    ;  R4 = unwritten (Int)
  173.  
  174. FileCoreDiscOp_ReadTrack        *       &3
  175.    ;Entry
  176.    ;  R1 = &3 :OR: flags (Bits)
  177.    ;  R2 = disc_addr (FileCore_DiscAddress)
  178.    ;  R3 -> data (data)
  179.    ;  R8 = instance (pointer to Void)
  180.  
  181. FileCoreDiscOp_ReadId           *       &3
  182.    ;Entry
  183.    ;  R1 = &3 :OR: flags (Bits)
  184.    ;  R2 = disc_addr (FileCore_DiscAddress)
  185.    ;  R3 -> data (data)
  186.    ;  R8 = instance (pointer to Void)
  187.  
  188. FileCoreDiscOp_WriteTrack       *       &4
  189.    ;Entry
  190.    ;  R1 = &4 :OR: flags (Bits)
  191.    ;  R2 = disc_addr (FileCore_DiscAddress)
  192.    ;  R3 -> data (data)
  193.    ;  R8 = instance (pointer to Void)
  194.  
  195. FileCoreDiscOp_FormatTrack      *       &4
  196.    ;Entry
  197.    ;  R1 = &4 :OR: flags (Bits)
  198.    ;  R2 = disc_addr (FileCore_DiscAddress)
  199.    ;  R3 = &0
  200.    ;  R4 -> track_format (FileCore_TrackFormat)
  201.    ;  R8 = instance (pointer to Void)
  202.  
  203. FileCoreDiscOp_Seek             *       &5
  204.    ;Entry
  205.    ;  R1 = &5 :OR: flags (Bits)
  206.    ;  R2 = disc_addr (FileCore_DiscAddress)
  207.    ;  R8 = instance (pointer to Void)
  208.  
  209. FileCoreDiscOp_Restore          *       &6
  210.    ;Entry
  211.    ;  R1 = &6 :OR: flags (Bits)
  212.    ;  R2 = disc_addr (FileCore_DiscAddress)
  213.    ;  R8 = instance (pointer to Void)
  214.  
  215. FileCoreDiscOp_StepIn           *       &7
  216.    ;Entry
  217.    ;  R1 = &7 :OR: flags (Bits)
  218.    ;  R8 = instance (pointer to Void)
  219.  
  220. FileCoreDiscOp_StepOut          *       &8
  221.    ;Entry
  222.    ;  R1 = &8 :OR: flags (Bits)
  223.    ;  R8 = instance (pointer to Void)
  224.  
  225. FileCoreDiscOp_ReadSectorsViaCache *       &9
  226.    ;Entry
  227.    ;  R1 = &9 :OR: flags (Bits)
  228.    ;  R2 = disc_addr (FileCore_DiscAddress)
  229.    ;  R3 -> data (data)
  230.    ;  R4 = size (Int)
  231.    ;  R6 = cache_handle (Int)
  232.    ;  R8 = instance (pointer to Void)
  233.    ;Exit
  234.    ;  R2 = next_disc_addr (FileCore_DiscAddress)
  235.    ;  R3 -> next_data (data)
  236.    ;  R4 = unread (Int)
  237.    ;  R6 = cache_handle_out (Int)
  238.  
  239. FileCoreDiscOp_Specify          *       &F
  240.    ;Entry
  241.    ;  R1 = &F :OR: flags (Bits)
  242.    ;  R2 = disc_addr (FileCore_DiscAddress)
  243.    ;  R8 = instance (pointer to Void)
  244.  
  245. XFileCore_Create                *       &60541
  246. FileCore_Create                 *       &40541
  247.    ;Entry
  248.    ;  R0 -> descriptor (FileCore_Descriptor)
  249.    ;  R1 -> module_base (data)
  250.    ;  R2 = word (pointer to data)
  251.    ;  R3 = options (Bits)
  252.    ;  R4 = dir_cache_size (Int)
  253.    ;  R5 = file_cache_buffer_count (Int)
  254.    ;  R6 = map_sizes (Bits)
  255.    ;Exit
  256.    ;  R0 = instance (pointer to Void)
  257.    ;  R1 -> floppy_done (code)
  258.    ;  R2 -> hard_disc_done (code)
  259.    ;  R3 -> release_fiq (code)
  260.  
  261. XFileCore_Drives                *       &60542
  262. FileCore_Drives                 *       &40542
  263.    ;Entry
  264.    ;  R8 = instance (pointer to Void)
  265.    ;Exit
  266.    ;  R0 = default_drive (Int)
  267.    ;  R1 = floppy_count (Int)
  268.    ;  R2 = hard_disc_count (Int)
  269.  
  270. XFileCore_FreeSpace             *       &60543
  271. FileCore_FreeSpace              *       &40543
  272.    ;Entry
  273.    ;  R0 -> disc_name (String)
  274.    ;  R8 = instance (pointer to Void)
  275.    ;Exit
  276.    ;  R0 = free (Int)
  277.    ;  R1 = max (Int)
  278.  
  279. XFileCore_FloppyStructure       *       &60544
  280. FileCore_FloppyStructure        *       &40544
  281.    ;Entry
  282.    ;  R0 = buffer (pointer to data)
  283.    ;  R1 -> disc (FileCore_Disc)
  284.    ;  R2 = flags (Bits)
  285.    ;  R3 -> defect_list (FileCore_DefectList)
  286.    ;Exit
  287.    ;  R3 = used (Int)
  288.  
  289. XFileCore_DescribeDisc          *       &60545
  290. FileCore_DescribeDisc           *       &40545
  291.    ;Entry
  292.    ;  R0 -> disc_name (String)
  293.    ;  R1 = disc (pointer to FileCore_Disc)
  294.    ;  R8 = instance (pointer to Void)
  295.  
  296. XFileCore_DiscardReadSectorsCache *       &60546
  297. FileCore_DiscardReadSectorsCache *       &40546
  298.    ;Entry
  299.    ;  R6 = cache_handle (Int)
  300.  
  301. XFileCore_DiscFormat            *       &60547
  302. FileCore_DiscFormat             *       &40547
  303.    ;Entry
  304.    ;  R0 = buffer (pointer to FileCore_Format)
  305.    ;  R1 = vet_format_swi (Int)
  306.    ;  R2 = vet_format_handle (Int)
  307.    ;  R3 = format (Int)
  308.  
  309. XFileCore_LayoutStructure       *       &60548
  310. FileCore_LayoutStructure        *       &40548
  311.    ;Entry
  312.    ;  R0 -> disc (FileCore_Disc)
  313.    ;  R1 -> defect_list (FileCore_DefectList)
  314.    ;  R2 -> disc_name (String)
  315.    ;  R3 = image_file (OS_F)
  316.  
  317. XFileCore_MiscOp                *       &60549
  318. FileCore_MiscOp                 *       &40549
  319.  
  320. FileCoreMiscOp_Mount            *       &0
  321.    ;Entry
  322.    ;  R0 = &0
  323.    ;  R1 = drive_no (Int)
  324.    ;  R2 = disc_addr (FileCore_DiscAddress)
  325.    ;  R3 = buffer (pointer to data)
  326.    ;  R4 = size (Int)
  327.    ;  R5 = disc (pointer to FileCore_Disc)
  328.    ;  R8 = instance (pointer to Void)
  329.  
  330. FileCoreMiscOp_PollChanged      *       &1
  331.    ;Entry
  332.    ;  R0 = &1
  333.    ;  R1 = drive_no (Int)
  334.    ;  R2 = sequence_no (Int)
  335.    ;  R8 = instance (pointer to Void)
  336.    ;Exit
  337.    ;  R2 = sequence_no_out (Int)
  338.    ;  R3 = result (Bits)
  339.  
  340. FileCoreMiscOp_LockDrive        *       &2
  341.    ;Entry
  342.    ;  R0 = &2
  343.    ;  R1 = drive_no (Int)
  344.    ;  R8 = instance (pointer to Void)
  345.  
  346. FileCoreMiscOp_UnlockDrive      *       &3
  347.    ;Entry
  348.    ;  R0 = &3
  349.    ;  R1 = drive_no (Int)
  350.    ;  R8 = instance (pointer to Void)
  351.  
  352. FileCoreMiscOp_PollPeriod       *       &4
  353.    ;Entry
  354.    ;  R0 = &4
  355.    ;  R1 -> disc_name (String)
  356.    ;  R8 = instance (pointer to Void)
  357.    ;Exit
  358.    ;  R5 = poll_period (Int)
  359.    ;  R6 -> media_type (String)
  360.  
  361. FileCoreMiscOp_EjectDisc        *       &5
  362.    ;Entry
  363.    ;  R0 = &5
  364.    ;  R1 = drive_no (Int)
  365.    ;  R8 = instance (pointer to Void)
  366.  
  367. Service_IdentifyDisc            *       &69
  368.    ;Entry
  369.    ;  R1 = &69
  370.    ;  R2 = format_name (pointer to String)
  371.    ;  R3 = size (Int)
  372.    ;  R5 -> disc (FileCore_Disc)
  373.    ;  R6 = cache_handle (Int)
  374.    ;  R8 = instance (pointer to Void)
  375.    ;Exit
  376.    ;  R1 = unclaimed (Bool)
  377.    ;  R2 = file_type (Bits)
  378.    ;  R6 = cache_handle_out (Int)
  379.  
  380.         ]
  381.         END
  382.