home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / compressed / development / clusterdemo.dms / clusterdemo.adf / Modules.lha / modules / txt / DiskResource.def < prev    next >
Text File  |  1994-05-25  |  3KB  |  85 lines

  1. |##########|
  2. |#MAGIC   #|CLABLNEO
  3. |#PROJECT #|""
  4. |#PATHS   #|"StdProject"
  5. |#FLAGS   #|xx-x-x--x---x-x-----------------
  6. |#USERSW  #|--------------------------------
  7. |#USERMASK#|--------------------------------
  8. |#SWITCHES#|x-xx-x----------
  9. |##########|
  10. DEFINITION MODULE DiskResource;
  11. (* $A- *)
  12.  
  13. |2.0-Version 01.10.1992
  14.  
  15. FROM Exec       IMPORT Interrupt,Resource, ResourcePtr,LibraryPtr,List,
  16.                        Message,TaskPtr;
  17. FROM System     IMPORT Regs;
  18.  
  19.  
  20. TYPE
  21.   DiscResourceUnit       = RECORD OF Message;
  22.                              discBlock : Interrupt;
  23.                              discSync  : Interrupt;
  24.                              index     : Interrupt
  25.                             END;
  26.   DiscResourceUnitPtr     = POINTER TO DiscResourceUnit;
  27.  
  28.   DiscResourceFlags       = (alloc0,alloc1,alloc2,alloc3,drf4,drf5,drf6,
  29.                              active);
  30.   DiscResourceFlagSet     = SET OF DiscResourceFlags;
  31.  
  32.   DiscResource            = RECORD OF Resource;
  33.                               current     : DiscResourceUnitPtr;
  34.                               flags       : DiscResourceFlagSet;
  35.                               pad         : SHORTCARD;
  36.                               sysLib      : LibraryPtr;
  37.                               ciaResource : ResourcePtr;
  38.                               unitId      : ARRAY [alloc0..alloc3] OF LONGCARD;
  39.                               waiting     : List;
  40.                               discBlock   : Interrupt;
  41.                               discSync    : Interrupt;
  42.                               index       : Interrupt;
  43.                               task        : TaskPtr;
  44.                             END;
  45.   DiscResourcePtr         = POINTER TO DiscResource;
  46.  
  47. CONST
  48.   |Hardware magic
  49.   dskDmaOff     = $4000;
  50.  
  51.   |Resource-spezifische Kommandos
  52.  
  53.  
  54.   |Drive Types
  55.   amiga         = 0;
  56.   drt37422D2S   = $55555555;
  57.   empty         = $FFFFFFFF;
  58.   drt150RPM     = $AAAAAAAA;
  59.  
  60. VAR
  61.   DiskBase   : DiscResourcePtr;
  62.  
  63. LIBRARY  DiskBase  BY -6
  64.   PROCEDURE AllocUnit(unitNum  IN D0  : LONGINT):BOOLEAN;
  65.  
  66. LIBRARY  DiskBase  BY -12
  67.   PROCEDURE FreeUnit(unitNum  IN D0  : LONGINT):LONGINT;
  68.  
  69. LIBRARY  DiskBase  BY -18
  70.   PROCEDURE GetUnit(unitPointer IN A1 : DiscResourceUnitPtr):DiscResourceUnitPtr;
  71.  
  72. LIBRARY  DiskBase  BY -30
  73.   PROCEDURE GetUnitID(unitNum  IN D0  : LONGINT):LONGCARD;
  74.  
  75. LIBRARY  DiskBase  BY -24
  76.   PROCEDURE GiveUnit;
  77.  
  78. GROUP
  79.   All     = DiscResourceUnit,DiscResourceUnitPtr,DiscResourceFlags,
  80.             DiscResourceFlagSet,DiscResource,DiscResourcePtr,dskDmaOff,
  81.             amiga,drt37422D2S,empty,AllocUnit,FreeUnit,GetUnit,GetUnitID,
  82.             GiveUnit;
  83.  
  84. END DiskResource.
  85.