1 SUBTTL Initialized
data and data used at DOS initialization
9 CONSTANTS
SEGMENT BYTE PUBLIC 'CONST'
10 EXTRN international_table
:BYTE
11 EXTRN Current_Country
:WORD
15 CONSTRT EQU
$ ; Start of constants segment
18 DEVSTRLEN
DB 3 ; Size of below
20 DEVSTRING
DB "DEV" ; Dummy device directory
23 ; Table of routines for assignable devices
25 ; MSDOS allows assignment if the following standard devices:
26 ; stdin (usually CON input)
27 ; stdout (usually CON output)
28 ; auxin (usually AUX input)
29 ; auxout (usually AUX output)
30 ; stdlpt (usually PRN output)
33 ; Status of a file is a strange idea. We choose to handle it in this manner:
34 ; If we're not at end-of-file, then we always say that we have a character.
35 ; Otherwise, we return ^Z as the character and set the ZERO flag. In this
36 ; manner we can support program written under the old DOS (they use ^Z as EOF
37 ; on devices) and programs written under the new DOS (they use the ZERO flag
40 ; Default FCBs for boot up
42 sftabl
LABEL DWORD ; file table
45 DW sf_default_number
; Number of entries in table
46 DB sf_default_number
DUP ( (SIZE sf_entry
) DUP (0))
48 I_AM NoSetDir
,BYTE ; true -> do not set directory
49 I_am DidCTRLC
,BYTE ; true -> we did a ^C exit
50 I_am SpaceFlag
,BYTE ; true -> embedded spaces are allowed
52 ; the next two variables relate to the position of the logical stdout/stdin
53 ; cursor. They are only meaningful when stdin/stdout are assigned to the
56 i_am CARPOS
,BYTE ; cursor position in stdin
57 i_am STARTPOS
,BYTE ; position of cursor at beginning
58 ; of buffered input call
60 I_AM VERFLG
,BYTE ; Initialize with verify off
63 CHARCO
DB 00000011B ; Allows statchks every 4 chars...
65 I_AM DMAADD
,DWORD ; User's disk transfer address
73 PUBLIC switch_character
74 switch_character
DB '/'
76 PUBLIC device_availability
77 device_availability
DB 0FFH
79 I_AM FirstArena
,WORD ; first free block found
80 I_AM BestArena
,WORD ; best free block found
81 I_AM LastArena
,WORD ; last free block found
82 I_AM AllocMethod
,BYTE ; how to alloc first(best)last
85 ; The following block of data is used by SYSINIT. Do not change the order or
90 I_AM DPBHEAD
,DWORD ; Pointer to head of DPB-FAT list
91 I_AM sft_addr
,DWORD ; Pointer to first FCB table
94 DW ?
; DOS segment set at INIT
96 ; The following address points to the CLOCK device
98 ; The following address is used by DISKSTATCHK it is always points to the
99 ; console input device header
100 I_AM BCON
,DWORD ; Console device entry points
101 i_am NUMIO
,BYTE ; Number of disk tables
102 MAXSEC
DW 0 ; Maximum allowed sector size
103 I_AM BUFFHEAD
,DWORD ; Pointer to head of buffer queue
105 I_AM NULDEV
,DWORD ; Set to list start passed by
124 I_AM CURDRV
,BYTE ; Default to drive A
126 i_am INDOS
,BYTE ; DOS status for interrupt processing
129 I_AM ErrorMode
,BYTE ; Flag for INT 24 processing
131 WPERR
DB -1 ; Write protect error flag
136 CNTCFLAG
DB 0 ; ^C check in dispatch disabled
139 LASTBUFFER
LABEL DWORD ; Buffer queue recency pointer
143 ; Combination of all device call parameters
160 I_AM CALLDEVAD
,DWORD ; stash for device entry point
162 ; Same as above for I/O calls
174 ; Call struct for DSKSTATCHK
184 DW ?
; DOS segment set at Init
192 DB 200,166 ; Leap year
201 DB 28 ; February--reset each
219 ;WARNING For HIGHMEM version, these two vars must be at the end of the
220 ; Constants segment to prevent them getting overwritten.
222 i_am CreatePDB
,BYTE ; flag for creating a process
230 SUBTTL Uninitialized
data overlayed by initialization
code
232 DATA SEGMENT WORD PUBLIC 'DATA'
233 ; Init code overlaps with data area below
237 I_AM CONBUF
,131 ; The rest of INBUF and console buffer
239 I_AM DEVIOBUF
,2 ; Buffer for I/O under file assignment
243 DEVFCB
LABEL BYTE ; Uses NAME1, NAME2, NAME3 combined
244 ; WARNING.. do not alter size or relative location of the following 4 items
245 ; without first examining FCB_RENAME
246 I_AM NAME1
,12 ; File name buffer
253 ; WARNING - the following two items are accessed as a word
262 I_AM SECCLUSPOS
,BYTE ; Position of first sector
271 ; WARNING - the following two items are accessed as a word
279 I_AM PREREAD
,WORD ; 0 means preread; 1 means optional
282 I_AM THISFCB
,DWORD ; Address of user FCB
291 I_AM SECPOS
,WORD ; Position of first sector accessed
292 I_AM VALSEC
,WORD ; Number of valid (previously written)
294 I_AM BYTSECPOS
,WORD ; Position of first byte within sector
295 I_AM BYTPOS
,4 ; Byte position in file of access
296 I_AM BYTCNT1
,WORD ; No. of bytes in first sector
297 I_AM BYTCNT2
,WORD ; No. of bytes in last sector
298 I_AM SECCNT
,WORD ; No. of whole sectors
314 I_AM ConC_spsave
,WORD
316 I_AM exit_code
,WORD ; exit code of last proc.
317 I_am exit_type
,BYTE ; type of exit...
320 ;For 2.00 this pads the DOS so that on a 2 disk IBM PC with no
321 ;CONFIG.SYS file the space taken up by BIOS, DOS, res COMMAND is
323 IBMPAD
DB 540h
DUP(?
)
326 ; make those pushes fast!!!
330 I_AM DSKSTACK
,0A0h ; Stack space
342 \1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a