home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
bbs
/
cbm
/
nduk-v37.lha
/
V37
/
include
/
dos
/
dosextens.i
< prev
next >
Wrap
Text File
|
1991-11-27
|
15KB
|
462 lines
IFND DOS_DOSEXTENS_I
DOS_DOSEXTENS_I SET 1
**
** $Filename: dos/dosextens.i $
** $Release: 2.04 Includes, V37.4 $
** $Revision: 36.37 $
** $Date: 91/11/08 $
**
** DOS structures not needed for the casual AmigaDOS user
**
** (C) Copyright 1985-1991 Commodore-Amiga, Inc.
** All Rights Reserved
**
IFND EXEC_TYPES_I
INCLUDE "exec/types.i"
ENDC
IFND EXEC_TASKS_I
INCLUDE "exec/tasks.i"
ENDC
IFND EXEC_PORTS_I
INCLUDE "exec/ports.i"
ENDC
IFND EXEC_LIBRARIES_I
INCLUDE "exec/libraries.i"
ENDC
IFND EXEC_SEMAPHORES_I
INCLUDE "exec/semaphores.i"
ENDC
IFND DEVICES_TIMER_I
INCLUDE "devices/timer.i"
ENDC
IFND DOS_DOS_I
INCLUDE "dos/dos.i"
ENDC
* All DOS processes have this STRUCTure
* Create and DeviceProc returns pointer to the MsgPort in this STRUCTure
* Process_addr = DeviceProc(..) - TC_SIZE
STRUCTURE Process,0
STRUCT pr_Task,TC_SIZE
STRUCT pr_MsgPort,MP_SIZE * This is BPTR address from DOS functions
WORD pr_Pad * Remaining variables on 4 byte boundaries
BPTR pr_SegList * Array of seg lists used by this process
LONG pr_StackSize * Size of process stack in bytes
APTR pr_GlobVec * Global vector for this process (BCPL)
LONG pr_TaskNum * CLI task number of zero if not a CLI
BPTR pr_StackBase * Ptr to high memory end of process stack
LONG pr_Result2 * Value of secondary result from last call
BPTR pr_CurrentDir * Lock associated with current directory
BPTR pr_CIS * Current CLI Input Stream
BPTR pr_COS * Current CLI Output Stream
APTR pr_ConsoleTask * Console handler process for current window
APTR pr_FileSystemTask * File handler process for current drive
BPTR pr_CLI * pointer to CommandLineInterface
APTR pr_ReturnAddr * pointer to previous stack frame
APTR pr_PktWait * Function to be called when awaiting msg
APTR pr_WindowPtr * Window pointer for errors
* following definitions are new with 2.0
BPTR pr_HomeDir * Home directory of executing program
LONG pr_Flags * flags telling dos about process
APTR pr_ExitCode * code to call on exit of program or NULL
LONG pr_ExitData * Passed as an argument to pr_ExitCode
APTR pr_Arguments * Arguments passed to the process at start
STRUCT pr_LocalVars,MLH_SIZE * Local environment variables
APTR pr_ShellPrivate * for the use of the current shell
BPTR pr_CES * Error stream - if NULL, use pr_COS
LABEL pr_SIZEOF * Process
*
* Flags for pr_Flags
*
BITDEF PR,FREESEGLIST,0
BITDEF PR,FREECURRDIR,1
BITDEF PR,FREECLI,2
BITDEF PR,CLOSEINPUT,3
BITDEF PR,CLOSEOUTPUT,4
BITDEF PR,FREEARGS,5
* The long word address (BPTR) of this STRUCTure is returned by
* Open() and other routines that return a file. You need only worry
* about this STRUCT to do async io's via PutMsg() instead of
* standard file system calls
STRUCTURE FileHandle,0
APTR fh_Link * pointer to EXEC message
APTR fh_Interactive * Boolean; TRUE if interactive handle
APTR fh_Type * Port to do PutMsg() to
LONG fh_Buf
LONG fh_Pos
LONG fh_End
LONG fh_Funcs
fh_Func1 EQU fh_Funcs
LONG fh_Func2
LONG fh_Func3
LONG fh_Args
fh_Arg1 EQU fh_Args
LONG fh_Arg2
LABEL fh_SIZEOF * FileHandle
* This is the extension to EXEC Messages used by DOS
STRUCTURE DosPacket,0
APTR dp_Link * pointer to EXEC message
APTR dp_Port * pointer to Reply port for the packet
* * Must be filled in each send.
LONG dp_Type * See ACTION_... below and
* * 'R' means Read, 'W' means Write to the file system
LONG dp_Res1 * For file system calls this is the result
* * that would have been returned by the
* * function, e.g. Write ('W') returns actual
* * length written
LONG dp_Res2 * For file system calls this is what would
* * have been returned by IoErr()
LONG dp_Arg1
* Device packets common equivalents
dp_Action EQU dp_Type
dp_Status EQU dp_Res1
dp_Status2 EQU dp_Res2
dp_BufAddr EQU dp_Arg1
LONG dp_Arg2
LONG dp_Arg3
LONG dp_Arg4
LONG dp_Arg5
LONG dp_Arg6
LONG dp_Arg7
LABEL dp_SIZEOF * DosPacket
* A Packet does not require the Message to before it in memory, but
* for convenience it is useful to associate the two.
* Also see the function init_std_pkt for initializing this STRUCTure
STRUCTURE StandardPacket,0
STRUCT sp_Msg,MN_SIZE
STRUCT sp_Pkt,dp_SIZEOF
LABEL sp_SIZEOF * StandardPacket
* Packet types
ACTION_NIL EQU 0
ACTION_STARTUP EQU 0
ACTION_GET_BLOCK EQU 2 ;OBSOLETE
ACTION_SET_MAP EQU 4
ACTION_DIE EQU 5
ACTION_EVENT EQU 6
ACTION_CURRENT_VOLUME EQU 7
ACTION_LOCATE_OBJECT EQU 8
ACTION_RENAME_DISK EQU 9
ACTION_WRITE EQU 'W'
ACTION_READ EQU 'R'
ACTION_FREE_LOCK EQU 15
ACTION_DELETE_OBJECT EQU 16
ACTION_RENAME_OBJECT EQU 17
ACTION_MORE_CACHE EQU 18
ACTION_COPY_DIR EQU 19
ACTION_WAIT_CHAR EQU 20
ACTION_SET_PROTECT EQU 21
ACTION_CREATE_DIR EQU 22
ACTION_EXAMINE_OBJECT EQU 23
ACTION_EXAMINE_NEXT EQU 24
ACTION_DISK_INFO EQU 25
ACTION_INFO EQU 26
ACTION_FLUSH EQU 27
ACTION_SET_COMMENT EQU 28
ACTION_PARENT EQU 29
ACTION_TIMER EQU 30
ACTION_INHIBIT EQU 31
ACTION_DISK_TYPE EQU 32
ACTION_DISK_CHANGE EQU 33
ACTION_SET_DATE EQU 34
ACTION_SCREEN_MODE EQU 994
ACTION_READ_RETURN EQU 1001
ACTION_WRITE_RETURN EQU 1002
ACTION_SEEK EQU 1008
ACTION_FINDUPDATE EQU 1004
ACTION_FINDINPUT EQU 1005
ACTION_FINDOUTPUT EQU 1006
ACTION_END EQU 1007
ACTION_SET_FILE_SIZE EQU 1022 ; fast file system only
ACTION_WRITE_PROTECT EQU 1023 ; fast file system only
* new 2.0 packets
ACTION_SAME_LOCK EQU 40
ACTION_CHANGE_SIGNAL EQU 995
ACTION_FORMAT EQU 1020
ACTION_MAKE_LINK EQU 1021
*
*
ACTION_READ_LINK EQU 1024
ACTION_FH_FROM_LOCK EQU 1026
ACTION_IS_FILESYSTEM EQU 1027
ACTION_CHANGE_MODE EQU 1028
*
ACTION_COPY_DIR_FH EQU 1030
ACTION_PARENT_FH EQU 1031
ACTION_EXAMINE_ALL EQU 1033
ACTION_EXAMINE_FH EQU 1034
ACTION_LOCK_RECORD EQU 2008
ACTION_FREE_RECORD EQU 2009
ACTION_ADD_NOTIFY EQU 4097
ACTION_REMOVE_NOTIFY EQU 4098
* Tell a file system to serialize the current volume. This is typically
* done by changing the creation date of the disk. This packet does not take
* any arguments. NOTE: be prepared to handle failure of this packet for
* V37 ROM filesystems.
ACTION_SERIALIZE_DISK EQU 4200
* A structure for holding error messages - stored as array with error == 0
* for the last entry.
STRUCTURE ErrorString,0
APTR estr_Nums
APTR estr_Strings
LABEL ErrorString_SIZEOF
* DOS library node structure.
* This is the data at positive offsets from the library node.
* Negative offsets from the node is the jump table to DOS functions
* node = (STRUCT DosLibrary *) OpenLibrary( "dos.library" .. )
STRUCTURE DosLibrary,0
STRUCT dl_lib,LIB_SIZE
APTR dl_Root * Pointer to RootNode, described below
APTR dl_GV * Pointer to BCPL global vector
LONG dl_A2 * BCPL standard register values
LONG dl_A5
LONG dl_A6
APTR dl_Errors * PRIVATE pointer to array of error msgs
APTR dl_TimeReq * PRIVATE pointer to timer request
APTR dl_UtilityBase * PRIVATE pointer to utility library base
APTR dl_IntuitionBase * PRIVATE pointer to intuition library base
LABEL dl_SIZEOF * DosLibrary
*
STRUCTURE RootNode,0
BPTR rn_TaskArray * [0] is max number of CLI's
* * [1] is APTR to process id of CLI 1
* * [n] is APTR to process id of CLI n
BPTR rn_ConsoleSegment * SegList for the CLI
STRUCT rn_Time,ds_SIZEOF * Current time
LONG rn_RestartSeg * SegList for the disk validator process
BPTR rn_Info * Pointer to the Info structure
BPTR rn_FileHandlerSegment * code for file handler
STRUCT rn_CliList,MLH_SIZE * new list of all CLI processes
* * the first cpl_Array is also rn_TaskArray
APTR rn_BootProc * private! ptr to msgport of boot fs
BPTR rn_ShellSegment * seglist for Shell (for NewShell)
LONG rn_Flags * dos flags
LABEL rn_SIZEOF