]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/INC/CONST2.ASM
1 ; SCCSID = @(#)const2.asm 1.4 85/07/24
2 TITLE CONST2
- More constants
data
13 Break <Initialized
data and data used at DOS initialization
>
16 ; We need to identify the parts of the data area that are relevant to tasks
17 ; and those that are relevant to the system as a whole. Under 3.0, the system
18 ; data will be gathered with the system code. The process data under 2.x will
19 ; be available for swapping and under 3.0 it will be allocated per-process.
21 ; The data that is system data will be identified by [SYSTEM] in the comments
22 ; describing that data item.
25 AsmVars
<Kanji
, Debug
, Redirector
, ShareF
>
27 CONSTANTS
SEGMENT WORD PUBLIC 'CONST'
30 ; Table of routines for assignable devices
32 ; MSDOS allows assignment if the following standard devices:
33 ; stdin (usually CON input)
34 ; stdout (usually CON output)
35 ; auxin (usually AUX input)
36 ; auxout (usually AUX output)
37 ; stdlpt (usually PRN output)
40 ; Status of a file is a strange idea. We choose to handle it in this
41 ; manner: If we're not at end-of-file, then we always say that we have a
42 ; character. Otherwise, we return ^Z as the character and set the ZERO
43 ; flag. In this manner we can support program written under the old DOS
44 ; (they use ^Z as EOF on devices) and programs written under the new DOS
45 ; (they use the ZERO flag as EOF).
47 ; Default SFTs for boot up
49 Public CONST001S
,CONST001E
52 sftabl
LABEL DWORD ; [SYSTEM] file table
53 DW -1 ; [SYSTEM] link to next table
54 DW -1 ; [SYSTEM] link seg to next table
55 DW sf_default_number
; [SYSTEM] Number of entries in table
56 DB sf_default_number
DUP ( (SIZE sf_entry
) DUP (0)); [SYSTEM]
58 ; the next two variables relate to the position of the logical stdout/stdin
59 ; cursor. They are only meaningful when stdin/stdout are assigned to the
61 I_am CARPOS
,BYTE ; [SYSTEM] cursor position in stdin
62 I_am STARTPOS
,BYTE ; [SYSTEM] position of cursor at beginning of buffered input call
63 I_am INBUF
,128 ; [SYSTEM] general device input buffer
64 I_am CONBUF
,131 ; [SYSTEM] The rest of INBUF and console buffer
66 I_am PFLAG
,BYTE ; [SYSTEM] printer echoing flag
67 I_am VERFLG
,BYTE ; [SYSTEM] Initialize with verify off
68 I_am CharCo
,BYTE,<00000011B> ; [SYSTEM] Allows statchks every 4 chars...
69 I_am chSwitch
,BYTE,<'/'> ; [SYSTEM] current switch character
70 I_am AllocMethod
,BYTE ; [SYSTEM] how to alloc first(best)last
71 I_am fShare
,BYTE,<0> ; [SYSTEM] TRUE => sharing installed
72 I_am DIFFNAM
,BYTE,<1> ; [SYSTEM] Indicates when MYNAME has
74 I_am MYNAME
,16,<32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32>
75 ; [SYSTEM] My network name
79 ; The following table is a list of addresses that the sharer patches to be
80 ; PUSH AX to enable the critical sections
84 IRP sect
,<critDisk
,critDevice
>
85 IF (NOT REDIRECTOR
) AND (NOT SHAREF
)
96 ; WARNING!!! PRINT and PSPRINT *REQUIRE* ErrorMode to precede INDOS.
97 ; Also, IBM server 1.0 requires this also.
99 EVEN
; Force swap area to start on word boundry
101 SWAP_START
LABEL BYTE
102 I_am ErrorMode
,BYTE ; Flag for INT 24 processing
103 I_am INDOS
,BYTE,<0> ; DOS status for interrupt processing
104 I_am WPErr
,BYTE,<-1> ; Write protect error flag
105 I_am EXTERR_LOCUS
,BYTE ; Extended Error Locus
106 I_am EXTERR
,WORD,<0> ; Extended Error code
108 ;WARNING Following two bytes Accessed as word in $GetExtendedError
109 I_am EXTERR_ACTION
,BYTE ; Extended Error Action
110 I_am EXTERR_CLASS
,BYTE ; Extended Error Class
113 I_am EXTERRPT
,DWORD ; Extended Error pointer
114 I_am DMAADD
,DWORD,<80h
,?
> ; User's disk transfer address (disp/seg)
115 I_am CurrentPDB
,WORD ; Current process identifier
116 I_am ConC_spsave
,WORD ; saved SP before ^C
117 I_am exit_code
,WORD ; exit code of last proc.
118 I_am CURDRV
,BYTE ; Default drive (init A)
119 I_am CNTCFLAG
,BYTE,<0> ; ^C check in dispatch disabled
121 I_am CPSWFLAG
,BYTE,<0> ; Code Page Switching Flag DOS 4.00
122 I_am CPSWSAVE
,BYTE,<0> ; copy of above in case of ABORT
125 Swap_Always
LABEL BYTE
126 I_am USER_IN_AX
,WORD ; User INPUT AX value (used for
127 ; extended error type stuff. NOTE:
128 ; does not have Correct value on
129 ; 1-12, OEM, Get/Set CurrentPDB,
130 ; GetExtendedError system calls
131 I_am PROC_ID
,WORD,<0> ; PID for sharing (0 = local)
132 I_am USER_ID
,WORD,<0> ; Machine for sharing (0 = local)
133 I_am FirstArena
,WORD ; first free block found
134 I_am BestArena
,WORD ; best free block found
135 I_am LastArena
,WORD ; last free block found
136 I_am EndMem
,WORD ; End of memory used in DOSINIT
137 I_am LASTENT
,WORD ; Last entry for directory search
139 I_am FAILERR
,BYTE,<0> ; NZ if user did FAIL on I 24
140 I_am ALLOWED
,BYTE,<0> ; Allowed I 24 answers (see allowed_)
141 I_am NoSetDir
,BYTE ; true -> do not set directory
142 I_am DidCTRLC
,BYTE ; true -> we did a ^C exit
143 I_am SpaceFlag
,BYTE ; true -> embedded spaces are allowed in FCB
144 ; Warning! The following items are accessed as a WORD in TIME.ASM
146 I_am DAY
,BYTE,<0> ; Day of month
147 I_am MONTH
,BYTE,<0> ; Month of year
148 I_am YEAR
,WORD,<0> ; Year (with century)
149 I_am DAYCNT
,WORD,<-1> ; Day count from beginning of year
150 I_am WEEKDAY
,BYTE,<0> ; Day of week
152 I_am CONSWAP
,BYTE ; TRUE => console was swapped during device read
153 I_am IDLEINT
,BYTE,<1> ; TRUE => idle int is allowed
154 I_am fAborting
,BYTE,<0> ; TRUE => abort in progress
156 ; Combination of all device call parameters
158 DEVCALL SRHEAD
<> ; basic header for disk packet
160 CALLUNIT
LABEL BYTE ; unit number for disk
161 CALLFLSH
LABEL WORD ;
162 I_am CALLMED
,BYTE ; media byte
165 CALLXAD
LABEL DWORD ;
168 CALLVIDM
LABEL DWORD ;
171 CALLBPB
LABEL DWORD ;
174 CALLSSEC
LABEL WORD ;
176 I_am CALLVIDRW
,DWORD ;
178 I_am CALLNEWSC
,DWORD ; starting sector for >32mb
179 I_am CALLDEVAD
,DWORD ; stash for device entry point
181 ; Same as above for I/O calls ;
192 ; Call struct for DSKSTATCHK ;
193 I_am DSKSTCALL
,2,<DRDNDHL
,0> ;
194 I_am DSKSTCOM
,1,<DEVRDND
> ;
198 short_addr DEVIOBUF
;
199 DW ?
; DOS segment set at Init
200 I_AM DSKSTCNT
,WORD,<1> ;
203 I_am CreatePDB
,BYTE ; flag for creating a process
205 Lock_Buffer
LABEL DWORD ;MS. DOS Lock Buffer for Ext Lock