home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / resources / disk.i < prev    next >
Text File  |  1993-10-15  |  3KB  |  122 lines

  1.     IFND    RESOURCES_DISK_I
  2. RESOURCES_DISK_I    SET    1
  3. **
  4. **    $VER: disk.i 27.10 (21.11.90)
  5. **    Includes Release 40.15
  6. **
  7. **    disk.i -- external declarations for the disk resource
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND    EXEC_TYPES_I
  14.     INCLUDE    "exec/types.i"
  15.     ENDC    !EXEC_TYPES_I
  16.  
  17.     IFND    EXEC_LISTS_I
  18.     INCLUDE    "exec/lists.i"
  19.     ENDC    !EXEC_LISTS_I
  20.  
  21.     IFND    EXEC_PORTS_I
  22.     INCLUDE    "exec/ports.i"
  23.     ENDC    !EXEC_PORTS_I
  24.  
  25.     IFND    EXEC_INTERRUPTS_I
  26.     INCLUDE    "exec/interrupts.i"
  27.     ENDC    !EXEC_INTERRUPTS_I
  28.  
  29.     IFND    EXEC_LIBRARIES_I
  30.     INCLUDE    "exec/libraries.i"
  31.     ENDC    !EXEC_LIBRARIES_I
  32.  
  33.  
  34. *********************************************************************
  35. *
  36. * Resource structures
  37. *
  38. *********************************************************************
  39.  
  40.     STRUCTURE DISCRESOURCEUNIT,MN_SIZE
  41.     STRUCT    DRU_DISCBLOCK,IS_SIZE
  42.     STRUCT    DRU_DISCSYNC,IS_SIZE
  43.     STRUCT    DRU_INDEX,IS_SIZE
  44.     LABEL    DRU_SIZE
  45.  
  46.  
  47.  
  48.     STRUCTURE DISCRESOURCE,LIB_SIZE
  49.     APTR    DR_CURRENT    ; pointer to current unit structure
  50.     UBYTE    DR_FLAGS
  51.     UBYTE    DR_pad
  52.     APTR    DR_SYSLIB
  53.     APTR    DR_CIARESOURCE
  54.     STRUCT    DR_UNITID,4*4
  55.     STRUCT    DR_WAITING,LH_SIZE
  56.     STRUCT    DR_DISCBLOCK,IS_SIZE
  57.     STRUCT    DR_DISCSYNC,IS_SIZE
  58.     STRUCT    DR_INDEX,IS_SIZE
  59.     APTR    DR_CURRTASK    ; pointer to owning task for GiveUnit
  60.     LABEL    DR_SIZE
  61.  
  62.     BITDEF    DR,ALLOC0,0    ; unit zero is allocated
  63.     BITDEF    DR,ALLOC1,1    ; unit one is allocated
  64.     BITDEF    DR,ALLOC2,2    ; unit two is allocated
  65.     BITDEF    DR,ALLOC3,3    ; unit three is allocated
  66.     BITDEF    DR,ACTIVE,7    ; is the disc currently busy?
  67.  
  68.  
  69. *********************************************************************
  70. *
  71. * Hardware Magic
  72. *
  73. *********************************************************************
  74.  
  75.  
  76. DSKDMAOFF    EQU    $4000    ; idle command for dsklen register
  77.  
  78.  
  79. *********************************************************************
  80. *
  81. * Resource specific commands
  82. *
  83. *********************************************************************
  84.  
  85. *-- DR_NAME is a generic macro to get the name of the resource.  This
  86. *-- way if the name is ever changed you will pick up the change
  87. *-- automatically.
  88. *--
  89. *-- Normal usage would be:
  90. *--
  91. *-- internalName:    DISKNAME
  92. *--
  93.  
  94. DISKNAME:    MACRO
  95.         DC.B    'disk.resource',0
  96.         DS.W    0
  97.         ENDM
  98.  
  99.     LIBINIT LIB_BASE
  100.     LIBDEF    DR_ALLOCUNIT
  101.     LIBDEF    DR_FREEUNIT
  102.     LIBDEF    DR_GETUNIT
  103.     LIBDEF    DR_GIVEUNIT
  104.     LIBDEF    DR_GETUNITID
  105.     LIBDEF    DR_READUNITID
  106.  
  107. DR_LASTCOMM    EQU    DR_READUNITID
  108.  
  109.  
  110. *********************************************************************
  111. *
  112. * drive types
  113. *
  114. *********************************************************************
  115.  
  116. DRT_AMIGA    EQU    $00000000
  117. DRT_37422D2S    EQU    $55555555
  118. DRT_EMPTY    EQU    $FFFFFFFF
  119. DRT_150RPM    EQU    $AAAAAAAA
  120.  
  121.     ENDC    ; RESOURCES_DISK_I
  122.