home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / dos / dosextens.i < prev    next >
Text File  |  1993-10-15  |  15KB  |  464 lines

  1.     IFND    DOS_DOSEXTENS_I
  2. DOS_DOSEXTENS_I    SET    1
  3. **
  4. **    $VER: dosextens.i 36.39 (14.5.92)
  5. **    Includes Release 40.15
  6. **
  7. **    DOS structures not needed for the casual AmigaDOS user
  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
  16.      IFND  EXEC_TASKS_I
  17.      INCLUDE "exec/tasks.i"
  18.      ENDC
  19.      IFND  EXEC_PORTS_I
  20.      INCLUDE "exec/ports.i"
  21.      ENDC
  22.      IFND  EXEC_LIBRARIES_I
  23.      INCLUDE "exec/libraries.i"
  24.      ENDC
  25.      IFND  EXEC_SEMAPHORES_I
  26.      INCLUDE "exec/semaphores.i"
  27.      ENDC
  28.      IFND  DEVICES_TIMER_I
  29.      INCLUDE "devices/timer.i"
  30.      ENDC
  31.  
  32.      IFND  DOS_DOS_I
  33.      INCLUDE "dos/dos.i"
  34.      ENDC
  35.  
  36.  
  37. * All DOS processes have this STRUCTure
  38. * Create and DeviceProc returns pointer to the MsgPort in this STRUCTure
  39. * Process_addr = DeviceProc(..) - TC_SIZE
  40.  
  41.  STRUCTURE Process,0
  42.     STRUCT  pr_Task,TC_SIZE
  43.     STRUCT  pr_MsgPort,MP_SIZE    * This is BPTR address from DOS functions
  44.     WORD    pr_Pad        * Remaining variables on 4 byte boundaries
  45.     BPTR    pr_SegList        * Array of seg lists used by this process
  46.     LONG    pr_StackSize    * Size of process stack in bytes
  47.     APTR    pr_GlobVec        * Global vector for this process (BCPL)
  48.     LONG    pr_TaskNum        * CLI task number of zero if not a CLI
  49.     BPTR    pr_StackBase    * Ptr to high memory end of process stack
  50.     LONG    pr_Result2        * Value of secondary result from last call
  51.     BPTR    pr_CurrentDir    * Lock associated with current directory
  52.     BPTR    pr_CIS        * Current CLI Input Stream
  53.     BPTR    pr_COS        * Current CLI Output Stream
  54.     APTR    pr_ConsoleTask    * Console handler process for current window
  55.     APTR    pr_FileSystemTask    * File handler process for current drive
  56.     BPTR    pr_CLI        * pointer to CommandLineInterface
  57.     APTR    pr_ReturnAddr    * pointer to previous stack frame
  58.     APTR    pr_PktWait        * Function to be called when awaiting msg
  59.     APTR    pr_WindowPtr    * Window pointer for errors
  60.  
  61. * following definitions are new with 2.0
  62.     BPTR    pr_HomeDir        * Home directory of executing program
  63.     LONG    pr_Flags        * flags telling dos about process
  64.     APTR    pr_ExitCode        * code to call on exit of program or NULL
  65.     LONG    pr_ExitData        * Passed as an argument to pr_ExitCode
  66.     APTR    pr_Arguments    * Arguments passed to the process at start
  67.     STRUCT  pr_LocalVars,MLH_SIZE * Local environment variables
  68.     APTR    pr_ShellPrivate    * for the use of the current shell
  69.     BPTR    pr_CES        * Error stream - if NULL, use pr_COS
  70.    LABEL   pr_SIZEOF        * Process
  71.  
  72. *
  73. * Flags for pr_Flags
  74. *
  75.     BITDEF PR,FREESEGLIST,0
  76.     BITDEF PR,FREECURRDIR,1
  77.     BITDEF PR,FREECLI,2
  78.     BITDEF PR,CLOSEINPUT,3
  79.     BITDEF PR,CLOSEOUTPUT,4
  80.     BITDEF PR,FREEARGS,5
  81.  
  82. * The long word address (BPTR) of this STRUCTure is returned by
  83. * Open() and other routines that return a file.     You need only worry
  84. * about this STRUCT to do async io's via PutMsg() instead of
  85. * standard file system calls
  86.  
  87.  STRUCTURE FileHandle,0
  88.    APTR      fh_Link        * pointer to EXEC message
  89.    APTR      fh_Interactive    * Boolean; TRUE if interactive handle
  90.    APTR      fh_Type        * Port to do PutMsg() to
  91.    LONG      fh_Buf
  92.    LONG      fh_Pos
  93.    LONG      fh_End
  94.    LONG      fh_Funcs
  95. fh_Func1 EQU fh_Funcs
  96.    LONG      fh_Func2
  97.    LONG      fh_Func3
  98.    LONG      fh_Args
  99. fh_Arg1 EQU fh_Args
  100.    LONG      fh_Arg2
  101.    LABEL  fh_SIZEOF * FileHandle
  102.  
  103. * This is the extension to EXEC Messages used by DOS
  104.  STRUCTURE DosPacket,0
  105.    APTR      dp_Link      * pointer to EXEC message
  106.    APTR      dp_Port      * pointer to Reply port for the packet
  107. *              * Must be filled in each send.
  108.    LONG      dp_Type      * See ACTION_... below and
  109. *              * 'R' means Read, 'W' means Write to the file system
  110.    LONG      dp_Res1      * For file system calls this is the result
  111. *              * that would have been returned by the
  112. *              * function, e.g. Write ('W') returns actual
  113. *              * length written
  114.    LONG      dp_Res2      * For file system calls this is what would
  115. *              * have been returned by IoErr()
  116.    LONG      dp_Arg1
  117. *  Device packets common equivalents
  118. dp_Action  EQU    dp_Type
  119. dp_Status  EQU    dp_Res1
  120. dp_Status2 EQU    dp_Res2
  121. dp_BufAddr EQU    dp_Arg1
  122.    LONG      dp_Arg2
  123.    LONG      dp_Arg3
  124.    LONG      dp_Arg4
  125.    LONG      dp_Arg5
  126.    LONG      dp_Arg6
  127.    LONG      dp_Arg7
  128.    LABEL  dp_SIZEOF * DosPacket
  129.  
  130. * A Packet does not require the Message to before it in memory, but
  131. * for convenience it is useful to associate the two.
  132. * Also see the function init_std_pkt for initializing this STRUCTure
  133.  
  134.  STRUCTURE StandardPacket,0
  135.    STRUCT sp_Msg,MN_SIZE
  136.    STRUCT sp_Pkt,dp_SIZEOF
  137.    LABEL  sp_SIZEOF * StandardPacket
  138.  
  139.  
  140. * Packet types
  141. ACTION_NIL        EQU    0
  142. ACTION_STARTUP        EQU    0
  143. ACTION_GET_BLOCK    EQU    2    ;OBSOLETE
  144. ACTION_SET_MAP        EQU    4
  145. ACTION_DIE        EQU    5
  146. ACTION_EVENT        EQU    6
  147. ACTION_CURRENT_VOLUME    EQU    7
  148. ACTION_LOCATE_OBJECT    EQU    8
  149. ACTION_RENAME_DISK    EQU    9
  150. ACTION_WRITE        EQU    'W'
  151. ACTION_READ        EQU    'R'
  152. ACTION_FREE_LOCK    EQU    15
  153. ACTION_DELETE_OBJECT    EQU    16
  154. ACTION_RENAME_OBJECT    EQU    17
  155. ACTION_MORE_CACHE    EQU    18
  156. ACTION_COPY_DIR        EQU    19
  157. ACTION_WAIT_CHAR    EQU    20
  158. ACTION_SET_PROTECT    EQU    21
  159. ACTION_CREATE_DIR    EQU    22
  160. ACTION_EXAMINE_OBJECT    EQU    23
  161. ACTION_EXAMINE_NEXT    EQU    24
  162. ACTION_DISK_INFO    EQU    25
  163. ACTION_INFO        EQU    26
  164. ACTION_FLUSH        EQU    27
  165. ACTION_SET_COMMENT    EQU    28
  166. ACTION_PARENT        EQU    29
  167. ACTION_TIMER        EQU    30
  168. ACTION_INHIBIT        EQU    31
  169. ACTION_DISK_TYPE    EQU    32
  170. ACTION_DISK_CHANGE    EQU    33
  171. ACTION_SET_DATE        EQU    34
  172.  
  173. ACTION_SCREEN_MODE    EQU    994
  174.  
  175. ACTION_READ_RETURN    EQU    1001
  176. ACTION_WRITE_RETURN    EQU    1002
  177. ACTION_SEEK        EQU    1008
  178. ACTION_FINDUPDATE    EQU    1004
  179. ACTION_FINDINPUT    EQU    1005
  180. ACTION_FINDOUTPUT    EQU    1006
  181. ACTION_END        EQU    1007
  182. ACTION_SET_FILE_SIZE    EQU    1022    ; fast file system only
  183. ACTION_WRITE_PROTECT    EQU    1023    ; fast file system only
  184.  
  185. * new 2.0 packets
  186. ACTION_SAME_LOCK    EQU    40
  187. ACTION_CHANGE_SIGNAL    EQU    995
  188. ACTION_FORMAT        EQU    1020
  189. ACTION_MAKE_LINK    EQU    1021
  190. *
  191. *
  192. ACTION_READ_LINK    EQU    1024
  193. ACTION_FH_FROM_LOCK    EQU    1026
  194. ACTION_IS_FILESYSTEM    EQU    1027
  195. ACTION_CHANGE_MODE    EQU    1028
  196. *
  197. ACTION_COPY_DIR_FH    EQU    1030
  198. ACTION_PARENT_FH    EQU    1031
  199. ACTION_EXAMINE_ALL    EQU    1033
  200. ACTION_EXAMINE_FH    EQU    1034
  201.  
  202. ACTION_LOCK_RECORD    EQU    2008
  203. ACTION_FREE_RECORD    EQU    2009
  204.  
  205. ACTION_ADD_NOTIFY    EQU    4097
  206. ACTION_REMOVE_NOTIFY    EQU    4098
  207.  
  208. * Added in V39:
  209. ACTION_EXAMINE_ALL_END    EQU    1035
  210. ACTION_SET_OWNER    EQU    1036
  211.  
  212. * Tell a file system to serialize the current volume. This is typically
  213. * done by changing the creation date of the disk. This packet does not take
  214. * any arguments.  NOTE: be prepared to handle failure of this packet for
  215. * V37 ROM filesystems.
  216.  
  217. ACTION_SERIALIZE_DISK    EQU    4200
  218.    
  219. * A structure for holding error messages - stored as array with error == 0
  220. * for the last entry.
  221.  
  222.  STRUCTURE ErrorString,0
  223.     APTR   estr_Nums
  224.     APTR   estr_Strings
  225.         LABEL  ErrorString_SIZEOF
  226.  
  227. * DOS library node structure.
  228. * This is the data at positive offsets from the library node.
  229. * Negative offsets from the node is the jump table to DOS functions
  230. * node = (STRUCT DosLibrary *) OpenLibrary( "dos.library" .. )
  231.  
  232.  STRUCTURE DosLibrary,0
  233.     STRUCT  dl_lib,LIB_SIZE
  234.     APTR    dl_Root         * Pointer to RootNode, described below
  235.     APTR    dl_GV         * Pointer to BCPL global vector
  236.     LONG    dl_A2         * BCPL standard register values
  237.     LONG    dl_A5
  238.     LONG    dl_A6
  239.     APTR    dl_Errors         * PRIVATE pointer to array of error msgs
  240.     APTR    dl_TimeReq         * PRIVATE pointer to timer request 
  241.     APTR    dl_UtilityBase   * PRIVATE pointer to utility library base
  242.     APTR    dl_IntuitionBase * PRIVATE pointer to intuition library base
  243.     LABEL   dl_SIZEOF *     DosLibrary
  244.  
  245. *
  246.  
  247.  STRUCTURE RootNode,0
  248.     BPTR    rn_TaskArray       * [0] is max number of CLI's
  249. *                   * [1] is APTR to process id of CLI 1
  250. *                   * [n] is APTR to process id of CLI n
  251.     BPTR    rn_ConsoleSegment  * SegList for the CLI
  252.     STRUCT  rn_Time,ds_SIZEOF  * Current time
  253.     LONG    rn_RestartSeg      * SegList for the disk validator process
  254.     BPTR    rn_Info           * Pointer to the Info structure
  255.     BPTR    rn_FileHandlerSegment * code for file handler
  256.     STRUCT  rn_CliList,MLH_SIZE * new list of all CLI processes
  257. *                   * the first cpl_Array is also rn_TaskArray
  258.     APTR    rn_BootProc           * private! ptr to msgport of boot fs
  259.     BPTR    rn_ShellSegment    * seglist for Shell (for NewShell)
  260.     LONG    rn_Flags           * dos