Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

254 lines
7.9 KiB

  1. ; SCCSID = @(#)const2.asm 1.4 85/07/24
  2. Break <Initialized data and data used at DOS initialization>
  3. ;
  4. ; We need to identify the parts of the data area that are relevant to tasks
  5. ; and those that are relevant to the system as a whole. Under 3.0, the system
  6. ; data will be gathered with the system code. The process data under 2.x will
  7. ; be available for swapping and under 3.0 it will be allocated per-process.
  8. ;
  9. ; The data that is system data will be identified by [SYSTEM] in the comments
  10. ; describing that data item.
  11. ;
  12. include dossvc.inc
  13. ; On NT SFT Size is smaller than DOS so we have to pad some space to maintain
  14. ; the offsets in data segmeents. Below FILLSPACE is pad. 59 is the size of
  15. ; DOS5.0 sft entry.
  16. FILLSPACE equ (sf_default_number * (59 - (SIZE sf_entry)))
  17. AsmVars <Debug, Redirector, ShareF>
  18. DOSDATA SEGMENT WORD PUBLIC 'DATA'
  19. ;
  20. ; Table of routines for assignable devices
  21. ;
  22. ; MSDOS allows assignment if the following standard devices:
  23. ; stdin (usually CON input)
  24. ; stdout (usually CON output)
  25. ; auxin (usually AUX input)
  26. ; auxout (usually AUX output)
  27. ; stdlpt (usually PRN output)
  28. ;
  29. ; SPECIAL NOTE:
  30. ; Status of a file is a strange idea. We choose to handle it in this
  31. ; manner: If we're not at end-of-file, then we always say that we have a
  32. ; character. Otherwise, we return ^Z as the character and set the ZERO
  33. ; flag. In this manner we can support program written under the old DOS
  34. ; (they use ^Z as EOF on devices) and programs written under the new DOS
  35. ; (they use the ZERO flag as EOF).
  36. ; Default SFTs for boot up
  37. Public CONST001S,CONST001E
  38. CONST001s label byte
  39. PUBLIC sftabl
  40. sftabl LABEL DWORD ; [SYSTEM] file table
  41. DW -1 ; [SYSTEM] link to next table
  42. DW -1 ; [SYSTEM] link seg to next table
  43. DW sf_default_number ; [SYSTEM] Number of entries in table
  44. DB sf_default_number DUP ( (SIZE sf_entry) DUP (0)); [SYSTEM]
  45. DB FILLSPACE DUP (0) ; PAD to maintain correct offsets
  46. ; the next two variables relate to the position of the logical stdout/stdin
  47. ; cursor. They are only meaningful when stdin/stdout are assigned to the
  48. ; console.
  49. I_am CARPOS,BYTE ; [SYSTEM] cursor position in stdin
  50. I_am STARTPOS,BYTE ; [SYSTEM] position of cursor at beginning of buffered input call
  51. I_am INBUF,128 ; [SYSTEM] general device input buffer
  52. I_am CONBUF,131 ; [SYSTEM] The rest of INBUF and console buffer
  53. I_am PFLAG,BYTE ; [SYSTEM] printer echoing flag
  54. I_am VERFLG,BYTE ; [SYSTEM] Initialize with verify off
  55. I_am CharCo,BYTE,<00000011B> ; [SYSTEM] Allows statchks every 4 chars...
  56. I_am chSwitch,BYTE,<'/'> ; UNUSED - obsolete datum, can be reused
  57. I_am AllocMethod,BYTE ; [SYSTEM] how to alloc first(best)last
  58. I_am fShare,BYTE,<0> ; [SYSTEM] TRUE => sharing installed
  59. I_am DIFFNAM,BYTE,<1> ; [SYSTEM] Indicates when MYNAME has
  60. ; changed
  61. I_am MYNAME,16,<32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32>
  62. ; [SYSTEM] My network name
  63. ;
  64. ; The following table is a list of addresses that the sharer patches to be
  65. ; PUSH AX to enable the critical sections
  66. ;
  67. PUBLIC CritPatch
  68. CritPatch LABEL WORD
  69. IRP sect,<critDisk,critDevice>
  70. IF (NOT REDIRECTOR) AND (NOT SHAREF)
  71. ;
  72. ;SR; Change code patch address to a variable in data segment
  73. ;
  74. dw OFFSET DOSDATA: redir_patch
  75. dw OFFSET DOSDATA: redir_patch
  76. ;hkn Short_Addr E&sect
  77. ;hkn Short_Addr L&sect
  78. ELSE
  79. DW 0
  80. DW 0
  81. ENDIF
  82. ENDM
  83. DW 0
  84. ;
  85. ; WARNING!!! PRINT and PSPRINT *REQUIRE* ErrorMode to precede INDOS.
  86. ; Also, IBM server 1.0 requires this also.
  87. ;
  88. EVEN ; Force swap area to start on word boundry
  89. PUBLIC SWAP_START
  90. SWAP_START LABEL BYTE
  91. I_am ErrorMode,BYTE ; Flag for INT 24 processing
  92. I_am INDOS,BYTE,<0> ; DOS status for interrupt processing
  93. I_am WPErr,BYTE,<-1> ; Write protect error flag
  94. I_am EXTERR_LOCUS,BYTE ; Extended Error Locus
  95. I_am EXTERR,WORD,<0> ; Extended Error code
  96. ;WARNING Following two bytes Accessed as word in $GetExtendedError
  97. I_am EXTERR_ACTION,BYTE ; Extended Error Action
  98. I_am EXTERR_CLASS,BYTE ; Extended Error Class
  99. ; end warning
  100. I_am EXTERRPT,DWORD ; Extended Error pointer
  101. I_am DMAADD,DWORD,<80h,?> ; User's disk transfer address (disp/seg)
  102. I_am CurrentPDB,WORD ; Current process identifier
  103. I_am ConC_spsave,WORD ; saved SP before ^C
  104. I_am exit_code,WORD ; exit code of last proc.
  105. I_am CURDRV,BYTE ; Default drive (init A)
  106. I_am CNTCFLAG,BYTE,<0> ; ^C check in dispatch disabled
  107. ; F.C. 2/17/86
  108. I_am CPSWFLAG,BYTE,<0> ; Code Page Switching Flag DOS 4.00
  109. I_am CPSWSAVE,BYTE,<0> ; copy of above in case of ABORT
  110. EVEN
  111. PUBLIC Swap_Always
  112. Swap_Always LABEL BYTE
  113. I_am USER_IN_AX,WORD ; User INPUT AX value (used for
  114. ; extended error type stuff. NOTE:
  115. ; does not have Correct value on
  116. ; 1-12, OEM, Get/Set CurrentPDB,
  117. ; GetExtendedError system calls
  118. I_am PROC_ID,WORD,<0> ; PID for sharing (0 = local)
  119. I_am USER_ID,WORD,<0> ; Machine for sharing (0 = local)
  120. I_am FirstArena,WORD ; first free block found
  121. I_am BestArena,WORD ; best free block found
  122. I_am LastArena,WORD ; last free block found
  123. I_am EndMem,WORD ; End of memory used in DOSINIT
  124. I_am LASTENT,WORD ; Last entry for directory search
  125. I_am FAILERR,BYTE,<0> ; NZ if user did FAIL on I 24
  126. I_am ALLOWED,BYTE,<0> ; Allowed I 24 answers (see allowed_)
  127. I_am NoSetDir,BYTE ; true -> do not set directory
  128. I_am DidCTRLC,BYTE ; true -> we did a ^C exit
  129. I_am SpaceFlag,BYTE ; true -> embedded spaces are allowed in FCB
  130. ; Warning! The following items are accessed as a WORD in TIME.ASM
  131. EVEN
  132. I_am DAY,BYTE,<0> ; Day of month
  133. I_am MONTH,BYTE,<0> ; Month of year
  134. I_am YEAR,WORD,<0> ; Year (with century)
  135. I_am DAYCNT,WORD,<-1> ; Day count from beginning of year
  136. I_am WEEKDAY,BYTE,<0> ; Day of week
  137. ; end warning
  138. I_am CONSWAP,BYTE ; TRUE => console was swapped during device read
  139. I_am IDLEINT,BYTE,<1> ; TRUE => idle int is allowed
  140. I_am fAborting,BYTE,<0> ; TRUE => abort in progress
  141. ; Combination of all device call parameters
  142. PUBLIC DEVCALL ;
  143. DEVCALL SRHEAD <> ; basic header for disk packet
  144. PUBLIC CALLUNIT
  145. CALLUNIT LABEL BYTE ; unit number for disk
  146. CALLFLSH LABEL WORD ;
  147. I_am CALLMED,BYTE ; media byte
  148. CALLBR LABEL DWORD ;
  149. PUBLIC CALLXAD ;
  150. CALLXAD LABEL DWORD ;
  151. I_am CALLRBYT,BYTE ;
  152. PUBLIC CALLVIDM ;
  153. CALLVIDM LABEL DWORD ;
  154. DB 3 DUP(?) ;
  155. PUBLIC CallBPB ;
  156. CALLBPB LABEL DWORD ;
  157. I_am CALLSCNT,WORD ;
  158. PUBLIC CALLSSEC
  159. CALLSSEC LABEL WORD ;
  160. DW ? ;
  161. I_am CALLVIDRW,DWORD ;
  162. ;
  163. I_am CALLNEWSC,DWORD ; starting sector for >32mb
  164. I_am CALLDEVAD,DWORD ; stash for device entry point
  165. ;
  166. ; Same as above for I/O calls ;
  167. ;
  168. PUBLIC IOCall ;
  169. IOCALL SRHEAD <> ;
  170. IOFLSH LABEL WORD ;
  171. PUBLIC IORCHR ;
  172. IORCHR LABEL BYTE ;
  173. I_am IOMED,BYTE ;
  174. I_am IOXAD,DWORD ;
  175. I_am IOSCNT,WORD ;
  176. I_am IOSSEC,WORD ;
  177. ; Call struct for DSKSTATCHK ;
  178. I_am DSKSTCALL,2,<DRDNDHL,0> ;
  179. I_am DSKSTCOM,1,<DEVRDND> ;
  180. I_am DSKSTST,WORD ;
  181. DB 8 DUP (0) ;
  182. I_am DSKCHRET,BYTE ;
  183. ;hkn; short_addr has been changed to provide offset in DOSCODE.
  184. ;hkn; deviobuf is in DATA seg (DOSDATA)
  185. ;hkn short_addr DEVIOBUF ;
  186. DW offset DOSDATA:DEVIOBUF
  187. DW ? ; DOS segment set at Init
  188. I_AM DSKSTCNT,WORD,<1> ;
  189. DW 0 ;
  190. I_am CreatePDB,BYTE ; flag for creating a process
  191. PUBLIC Lock_Buffer ;
  192. Lock_Buffer LABEL DWORD ;MS. DOS Lock Buffer for Ext Lock
  193. DD ? ;MS. position
  194. DD ? ;MS. length
  195. CONST001e label byte
  196. PUBLIC vheDev
  197. vheDev SYSDEV <-1,0,0,0,>
  198. ;hkn; the foll. was moved from dosmes.asm.
  199. EVEN ; needed to maintain offsets
  200. PUBLIC UserNum, OEMNum
  201. Public DMES001S,DMES001E
  202. DMES001S Label byte
  203. USERNUM DW ? ; 24 bit user number
  204. DB ?
  205. IF IBM
  206. IF IBMCOPYRIGHT
  207. OEMNUM DB 0 ; 8 bit OEM number
  208. ELSE
  209. OEMNUM DB 0FFH ; 8 bit OEM number
  210. ENDIF
  211. ELSE
  212. OEMNUM DB 0FFH
  213. ENDIF
  214. DMES001E label byte
  215. DOSDATA ENDS
  216. 
  217. 
  218.