summaryrefslogtreecommitdiff
path: root/v4.0/src/INC/CONST2.ASM
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/INC/CONST2.ASM')
-rw-r--r--v4.0/src/INC/CONST2.ASM211
1 files changed, 211 insertions, 0 deletions
diff --git a/v4.0/src/INC/CONST2.ASM b/v4.0/src/INC/CONST2.ASM
new file mode 100644
index 0000000..7a7c1d5
--- /dev/null
+++ b/v4.0/src/INC/CONST2.ASM
@@ -0,0 +1,211 @@
1; SCCSID = @(#)const2.asm 1.4 85/07/24
2TITLE CONST2 - More constants data
3NAME CONST2
4
5.xlist
6.xcref
7INCLUDE DOSSYM.INC
8include dosseg.asm
9INCLUDE DEVSYM.INC
10.cref
11.list
12
13Break <Initialized data and data used at DOS initialization>
14
15;
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.
20;
21; The data that is system data will be identified by [SYSTEM] in the comments
22; describing that data item.
23;
24
25 AsmVars <Kanji, Debug, Redirector, ShareF>
26
27CONSTANTS SEGMENT WORD PUBLIC 'CONST'
28
29;
30; Table of routines for assignable devices
31;
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)
38;
39; SPECIAL NOTE:
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).
46
47; Default SFTs for boot up
48
49Public CONST001S,CONST001E
50CONST001s label byte
51 PUBLIC sftabl
52sftabl 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]
57
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
60; console.
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
65
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
73 ; changed
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
76
77
78;
79; The following table is a list of addresses that the sharer patches to be
80; PUSH AX to enable the critical sections
81;
82PUBLIC CritPatch
83CritPatch LABEL WORD
84IRP sect,<critDisk,critDevice>
85IF (NOT REDIRECTOR) AND (NOT SHAREF)
86 Short_Addr E&sect
87 Short_Addr L&sect
88ELSE
89 DW 0
90 DW 0
91ENDIF
92ENDM
93 DW 0
94
95;
96; WARNING!!! PRINT and PSPRINT *REQUIRE* ErrorMode to precede INDOS.
97; Also, IBM server 1.0 requires this also.
98;
99 EVEN ; Force swap area to start on word boundry
100PUBLIC SWAP_START
101SWAP_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
107
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
111; end warning
112
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
120 ; F.C. 2/17/86
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
123 EVEN
124 PUBLIC Swap_Always
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
138
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
145 EVEN
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
151; end warning
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
155
156; Combination of all device call parameters
157 PUBLIC DEVCALL ;
158DEVCALL SRHEAD <> ; basic header for disk packet
159 PUBLIC CALLUNIT
160CALLUNIT LABEL BYTE ; unit number for disk
161CALLFLSH LABEL WORD ;
162 I_am CALLMED,BYTE ; media byte
163CALLBR LABEL DWORD ;
164 PUBLIC CALLXAD ;
165CALLXAD LABEL DWORD ;
166 I_am CALLRBYT,BYTE ;
167 PUBLIC CALLVIDM ;
168CALLVIDM LABEL DWORD ;
169 DB 3 DUP(?) ;
170 PUBLIC CallBPB ;
171CALLBPB LABEL DWORD ;
172 I_am CALLSCNT,WORD ;
173 PUBLIC CALLSSEC
174CALLSSEC LABEL WORD ;
175 DW ? ;
176 I_am CALLVIDRW,DWORD ;
177 ;
178 I_am CALLNEWSC,DWORD ; starting sector for >32mb
179 I_am CALLDEVAD,DWORD ; stash for device entry point
180 ;
181; Same as above for I/O calls ;
182 ;
183 PUBLIC IOCall ;
184IOCALL SRHEAD <> ;
185IOFLSH LABEL WORD ;
186 PUBLIC IORCHR ;
187IORCHR LABEL BYTE ;
188 I_am IOMED,BYTE ;
189 I_am IOXAD,DWORD ;
190 I_am IOSCNT,WORD ;
191 I_am IOSSEC,WORD ;
192; Call struct for DSKSTATCHK ;
193 I_am DSKSTCALL,2,<DRDNDHL,0> ;
194 I_am DSKSTCOM,1,<DEVRDND> ;
195 I_am DSKSTST,WORD ;
196 DB 8 DUP (0) ;
197 I_am DSKCHRET,BYTE ;
198 short_addr DEVIOBUF ;
199 DW ? ; DOS segment set at Init
200 I_AM DSKSTCNT,WORD,<1> ;
201 DW 0 ;
202
203 I_am CreatePDB,BYTE ; flag for creating a process
204 PUBLIC Lock_Buffer ;
205Lock_Buffer LABEL DWORD ;MS. DOS Lock Buffer for Ext Lock
206 DD ? ;MS. position
207 DD ? ;MS. length
208CONST001e label byte
209
210CONSTANTS ENDS
211 END