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.

245 lines
10 KiB

  1. ; SCCSID = @(#)msdata.asm 1.8 85/09/12
  2. ;
  3. ;----------------------------------------------------------------------------
  4. ;
  5. ; M008 : Renamed callback_ss & callback_sp to AbsRdWr_SS & AbsRdWr_SP
  6. ; To be used in Absolute Read/Write DISK routines
  7. ; M019 DB 10/26/90 - Disk write optimization: removed HIGH_SECTOR_TEMP.
  8. ;
  9. ;----------------------------------------------------------------------------
  10. ;
  11. AsmVars <Debug, Redirector, ShareF>
  12. ;
  13. ;smr;--- These extrns should be in DOSCODE segment
  14. ;
  15. DOSCODE SEGMENT BYTE PUBLIC 'CODE'
  16. ;hkn; extrn ucase_tab:byte
  17. ;hkn; extrn file_ucase_tab:byte
  18. ;hkn; extrn file_char_tab:byte
  19. ;hkn; extrn collate_tab:byte
  20. ;hkn; extrn dbcs_tab:byte
  21. ;hkn; extrn map_case:byte
  22. extrn DIVOV:near
  23. extrn QUIT:near
  24. extrn COMMAND:near
  25. extrn ABSDRD:near
  26. extrn ABSDWRT:near
  27. extrn Stay_resident:near
  28. extrn INT2F:near
  29. extrn CALL_ENTRY:near
  30. extrn IRETT:near
  31. DOSCODE ENDS
  32. ;
  33. Break <Uninitialized data overlayed by initialization code>
  34. DOSDATA SEGMENT WORD PUBLIC 'DATA'
  35. ; Init code overlaps with data area below
  36. ; ORG 0
  37. PUBLIC MSDAT001S,MSDAT001E
  38. MSDAT001S label byte
  39. I_am TIMEBUF,6 ; Time read from clock device
  40. I_am DEVIOBUF,2 ; Buffer for I/O under file assignment
  41. ;
  42. ; The following areas are used as temp buffer in EXEC system call
  43. ;
  44. I_am OPENBUF,128 ; buffer for name operations
  45. I_am RenBuf,128 ; buffer for rename destination
  46. ; Buffer for search calls
  47. I_am SEARCHBUF,53 ; internal search buffer
  48. ifdef JAPAN
  49. I_am DummyCDS,curdirLen_JPN
  50. else
  51. I_am DummyCDS,curdirLen
  52. endif
  53. ;
  54. ; End of contiguous buffer
  55. ;
  56. ; Temporary directory entry for use by many routines. Device directory
  57. ; entries (bogus) are built here.
  58. ;
  59. PUBLIC DevFCB
  60. DEVFCB LABEL BYTE ; Uses NAME1, NAME2, combined
  61. ; WARNING.. do not alter position of NAME1 relative to DEVFCB
  62. ; without first examining BUILD_DEVICE_ENT. Look carefully at DOS_RENAME
  63. ; as well as it is the only guy who uses NAME2 and DESTSTART.
  64. I_am NAME1,12 ; File name buffer
  65. I_am NAME2,13 ;
  66. I_am DESTSTART,WORD ;
  67. DB ((SIZE DIR_ENTRY) - ($ - DEVFCB)) DUP (?)
  68. ;
  69. ; End Temporary directory entry.
  70. ;
  71. I_am ATTRIB,BYTE ; storage for file attributes
  72. I_am EXTFCB,BYTE ; TRUE => extended FCB in use
  73. I_am SATTRIB,BYTE ; Storage for search attributes
  74. I_AM open_access,BYTE ; access of open system call
  75. I_am FoundDel,BYTE ; true => file was deleted
  76. I_am Found_dev,BYTE ; true => search found a device
  77. I_am fSplice,BYTE ; true => do a splice in transpath
  78. I_am fSharing,BYTE ; TRUE => no redirection
  79. I_am SECCLUSPOS,BYTE ; Position of first sector within cluster
  80. I_am TRANS,BYTE ;
  81. I_am READOP,BYTE ;
  82. I_am THISDRV,BYTE ;
  83. I_am CLUSFAC,BYTE ;
  84. I_am CLUSSPLIT,BYTE ;
  85. I_am INSMODE,BYTE ; true => insert mode in buffered read
  86. I_am cMeta,BYTE ; count of meta'ed components found
  87. I_am VOLID,BYTE ;
  88. I_am exit_type,BYTE ; type of exit...
  89. EVEN
  90. ; WARNING - the following two items are accessed as a word
  91. I_am CREATING,BYTE ; true => creating a file
  92. I_am DELALL,BYTE ; = 0 iff BUGBUG
  93. ; = DIRFREE iff BUGBUG
  94. I_am EXITHOLD,DWORD ; Temp location for proc terminate
  95. I_am user_SP,WORD ; User SP for system call
  96. I_am user_SS,WORD ; User SS for system call
  97. I_am CONTSTK,WORD ;
  98. I_am THISDPB,DWORD ;
  99. I_am CLUSSAVE,WORD ;
  100. I_am CLUSSEC,DWORD ;>32mb AC0000
  101. I_am PREREAD,WORD ; 0 means preread; 1 means optional
  102. I_am FATBYT,WORD ; Used by ALLOCATE
  103. I_am FATBYTE,WORD ; Used by $SLEAZEFUNC
  104. I_am DEVPT,DWORD ;
  105. I_am THISSFT,DWORD ; Address of user SFT
  106. I_am THISCDS,DWORD ; Address of current CDS
  107. I_am THISFCB,DWORD ; Address of user FCB
  108. I_am SFN,WORD,<-1> ; SystemFileNumber found for accessfile
  109. I_am JFN,WORD ; JobFileNumber found for accessfile
  110. I_am PJFN,DWORD ; PointerJobFileNumber found for accessfile
  111. I_am WFP_START,WORD ;
  112. I_am REN_WFP,WORD ;
  113. I_am CURR_DIR_END,WORD ;
  114. I_am NEXTADD,WORD ;
  115. I_am LASTPOS,WORD ;
  116. I_am CLUSNUM,WORD ;
  117. I_am DIRSEC,DWORD ;>32mb AC0000
  118. I_am DIRSTART,WORD ;
  119. I_am SECPOS,DWORD ;>32mb Position of first sector accessed
  120. I_am VALSEC,DWORD ;>32mb Number of valid (previously written)
  121. ; sectors
  122. I_am BYTSECPOS,WORD ; Position of first byte within sector
  123. I_am BYTPOS,4 ; Byte position in file of access
  124. I_am BYTCNT1,WORD ; No. of bytes in first sector
  125. I_am BYTCNT2,WORD ; No. of bytes in last sector
  126. I_am SECCNT,WORD ; No. of whole sectors
  127. I_am ENTFREE,WORD ;
  128. I_am ENTLAST,WORD ;
  129. I_am NXTCLUSNUM,WORD ;
  130. I_am GROWCNT,DWORD ;
  131. I_am CURBUF,DWORD ;
  132. I_am CONSft,DWORD ; SFT of console swapped guy.
  133. I_am SaveBX,WORD ;
  134. I_am SaveDS,WORD ;
  135. I_am restore_tmp,WORD ; return address for restore world
  136. I_am NSS,WORD
  137. I_am NSP,WORD
  138. I_am EXTOPEN_FLAG,WORD,<0> ;FT. extended open input flag ;AN000;
  139. I_am EXTOPEN_ON,BYTE,<0> ;FT. extended open conditional flag ;AN000;
  140. I_am EXTOPEN_IO_MODE,WORD,<0>;FT. extende open io mode ;AN000;
  141. I_am SAVE_DI,WORD ;FT. extende open saved DI ;AN000;
  142. I_am SAVE_ES,WORD ;FT. extende open saved ES ;AN000;
  143. I_am SAVE_DX,WORD ;FT. extende open saved DX ;AN000;
  144. I_am SAVE_CX,WORD ;FT. extende open saved CX ;AN000;
  145. I_am SAVE_BX,WORD ;FT. extende open saved BX ;AN000;
  146. I_am SAVE_SI,WORD ;FT. extende open saved SI ;AN000;
  147. I_am SAVE_DS,WORD ;FT. extende open saved DS ;AN000;
  148. ; HIGH_SECTOR is a hack to allow passing 32-bit sector numbers where
  149. ; we used to just pass 16 bits in a register. Now High_SECTOR holds
  150. ; the high 16, the low 16 are still in the register.
  151. I_am HIGH_SECTOR,WORD,<0> ;>32mb higher sector # ;AN000;
  152. I_am UU_HIGH_SECTOR_TEMP,WORD,<0> ;M019: Unused
  153. I_am DISK_FULL,BYTE ;>32mb indicating disk full when 1 ;AN000;
  154. I_am TEMP_VAR,WORD ; temporary variable for everyone ;AN000;
  155. I_am TEMP_VAR2,WORD ; temporary variable 2 for everyone ;AN000;
  156. I_am DrvErr,BYTE ; used to save drive error ;AN000;
  157. I_am DOS34_FLAG,WORD,<0> ; common flag for DOS 3.4 ;AN000;
  158. I_am NO_FILTER_PATH,DWORD ; pointer to orignal path ;AN000;
  159. I_am NO_FILTER_DPATH,DWORD ; pointer to orignal path of destination;AN000;
  160. ; M008
  161. I_am AbsRdWr_SS,WORD ; INT 25/26 user stack segment
  162. I_am AbsRdWr_SP,WORD ; INT 25/26 user stack offset
  163. I_am UU_Callback_flag,BYTE,<0> ; Unused
  164. ; M008
  165. ; make those pushes fast!!!
  166. EVEN
  167. StackSize = 180h ; gross but effective
  168. ;;;StackSize = 300h ; This is a "trial" change IBM hasn't
  169. ;;; ; made up their minds about
  170. ;
  171. ; WARNING!!!! DskStack may grow into AUXSTACK due to interrupt service.
  172. ; This is NO problem as long as AUXSTACK comes immediately before DSKSTACK
  173. ;
  174. PUBLIC RENAMEDMA,AuxStack,DskStack,IOStack
  175. RENAMEDMA LABEL BYTE ; See DOS_RENAME
  176. DB StackSize DUP (?) ;
  177. AuxStack LABEL BYTE
  178. DB StackSize DUP (?) ;
  179. DskStack LABEL BYTE
  180. DB StackSize DUP (?) ;
  181. IOStack LABEL BYTE
  182. ; patch space for Boca folks.
  183. ; Say What????!!! This does NOT go into the swappable area!
  184. ; NOTE: We include the decl of ibmpatch in ms-dos even though it is not needed.
  185. ; This allows the REDIRector to work on either IBM or MS-DOS.
  186. PUBLIC IBMPATCH
  187. IBMPATCH label byte
  188. I_am PRINTER_FLAG,BYTE,<0> ; [SYSTEM] status of PRINT utility
  189. I_am VOLCHNG_FLAG,BYTE,<0> ; [SYSTEM] true if volume label created
  190. I_am VIRTUAL_OPEN,BYTE,<0> ; [SYSTEM] non-zero if we opened a virtual file
  191. ; Following 4 variables moved to MSDATA.asm from MSTABLE.asm (P4986)
  192. I_am FSeek_drive,BYTE ;AN000; fastseek drive #
  193. I_am FSeek_firclus,WORD ;AN000; fastseek first cluster #
  194. I_am FSeek_logclus,WORD ;AN000; fastseek logical cluster #
  195. I_am FSeek_logsave,WORD ;AN000; fastseek returned log clus #
  196. ; I_am UU_ACT_PAGE,WORD,<-1> ;;;;;;; ;BL ; active EMS page ;AN000;
  197. I_am TEMP_DOSLOC,WORD,<-1> ;stores the temporary location of dos
  198. ;at SYSINIT time.
  199. SWAP_END LABEL BYTE
  200. PUBLIC SWAP_END
  201. ; THE FOLLOWING BYTE MUST BE HERE, IMMEDIATELY FOLLOWING SWAP_END. IT CANNOT
  202. ; BE USED. If the size of the swap data area is ODD, it will be rounded up
  203. ; to include this byte.
  204. DB ?
  205. ;hkn; DB (512+80+32-(SWAP_END-ibmpatch)) DUP (?)
  206. DOSDATA ENDS
  207. DOSDATALAST SEGMENT
  208. MSDAT001e label byte
  209. DOSDATALAST ENDS
  210.