home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: AssemPro For Development Amiga Driver / Lowe_AssemProForDevelopmentAmigaDriver.adf / Includes / resources / disk.i < prev    next >
Encoding:
Text File  |  1978-06-06  |  4.2 KB  |  149 lines

  1.  
  2.         IFND    RESOURCES_DISK_I@
  3. RESOURCES_DISK_I@        =     1
  4.  
  5. ;****************************************************************
  6. ;                                                               ;
  7. ; Copyright 1985, Commodore Amiga Inc.  All rights reserved.    ;
  8. ; No part of this program may be reproduced, transmitted,       ;
  9. ; transcribed, stored in retrieval system, or translated into   ;
  10. ; any language or computer language, in any form or by any      ;
  11. ; means, electronic, mechanical, magnetic, optical, chemical,   ;
  12. ; manual or otherwise, without the prior written permission of  ;
  13. ; Commodore Amiga Incorporated, 3350 Scott Blvd, Bld #7,        ;
  14. ; Santa Clara, CA 95051                                         ;
  15. ;                                                               ;
  16. ;****************************************************************
  17.  
  18.  
  19. ;****************************************************************
  20. ;
  21. ; discresource.i -- external declarations for disc resources
  22. ;
  23. ; SOURCE CONTROL
  24. ; ------ -------
  25. ; $Header: disk.i,v 27.3 85/07/12 23:17:43 neil Exp $
  26. ;
  27. ; $Locker:  $
  28. ;
  29. ;****************************************************************
  30.  
  31.         IFND    EXEC_TYPES_I@
  32.         INCLUDE "exec/types.i"
  33.         ENDIF
  34.  
  35.         IFND    EXEC_LISTS_I@
  36.         INCLUDE "exec/lists.i"
  37.         ENDIF
  38.  
  39.         IFND    EXEC_PORTS_I@
  40.         INCLUDE "exec/ports.i"
  41.         ENDIF
  42.  
  43.         IFND    EXEC_INTERRUPTS_I@
  44.         INCLUDE "exec/interrupts.i"
  45.         ENDIF
  46.  
  47.         IFND    EXEC_LIBRARIES_I@
  48.         INCLUDE "exec/libraries.i"
  49.         ENDIF
  50.  
  51.  
  52. ;********************************************************************
  53. ;
  54. ; Resource structures
  55. ;
  56. ;********************************************************************
  57.  
  58.     STRUCTURE DISCRESOURCEUNIT,MN_SIZE
  59.         STRUCT  DRU_DISCBLOCK,IS_SIZE
  60.         STRUCT  DRU_DISCSYNC,IS_SIZE
  61.         STRUCT  DRU_INDEX,IS_SIZE
  62.         LABEL   DRU_SIZE
  63.  
  64.  
  65.  
  66.     STRUCTURE DISCRESOURCE,LIB_SIZE
  67.         APTR    DR_CURRENT      ; pointer to current unit structure
  68.         UBYTE   DR_FLAGS
  69.         UBYTE   DR_pad
  70.         APTR    DR_SYSLIB
  71.         APTR    DR_CIARESOURCE
  72.         STRUCT  DR_UNITID,4*4
  73.         STRUCT  DR_WAITING,LH_SIZE
  74.         STRUCT  DR_DISCBLOCK,IS_SIZE
  75.         STRUCT  DR_DISCSYNC,IS_SIZE
  76.         STRUCT  DR_INDEX,IS_SIZE
  77.         LABEL   DR_SIZE
  78.  
  79. ;        BITDEF  DR,ALLOC0,0     ; unit zero is allocated
  80. DRB_ALLOC0 = 0     ; unit zero is allocated
  81. DRF_ALLOC0 = 1<<0     ; unit zero is allocated
  82. ;        BITDEF  DR,ALLOC1,1     ; unit one is allocated
  83. DRB_ALLOC1 = 1     ; unit one is allocated
  84. DRF_ALLOC1 = 1<<1     ; unit one is allocated
  85. ;        BITDEF  DR,ALLOC2,2     ; unit two is allocated
  86. DRB_ALLOC2 = 2     ; unit two is allocated
  87. DRF_ALLOC2 = 1<<2     ; unit two is allocated
  88. ;        BITDEF  DR,ALLOC3,3     ; unit three is allocated
  89. DRB_ALLOC3 = 3     ; unit three is allocated
  90. DRF_ALLOC3 = 1<<3     ; unit three is allocated
  91. ;        BITDEF  DR,ACTIVE,7     ; is the disc currently busy?
  92. DRB_ACTIVE = 7     ; is the disc currently busy?
  93. DRF_ACTIVE = 1<<7     ; is the disc currently busy?
  94.  
  95.  
  96. ;********************************************************************
  97. ;
  98. ; Hardware Magic
  99. ;
  100. ;********************************************************************
  101.  
  102.  
  103. DSKDMAOFF       EQU     $4000   ; idle command for dsklen register
  104.  
  105.  
  106. ;********************************************************************
  107. ;
  108. ; Resource specific commands
  109. ;
  110. ;********************************************************************
  111.  
  112. ;-- DR_NAME is a generic macro to get the name of the resource.  This
  113. ;-- way if the name is ever changed you will pick up the change
  114. ;-- automatically.
  115. ;--
  116. ;-- Normal usage would be:
  117. ;--
  118. ;-- internalName:       DISKNAME
  119. ;--
  120.  
  121. DISKNAME:       MACRO
  122.                 DC.B    'disk.resource',0
  123.                 DS.W    0
  124.                 ENDM
  125.  
  126.         LIBINIT LIB_BASE
  127.         LIBDEF  DR_ALLOCUNIT
  128.         LIBDEF  DR_FREEUNIT
  129.         LIBDEF  DR_GETUNIT
  130.         LIBDEF  DR_GIVEUNIT
  131.         LIBDEF  DR_GETUNITID
  132.  
  133. DR_LASTCOMM     EQU     DR_GIVEUNIT
  134.  
  135.  
  136. ;********************************************************************
  137. ;
  138. ; drive types
  139. ;
  140. ;********************************************************************
  141.  
  142. DRT_AMIGA       EQU     $00000000
  143. DRT_37422D2S    EQU     $55555555
  144. DRT_EMPTY       EQU     $FFFFFFFF
  145.  
  146.         ENDIF
  147.         END
  148.