home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / nduk-v37.lha / V37 / include / resources / disk.i < prev    next >
Text File  |  1991-11-27  |  3KB  |  124 lines

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