home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / ace_basic / ace / include / dos / filehandler.h < prev    next >
C/C++ Source or Header  |  1977-12-31  |  6KB  |  144 lines

  1. #ifndef DOS_FILEHANDLER_H
  2. #define DOS_FILEHANDLER_H 1
  3. /*
  4. ** filehandler.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/02/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for filehandler.h
  17. */
  18. #ifndef DeviceNodePtr
  19. #define DeviceNodePtr ADDRESS
  20. #endif
  21. #ifndef DosEnvecPtr
  22. #define DosEnvecPtr ADDRESS
  23. #endif
  24. #ifndef FileSysStartupMsgPtr
  25. #define FileSysStartupMsgPtr ADDRESS
  26. #endif
  27. /*
  28. ** End of StructPointer defines for filehandler.h
  29. */
  30.        
  31. #ifndef   EXEC_PORTS_H
  32. #include <exec/ports.h>
  33. #endif
  34.  
  35. #ifndef   DOS_DOS_H
  36. #include <dos/dos.h>
  37. #endif
  38.  
  39.  
  40.  
  41. /* The disk "environment" is a longword array that describes the
  42.  * disk geometry.  It is variable sized,  with the length at the beginning.
  43.  * Here are the constants for a standard geometry.
  44.  */
  45.  
  46. STRUCT DosEnvec  
  47.     LONGINT de_TableSize       /* Size of Environment vector */
  48.     LONGINT de_SizeBlock       /* in longwords: standard value is 128 */
  49.     LONGINT de_SecOrg          /* not used  must be 0 */
  50.     LONGINT de_Surfaces        /* # of heads (surfaces). drive specific */
  51.     LONGINT de_SectorPerBlock  /* not used  must be 1 */
  52.     LONGINT de_BlocksPerTrack  /* blocks per track. drive specific */
  53.     LONGINT de_Reserved        /* DOS reserved blocks at start of partition. */
  54.     LONGINT de_PreAlloc        /* DOS reserved blocks at end of partition */
  55.     LONGINT de_Interleave      /* usually 0 */
  56.     LONGINT de_LowCyl          /* starting cylinder. typically 0 */
  57.     LONGINT de_HighCyl         /* max cylinder. drive specific */
  58.     LONGINT de_NumBuffers      /* Initial # DOS of buffers.  */
  59.     LONGINT de_BufMemType      /* type of mem to allocate for buffers */
  60.     LONGINT de_MaxTransfer     /* Max number of bytes to transfer at a time */
  61.     LONGINT de_Mask        /* Address Mask to block out certain memory */
  62.     LONGINT  de_BootPri         /* Boot priority for autoboot */
  63.     LONGINT de_DosType         /* ASCII (HEX) string showing filesystem type 
  64.                   * 0X444F5300 is old filesystem, 
  65.                   * 0X444F5301 is fast file system */
  66.     LONGINT de_Baud        /* Baud rate for serial handler */
  67.     LONGINT de_Control         /* Control SHORTINT for handler/filesystem */
  68.     LONGINT de_BootBlocks      /* Number of blocks containing boot code */
  69.  
  70. END STRUCT 
  71.  
  72. /* these are the offsets into the array */
  73. /* DE_TABLESIZE is set to the number of longwords in the table minus 1 */
  74.  
  75. #define DE_TABLESIZE    0   /* minimum value is 11 (includes NumBuffers) */
  76. #define DE_SIZEBLOCK    1   /* in longwords: standard value is 128 */
  77. #define DE_SECORG   2   /* not used  must be 0 */
  78. #define DE_NUMHEADS 3   /* # of heads (surfaces). drive specific */
  79. #define DE_SECSPERBLK   4   /* not used  must be 1 */
  80. #define DE_BLKSPERTRACK 5   /* blocks per track. drive specific */
  81. #define DE_RESERVEDBLKS 6   /* unavailable blocks at start.  usually 2 */
  82. #define DE_PREFAC   7   /* not used  must be 0 */
  83. #define DE_INTERLEAVE   8   /* usually 0 */
  84. #define DE_LOWCYL   9   /* starting cylinder. typically 0 */
  85. #define DE_UPPERCYL 10  /* max cylinder.  drive specific */
  86. #define DE_NUMBUFFERS   11  /* starting # of buffers.  typically 5 */
  87. #define DE_MEMBUFTYPE   12  /* type of mem to allocate for buffers. */
  88. #define DE_BUFMEMTYPE   12  /* same as above,  better name
  89.                  * 1 is public,  3 is chip,  5 is fast */
  90. #define DE_MAXTRANSFER  13  /* Max number bytes to transfer at a time */
  91. #define DE_MASK     14  /* Address Mask to block out certain memory */
  92. #define DE_BOOTPRI  15  /* Boot priority for autoboot */
  93. #define DE_DOSTYPE  16  /* ASCII (HEX) string showing filesystem type 
  94.                  * 0X444F5300 is old filesystem, 
  95.                  * 0X444F5301 is fast file system */
  96. #define DE_BAUD     17  /* Baud rate for serial handler */
  97. #define DE_CONTROL  18  /* Control SHORTINT for handler/filesystem */
  98. #define DE_BOOTBLOCKS   19  /* Number of blocks containing boot code */
  99.  
  100. /* The file system startup message is linked into a device node's startup
  101. ** field.  It contains a pointer to the above environment,  plus the
  102. ** information needed to do an exec OpenDevice().
  103. */
  104. STRUCT FileSysStartupMsg  
  105.     LONGINT   fssm_Unit   /* exec unit number for this device */
  106.     ADDRESS    fssm_Device     /* null terminated bstring to the device name */
  107.     ADDRESS    fssm_Environ    /* ptr to environment table (see above) */
  108.     LONGINT   fssm_Flags  /* flags for OpenDevice() */
  109. END STRUCT 
  110.  
  111.  
  112. /* The include file "libraries/dosextens.h" has a DeviceList structure.
  113.  * The "device list" can have one of three different things linked onto
  114.  * it.  Dosextens defines the structure for a volume.  DLT_DIRECTORY
  115.  * is for an assigned directory.  The following structure is for
  116.  * a dos "device" (DLT_DEVICE).
  117. */
  118.  
  119. STRUCT DeviceNode  
  120.     ADDRESS    dn_Next     /* singly linked list */
  121.     LONGINT   dn_Type     /* always 0 for dos "devices" */
  122.     MsgPortPtr  dn_Task     /* standard dos "task" field.  If this is
  123.                  * null when the node is accesses,  a task
  124.                  * will be started up */
  125.     ADDRESS    dn_Lock     /* not used for devices -- leave null */
  126.     ADDRESS    dn_Handler  /* filename to loadseg (if seglist is null) */
  127.     LONGINT   dn_StackSize    /* stacksize to use when starting task */
  128.     LONGINT    dn_Priority     /* task priority when starting task */
  129.     ADDRESS    dn_Startup  /* startup msg: FileSysStartupMsg for disks */
  130.     ADDRESS    dn_SegList  /* code to run to start new task (if necessary).
  131.                  * if null then dn_Handler will be loaded. */
  132.     ADDRESS    dn_GlobalVec    /* BCPL global vector to use when starting
  133.                  * a task.  -1 means that dn_SegList is not
  134.                  * for a bcpl program,  so the dos won't
  135.                  * try and construct one.  0 tell the
  136.                  * dos that you obey BCPL linkage rules, 
  137.                  * and that it should construct a global
  138.                  * vector for you.
  139.                  */
  140.     ADDRESS    dn_Name     /* the node name,  e.g. '\3', 'D', 'F', '3' */
  141. END STRUCT 
  142.  
  143. #endif  /* DOS_FILEHANDLER_H */
  144.