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.

1079 lines
30 KiB

  1. page ,132
  2. ; SCCSID = @(#)tdata.asm 4.3 85/05/17
  3. ; SCCSID = @(#)tdata.asm 4.3 85/05/17
  4. TITLE COMMAND Transient Initialized DATA
  5. ;/*
  6. ; * Microsoft Confidential
  7. ; * Copyright (C) Microsoft Corporation 1991
  8. ; * All Rights Reserved.
  9. ; */
  10. ; MODIFICATION HISTORY
  11. ;
  12. ; EE 10-20-83 Changed the drive check indicator bytes (DCIB's) in
  13. ; COMTAB to be a flag byte in which bit 0 is now the
  14. ; DCIB(bit) and bit 1 is on if the command can take
  15. ; switches.
  16. ;
  17. ; M003 SR 07/16/90 Added LoadHigh to command table, added
  18. ; parse control block for LoadHigh
  19. ;
  20. ; M008 SA 8/1/90 Remove /h parameter. Eliminate code to
  21. ; internally handle /? message.
  22. ;
  23. ; M010 SA 8/5/90 Add support for /l (lowercase) option.
  24. ;
  25. ; M016 SR 08/09/90 Added public statements for new error
  26. ; messages for LoadHigh.
  27. ;
  28. comment %
  29. The TRANDATA segment contains data that is assumed to have predefined
  30. initial values at the beginning of each command cycle. It is
  31. included in the transient checksum area. If values in TRANDATA
  32. change, the transient will be reloaded for the next command cycle.
  33. Modification History
  34. --------------------
  35. 8/12/89 DBO History resumes after six years.
  36. 8/12/89 DBO Added for new DIR:
  37. -8/14/89 DirEnvVar, AttrLtrs, OrderLtrs;
  38. New PARSE_DIR and subordinate parse blocks
  39. (called PARSE_DIR_E for now);
  40. %
  41. fmt macro name,string,args
  42. local a
  43. a db string
  44. PUBLIC name
  45. name dw offset trangroup:a
  46. irp val,<args>
  47. dw offset trangroup:val
  48. endm
  49. endm
  50. btab macro b,sym
  51. db b
  52. dw offset trangroup:sym
  53. endm
  54. .xlist
  55. .xcref
  56. INCLUDE comsw.asm ;AC000;
  57. INCLUDE comseg.asm
  58. INCLUDE dirent.inc ;AN042;
  59. .list
  60. .cref
  61. BREAK MACRO subtitle
  62. SUBTTL subtitle
  63. PAGE
  64. ENDM
  65. ;
  66. ; WARNING: DO NOT INCLUDE DOSSYM.INC BECAUSE IT DESTROYS THE MACRO 'FMT' THAT
  67. ; has been defined above - RS.
  68. ;
  69. INCLUDE ERROR.INC
  70. INCLUDE ifequ.asm
  71. INCLUDE comequ.asm
  72. ; Note curdir.inc is included by comequ.asm
  73. TRANSPACE SEGMENT PUBLIC BYTE ;AC000;
  74. EXTRN arg_buf:BYTE
  75. EXTRN bwdbuf:byte
  76. EXTRN bytes_free:WORD
  77. EXTRN charbuf:byte
  78. EXTRN copy_Num:WORD
  79. EXTRN DATE_OUTPUT:BYTE ;AC000;
  80. EXTRN Dir_Num:WORD
  81. EXTRN DRIVE_OUTPUT:BYTE ;AC000;
  82. EXTRN file_size_high:WORD
  83. EXTRN file_size_low:WORD
  84. EXTRN FileSiz:DWORD ; accumulated file size for DIR
  85. EXTRN major_ver_num:WORD
  86. EXTRN minor_ver_num:WORD
  87. EXTRN one_char_val:BYTE
  88. EXTRN PARSE1_OUTPUT:BYTE ;AC000;
  89. EXTRN srcbuf:byte
  90. EXTRN string_ptr_2:WORD
  91. EXTRN system_cpage:word
  92. EXTRN TIME_OUTPUT:BYTE ;AC000;
  93. EXTRN vol_drv:BYTE
  94. EXTRN vol_serial:dword ;AN000;
  95. TRANSPACE ENDS
  96. TRANCODE SEGMENT PUBLIC BYTE ;AC000;
  97. EXTRN $CALL:NEAR
  98. EXTRN $CHDIR:NEAR
  99. EXTRN $EXIT:NEAR
  100. EXTRN $FOR:NEAR
  101. EXTRN $IF:NEAR
  102. EXTRN $MKDIR:NEAR
  103. EXTRN $RMDIR:NEAR
  104. EXTRN ADD_NAME_TO_ENVIRONMENT:NEAR
  105. EXTRN ADD_PROMPT:NEAR
  106. EXTRN build_dir_for_prompt:near
  107. EXTRN CATALOG:NEAR
  108. EXTRN CHCP:NEAR
  109. EXTRN CLS:NEAR
  110. EXTRN CNTRLC:NEAR
  111. EXTRN COPY:NEAR
  112. EXTRN CRENAME:NEAR
  113. EXTRN CRLF2:NEAR
  114. EXTRN CTIME:NEAR
  115. EXTRN CTTY:NEAR
  116. EXTRN DATE:NEAR
  117. EXTRN ECHO:NEAR
  118. EXTRN ERASE:NEAR
  119. EXTRN GOTO:NEAR
  120. EXTRN IFERLEV:NEAR
  121. EXTRN IFEXISTS:NEAR
  122. EXTRN IFNOT:NEAR
  123. EXTRN PATH:NEAR
  124. EXTRN PAUSE:NEAR
  125. EXTRN PRINT_B:NEAR
  126. EXTRN PRINT_BACK:NEAR
  127. EXTRN PRINT_DATE:NEAR
  128. EXTRN PRINT_CHAR:NEAR
  129. EXTRN PRINT_DRIVE:NEAR
  130. EXTRN PRINT_EQ:NEAR
  131. EXTRN PRINT_ESC:NEAR
  132. EXTRN PRINT_G:NEAR
  133. EXTRN PRINT_L:NEAR
  134. EXTRN PRINT_TIME:NEAR
  135. EXTRN PRINT_VERSION:NEAR
  136. EXTRN SHIFT:NEAR
  137. EXTRN TCOMMAND:NEAR
  138. EXTRN TRUENAME:NEAR ;AN000;
  139. EXTRN TYPEFIL:NEAR
  140. EXTRN VERSION:NEAR
  141. EXTRN VOLUME:NEAR
  142. EXTRN VERIFY:NEAR
  143. extrn LoadHigh:NEAR ; M003
  144. ;
  145. ; WARNING!!! No code may appear after this label!!!!
  146. ;
  147. ;
  148. ; Bugbug:
  149. ; 8/12/89 Looks like somebody ignored/missed this warning. TRANCODE
  150. ; is added to at the end of this file. Fortunately, it looks
  151. ; like no modules refer to this label.
  152. ;
  153. PUBLIC TranCodeLast
  154. TranCodeLast LABEL BYTE
  155. TRANCODE ENDS
  156. ; Data for transient portion
  157. TRANDATA SEGMENT PUBLIC BYTE
  158. PUBLIC accden_ptr ;AN000;
  159. PUBLIC acrlf_ptr ;AN000;
  160. PUBLIC arg_buf_ptr ;AN000;
  161. PUBLIC AttrLtrs
  162. PUBLIC badbat_ptr ;AN000;
  163. PUBLIC badcd_ptr ;AN000;
  164. PUBLIC badCPmes_ptr ;AN000;
  165. PUBLIC badcurdrv ;AN000;
  166. PUBLIC baddat_ptr ;AN000;
  167. PUBLIC baddev_ptr ;AN000;
  168. PUBLIC baddrv_ptr ;AN000;
  169. PUBLIC badlab_ptr ;AN000;
  170. PUBLIC badmkd_ptr ;AN000;
  171. PUBLIC badnam_ptr ;AN000;
  172. PUBLIC bad_on_off_ptr ;AN000;
  173. PUBLIC badPmes_ptr ;AN000;
  174. PUBLIC badrmd_ptr ;AN000;
  175. PUBLIC badtim_ptr ;AN000;
  176. PUBLIC batext
  177. PUBLIC bytes_ptr
  178. PUBLIC bytmes_ptr ;AN000;
  179. PUBLIC CLSSTRING
  180. PUBLIC comext
  181. PUBLIC comspec_flag ;AN071;
  182. PUBLIC COMSPECSTR
  183. PUBLIC COMTAB
  184. PUBLIC copied_ptr ;AN000;
  185. PUBLIC cp_active_ptr ;AN000;
  186. PUBLIC cp_not_all_ptr ;AN000;
  187. PUBLIC cp_not_set_ptr ;AN000;
  188. PUBLIC ctrlcmes_ptr ;AN000;
  189. PUBLIC curdat_mo_day ;AN000;
  190. PUBLIC curdat_ptr ;AN000;
  191. PUBLIC curdat_yr ;AN000;
  192. PUBLIC curtim_hr_min ;AN000;
  193. PUBLIC curtim_ptr ;AN000;
  194. PUBLIC curtim_sec_hn ;AN000;
  195. PUBLIC dback_ptr ;AN000;
  196. PUBLIC del_Y_N_ptr ;AN000;
  197. PUBLIC devwmes_ptr ;AN000;
  198. PUBLIC dircont_ptr
  199. PUBLIC dirdattim_ptr ;AN000;
  200. PUBLIC dirdat_mo_day ;AN000;
  201. PUBLIC dirdat_yr ;AN000;
  202. PUBLIC DirEnvVar
  203. PUBLIC dirhead_ptr ;AN000;
  204. PUBLIC dirmes_ptr ;AN000;
  205. PUBLIC dirtim_hr_min ;AN000;
  206. PUBLIC dirtim_sec_hn ;AN000;
  207. PUBLIC DIR_SW_PTRS
  208. PUBLIC disp_file_size_ptr ;AN000;
  209. PUBLIC DosHma_Ptr
  210. PUBLIC DosLow_Ptr
  211. PUBLIC DosRev_Ptr
  212. PUBLIC DosRom_Ptr
  213. PUBLIC dmes_ptr ;AN000;
  214. PUBLIC echomes_ptr ;AN000;
  215. PUBLIC enverr_ptr ;AN000;
  216. PUBLIC errparsenv_ptr
  217. PUBLIC eurdat_ptr ;AN000;
  218. PUBLIC exeext
  219. PUBLIC extend_buf_off ;AN000;
  220. PUBLIC extend_buf_ptr ;AN000;
  221. PUBLIC extend_buf_seg ;AN000;
  222. PUBLIC extend_buf_sub ;AN000;
  223. PUBLIC file_name_ptr ;AN000;
  224. PUBLIC fornestmes_ptr ;AN000;
  225. PUBLIC fuldir_ptr ;AN000;
  226. PUBLIC IFTAB
  227. PUBLIC inBdev_ptr ;AN000;
  228. PUBLIC inornot_ptr ;AN000;
  229. PUBLIC Inv_code_page ;AN000;
  230. PUBLIC inval_path_ptr ;AN000;
  231. PUBLIC japdat_ptr ;AN000;
  232. PUBLIC Losterr_ptr ;AN000;
  233. PUBLIC md_exists_ptr ;AN006;
  234. PUBLIC msg_cont_flag ;AN000;
  235. PUBLIC msg_disp_class ;AN000;
  236. PUBLIC needbat_ptr ;AN000;
  237. PUBLIC newdat_format ;AN000;
  238. PUBLIC newdat_ptr ;AN000;
  239. PUBLIC newtim_ptr ;AN000;
  240. PUBLIC NLSFUNC_ptr ;AN000;
  241. PUBLIC nospace_ptr ;AN000;
  242. PUBLIC no_values ;AN000;
  243. PUBLIC nulpath_ptr ;AN000;
  244. PUBLIC offmes_ptr ;AN000;
  245. PUBLIC onmes_ptr ;AN000;
  246. PUBLIC OrderLtrs ; list of sort order letters for DIR
  247. PUBLIC overwr_ptr ;AN000;
  248. PUBLIC PARSE_BREAK ;AN000;
  249. PUBLIC PARSE_CHCP ;AN000;
  250. PUBLIC PARSE_CHDIR ;AN000;
  251. PUBLIC PARSE_CTTY ;AN000;
  252. PUBLIC PARSE_DATE ;AN000;
  253. PUBLIC PARSE_DIR ;AN000;
  254. PUBLIC PARSE_ERASE ;AN000;
  255. PUBLIC PARSE_MRDIR ;AN000;
  256. PUBLIC PARSE_RENAME ;AN000;
  257. PUBLIC PARSE_TIME ;AN000;
  258. PUBLIC PARSE_VER
  259. PUBLIC PARSE_VOL ;AN000;
  260. public Parse_LoadHi ; Parse block for LoadHigh; M003
  261. PUBLIC PATH_TEXT
  262. PUBLIC pausemes_ptr ;AN000;
  263. PUBLIC pipeEmes_ptr ;AN000;
  264. PUBLIC promptdat_moday ;AN000;
  265. PUBLIC promptdat_ptr ;AN000;
  266. PUBLIC promptdat_yr ;AN000;
  267. PUBLIC PROMPT_TABLE
  268. PUBLIC PROMPT_TEXT
  269. PUBLIC promtim_hr_min ;AN000;
  270. PUBLIC promtim_ptr ;AN000;
  271. PUBLIC promtim_sec_hn ;AN000;
  272. PUBLIC renerr_ptr ;AN000;
  273. PUBLIC SLASH_P_SYN ;AN000;
  274. PUBLIC string_buf_ptr ;AN000;
  275. PUBLIC suremes_ptr ;AN000;
  276. PUBLIC switch_list
  277. PUBLIC syntmes_ptr ;AN000;
  278. PUBLIC tab_ptr ;AN000;
  279. PUBLIC total_ptr
  280. PUBLIC TRANDATAEND
  281. PUBLIC usadat_ptr ;AN000;
  282. PUBLIC verimes_ptr ;AN000;
  283. PUBLIC vermes_ptr ;AN000;
  284. PUBLIC volmes_ptr ;AN000;
  285. PUBLIC volmes_ptr_2 ;AN000;
  286. PUBLIC volsermes_ptr ;AN000;
  287. PUBLIC WEEKTAB
  288. public NoExecBat_Ptr ; M016
  289. public LhInvFil_Ptr ; M016
  290. public NoCntry_Ptr ; M045
  291. INCLUDE tranmsg.asm
  292. ; Lists of help message numbers for internal commands and /?
  293. ;;NoHelpMsgs dw 1200,0 ;M014
  294. BreakHelpMsgs dw 1300,0
  295. ChcpHelpMsgs dw 1320,1321,0
  296. CdHelpMsgs dw 1340,1341,1342,0
  297. ClsHelpMsgs dw 1360,0
  298. CopyHelpMsgs dw 1400,1401,1402,1403,1404,0
  299. CttyHelpMsgs dw 1420,0
  300. DateHelpMsgs dw 1440,1441,0
  301. DelHelpMsgs dw 1460,1461,1462,0
  302. DirHelpMsgs dw 1480,1481,1482,1483,1484,1485,1486,1487,1488,0
  303. ExitHelpMsgs dw 1500,0
  304. MdHelpMsgs dw 1520,0
  305. PathHelpMsgs dw 1540,1541,1542,0
  306. PromptHelpMsgs dw 1560,1561,1562,1563,1564,1565,1566,1567,1568,0
  307. RdHelpMsgs dw 1580,0
  308. RenHelpMsgs dw 1600,1601,1602,0
  309. SetHelpMsgs dw 1620,1621,1622,0
  310. TimeHelpMsgs dw 1640,1641,0
  311. TypeHelpMsgs dw 1660,0
  312. VerHelpMsgs dw 1680,0
  313. VerifyHelpMsgs dw 1700,0
  314. VolHelpMsgs dw 1720,0
  315. CallHelpMsgs dw 1740,1741,0 ;M014
  316. RemHelpMsgs dw 1760,0 ;M014
  317. PauseHelpMsgs dw 1780,0 ;M014
  318. EchoHelpMsgs dw 1800,1801,0 ;M014
  319. GotoHelpMsgs dw 1820,1821,0 ;M014
  320. ShiftHelpMsgs dw 1840,0 ;M014
  321. IfHelpMsgs dw 1860,1861,1862,1863,1864,1865,1866,0 ;M014
  322. ForHelpMsgs dw 1880,1881,1882,1883,0 ;M014
  323. TruenameHelpMsgs dw 1900,0 ;M014
  324. LoadhighHelpMsgs dw 1920,1921,1922,0 ;M014
  325. CLSSTRING DB 4,01BH,"[2J" ; ANSI Clear screen
  326. PROMPT_TABLE LABEL BYTE
  327. btab "B",Print_B
  328. btab "D",PRINT_DATE
  329. btab "E",PRINT_ESC
  330. btab "G",PRINT_G
  331. btab "H",PRINT_BACK
  332. btab "L",PRINT_L
  333. btab "N",PRINT_DRIVE
  334. btab "P",build_dir_for_prompt
  335. btab "Q",PRINT_EQ
  336. btab "T",PRINT_TIME
  337. btab "V",PRINT_VERSION
  338. btab "_",CRLF2
  339. btab "$",PRINT_CHAR
  340. DB 0 ; NUL TERMINATED
  341. IFTAB LABEL BYTE ; Table of IF conditionals
  342. DB 3,"NOT" ; First byte is count
  343. DW OFFSET TRANGROUP:IFNOT
  344. DB 10,"ERRORLEVEL"
  345. DW OFFSET TRANGROUP:IFERLEV
  346. DB 5,"EXIST"
  347. DW OFFSET TRANGROUP:IFEXISTS
  348. DB 0
  349. ; Table for internal command names
  350. COMTAB DB 3,"DIR",fSwitchAllowed+fCheckDrive
  351. DW OFFSET TRANGROUP:CATALOG ; In TCMD1.ASM
  352. DW TRANGROUP:DirHelpMsgs
  353. DB 4,"CALL",fSwitchAllowed
  354. DW OFFSET TRANGROUP:$CALL ; In TBATCH2.ASM
  355. DW TRANGROUP:CallHelpMsgs
  356. ifndef NEC_98
  357. DB 4,"CHCP",fSwitchAllowed
  358. else ;NEC_98
  359. DB 4," ",fSwitchAllowed ; NEC01 91/07/29 CHCP Command DEL
  360. endif ;NEC_98
  361. DW OFFSET TRANGROUP:CHCP ; In TCMD2B.ASM
  362. DW TRANGROUP:ChcpHelpMsgs
  363. DB 6,"RENAME",fSwitchAllowed+fCheckDrive ;AC018; P3903
  364. DW OFFSET TRANGROUP:CRENAME ; In TCMD1.ASM
  365. DW TRANGROUP:RenHelpMsgs
  366. DB 3,"REN",fSwitchAllowed+fCheckDrive ;AC018; P3903
  367. DW OFFSET TRANGROUP:CRENAME ; In TCMD1.ASM
  368. DW TRANGROUP:RenHelpMsgs
  369. DB 5,"ERASE",fSwitchAllowed+fCheckDrive
  370. DW OFFSET TRANGROUP:ERASE ; In TCMD1.ASM
  371. DW TRANGROUP:DelHelpMsgs
  372. DB 3,"DEL",fSwitchAllowed+fCheckDrive
  373. DW OFFSET TRANGROUP:ERASE ; In TCMD1.ASM
  374. DW TRANGROUP:DelHelpMsgs
  375. DB 4,"TYPE",fSwitchAllowed+fCheckDrive ;AC018; P3903
  376. DW OFFSET TRANGROUP:TYPEFIL ; In TCMD1.ASM
  377. DW TRANGROUP:TypeHelpMsgs
  378. DB 3,"REM",fSwitchAllowed+fLimitHelp
  379. DW OFFSET TRANGROUP:TCOMMAND ; In TCODE.ASM
  380. DW TRANGROUP:RemHelpMsgs
  381. DB 4,"COPY",fSwitchAllowed+fCheckDrive
  382. DW OFFSET TRANGROUP:COPY ; In COPY.ASM
  383. DW TRANGROUP:CopyHelpMsgs
  384. DB 5,"PAUSE",fSwitchAllowed+fLimitHelp
  385. DW OFFSET TRANGROUP:PAUSE ; In TCMD1.ASM
  386. DW TRANGROUP:PauseHelpMsgs
  387. DB 4,"DATE",fSwitchAllowed
  388. DW OFFSET TRANGROUP:DATE ; In TPIPE.ASM
  389. DW TRANGROUP:DateHelpMsgs
  390. DB 4,"TIME",fSwitchAllowed ;AC018; P3903
  391. DW OFFSET TRANGROUP:CTIME ; In TPIPE.ASM
  392. DW TRANGROUP:TimeHelpMsgs
  393. DB 3,"VER",fSwitchAllowed
  394. DW OFFSET TRANGROUP:VERSION ; In TCMD2.ASM
  395. DW TRANGROUP:VerHelpMsgs
  396. DB 3,"VOL",fSwitchAllowed+fCheckDrive ;AC018; P3903
  397. DW OFFSET TRANGROUP:VOLUME ; In TCMD1.ASM
  398. DW TRANGROUP:VolHelpMsgs
  399. DB 2,"CD",fSwitchAllowed+fCheckDrive ;AC018; P3903
  400. DW OFFSET TRANGROUP:$CHDIR ; In TENV.ASM
  401. DW TRANGROUP:CdHelpMsgs
  402. DB 5,"CHDIR",fSwitchAllowed+fCheckDrive ;AC018; P3903
  403. DW OFFSET TRANGROUP:$CHDIR ; In TENV.ASM
  404. DW TRANGROUP:CdHelpMsgs
  405. DB 2,"MD",fSwitchAllowed+fCheckDrive ;AC018; P3903
  406. DW OFFSET TRANGROUP:$MKDIR ; In TENV.ASM
  407. DW TRANGROUP:MdHelpMsgs
  408. DB 5,"MKDIR",fSwitchAllowed+fCheckDrive ;AC018; P3903
  409. DW OFFSET TRANGROUP:$MKDIR ; In TENV.ASM
  410. DW TRANGROUP:MdHelpMsgs
  411. DB 2,"RD",fSwitchAllowed+fCheckDrive ;AC018; P3903
  412. DW OFFSET TRANGROUP:$RMDIR ; In TENV.ASM
  413. DW TRANGROUP:RdHelpMsgs
  414. DB 5,"RMDIR",fSwitchAllowed+fCheckDrive ;AC018; P3903
  415. DW OFFSET TRANGROUP:$RMDIR ; In TENV.ASM
  416. DW TRANGROUP:RdHelpMsgs
  417. DB 5,"BREAK",fSwitchAllowed ;AC018; P3903
  418. DW OFFSET TRANGROUP:CNTRLC ; In TUCODE.ASM
  419. DW TRANGROUP:BreakHelpMsgs
  420. DB 6,"VERIFY",fSwitchAllowed ;AC018; P3903
  421. DW OFFSET TRANGROUP:VERIFY ; In TUCODE.ASM
  422. DW TRANGROUP:VerifyHelpMsgs
  423. DB 3,"SET",fSwitchAllowed+fLimitHelp
  424. DW OFFSET TRANGROUP:ADD_NAME_TO_ENVIRONMENT; In TENV.ASM
  425. DW TRANGROUP:SetHelpMsgs
  426. DB 6,"PROMPT",fSwitchAllowed+fLimitHelp
  427. DW OFFSET TRANGROUP:ADD_PROMPT ; In TENV.ASM
  428. DW TRANGROUP:PromptHelpMsgs
  429. DB 4,"PATH",fSwitchAllowed
  430. DW OFFSET TRANGROUP:PATH ; In TCMD2.ASM
  431. DW TRANGROUP:PathHelpMsgs
  432. DB 4,"EXIT",0
  433. DW OFFSET TRANGROUP:$EXIT ; In TCMD2.ASM
  434. DW TRANGROUP:ExitHelpMsgs
  435. DB 4,"CTTY",fCheckDrive+fSwitchAllowed
  436. DW OFFSET TRANGROUP:CTTY ; In TCMD2.ASM
  437. DW TRANGROUP:CttyHelpMsgs
  438. DB 4,"ECHO",fSwitchAllowed+fLimitHelp
  439. DW OFFSET TRANGROUP:ECHO ; In TUCODE.ASM
  440. DW TRANGROUP:EchoHelpMsgs
  441. DB 4,"GOTO",fSwitchAllowed+fLimitHelp
  442. DW OFFSET TRANGROUP:GOTO ; In TBATCH.ASM
  443. DW TRANGROUP:GotoHelpMsgs
  444. DB 5,"SHIFT",fSwitchAllowed
  445. DW OFFSET TRANGROUP:SHIFT ; In TBATCH.ASM
  446. DW TRANGROUP:ShiftHelpMsgs
  447. DB 2,"IF",fSwitchAllowed+fLimitHelp
  448. DW OFFSET TRANGROUP:$IF ; In TBATCH.ASM
  449. DW TRANGROUP:IfHelpMsgs
  450. DB 3,"FOR",fSwitchAllowed+fLimitHelp
  451. DW OFFSET TRANGROUP:$FOR ; In TBATCH.ASM
  452. DW TRANGROUP:ForHelpMsgs
  453. DB 3,"CLS",0
  454. DW OFFSET TRANGROUP:CLS ; In TCMD2.ASM
  455. DW TRANGROUP:ClsHelpMsgs
  456. DB 8,"TRUENAME",fSwitchAllowed+fCheckDrive ;AN000; P3903 changed
  457. DW OFFSET TRANGROUP:TRUENAME ;AN000;
  458. DW TRANGROUP:TruenameHelpMsgs
  459. DB 8,"LOADHIGH",fSwitchAllowed ; M003
  460. DW OFFSET TRANGROUP:LoadHigh ; In loadhi.asm ; M003
  461. DW TRANGROUP:LoadhighHelpMsgs ; M003
  462. DB 2,"LH",fSwitchAllowed ; Short form; M003
  463. DW OFFSET TRANGROUP:LoadHigh ; In loadhi.asm ; M003
  464. DW TRANGROUP:LoadhighHelpMsgs ; M003
  465. DB 0 ; Terminate command table
  466. comext dB ".COM"
  467. exeext dB ".EXE"
  468. batext dB ".BAT"
  469. switch_list DB "?VBAPW" ; flags we can recognize
  470. AttrLtrs DB "RHSvDA" ; attribute letters for DIR
  471. ; Attribute letters in AttrLtrs must appear in the order that
  472. ; attribute bits occur in the attribute byte returned by
  473. ; directory searches, starting with bit 0.
  474. ; The volume label attribute is lowercased to keep it from
  475. ; being matched (by an uppercase comparison).
  476. OrderLtrs DB "NEDSG" ; sort order letters for DIR
  477. ; Sort order letters stand for file name, extension,
  478. ; date/time, size, and grouped (directory files before others).
  479. ; DIR routines rely on the specific order of the
  480. ; letters in this list.
  481. comspec_flag db 0 ;AN071;
  482. PUBLIC BatBufLen
  483. BatBufLen DW BatLen
  484. ; *****************************************************
  485. ; EMG 4.00
  486. ; DATA STARTING HERE WAS ADDED BY EMG FOR 4.00
  487. ; FOR IMPLEMENTATION OF COMMON PARSE ROUTINE
  488. ; *****************************************************
  489. ;
  490. ; COMMON PARSE BLOCKS
  491. ;
  492. ;
  493. ; Indicates no value list for PARSE.
  494. ;
  495. NO_VALUES DW 0 ;AN000; no values
  496. NULL_VALUE_LIST LABEL BYTE ; for unvalidated value
  497. DB 0 ; no value lists
  498. ;
  499. ; PARSE control block for a required file specification (upper cased)
  500. ;
  501. FILE_REQUIRED LABEL BYTE ;AN000;
  502. DW 0200H ;AN000; filespec - required
  503. DW 1 ;AN000; capitalize - file table
  504. DW TRANGROUP:PARSE1_OUTPUT ;AN000; result buffer
  505. DW TRANGROUP:NO_VALUES ;AN000;
  506. DB 0 ;AN000; no keywords
  507. ;
  508. ; PARSE control block for an optional file specification (upper cased)
  509. ; or drive number
  510. ;
  511. FILE_OPTIONAL LABEL BYTE ;AN000;
  512. DW 0301H ;AN000; filespec or drive number
  513. ; optional
  514. DW 1 ;AN000; capitalize - file table
  515. DW TRANGROUP:PARSE1_OUTPUT ;AN000; result buffer
  516. DW TRANGROUP:NO_VALUES ;AN000;
  517. DB 0 ;AN000; no keywords
  518. ;
  519. ; PARSE control block for an optional file specification (upper cased)
  520. ;
  521. FILE_OPTIONAL2 LABEL BYTE ;AN000;
  522. DW 0201H ;AN000; filespec optional
  523. DW 1 ;AN000; capitalize - file table
  524. DW TRANGROUP:PARSE1_OUTPUT ;AN000; result buffer
  525. DW TRANGROUP:NO_VALUES ;AN000;
  526. DB 0 ;AN000; no keywords
  527. ;
  528. ; PARSE control block for an optional /P switch
  529. ;
  530. SLASH_P_SWITCH LABEL BYTE ;AN000;
  531. DW 0 ;AN000; no match flags
  532. DW 2 ;AN000; capitalize - char table
  533. DW TRANGROUP:PARSE1_OUTPUT ;AN000; result buffer
  534. DW TRANGROUP:NO_VALUES ;AN000;
  535. DB 1 ;AN000; 1 keyword
  536. SLASH_P_SYN DB "/P",0 ;AN000; /P switch
  537. ; PARSE BLOCK FOR BREAK, VERIFY, ECHO
  538. ;
  539. ; The following parse control block can be used for any command which
  540. ; needs only the optional "ON" and "OFF" keywords as operands. Allows
  541. ; the equal sign as an additional delimiter. Returns verified result
  542. ; in PARSE1_OUTPUT. Currently used for the BREAK, VERIFY, and ECHO
  543. ; internal commands.
  544. ;
  545. PARSE_BREAK LABEL BYTE ;AN000;
  546. DW TRANGROUP:BREAK_PARMS ;AN000;
  547. DB 0 ;AN032; no extra delimiter
  548. BREAK_PARMS LABEL BYTE ;AN000;
  549. DB 0,1 ;AN000; 1 positional parm
  550. DW TRANGROUP:BREAK_CONTROL1;AN000;
  551. DB 0 ;AN000; no switches
  552. DB 0 ;AN000; no keywords
  553. BREAK_CONTROL1 LABEL BYTE ;AN000;
  554. DW 2001H ;AN000; string value - optional
  555. DW 2 ;AN000; capitalize - char table
  556. DW TRANGROUP:PARSE1_OUTPUT ;AN000; result buffer
  557. DW TRANGROUP:BREAK_VALUES ;AN000;
  558. DB 0 ;AN000; no keywords
  559. BREAK_VALUES LABEL BYTE ;AN000;
  560. DB 3 ;AN000;
  561. DB 0 ;AN000; no ranges
  562. DB 0 ;AN000; no numeric values
  563. DB 2 ;AN000; 2 string values
  564. DB 0 ;AN000; returned if ON
  565. DW TRANGROUP:BREAK_ON ;AN000; point to ON string
  566. DB 'f' ;AN000; returned if OFF
  567. DW TRANGROUP:BREAK_OFF ;AN000; point to OFF string
  568. BREAK_ON DB "ON",0 ;AN000;
  569. BREAK_OFF DB "OFF",0 ;AN000;
  570. ;
  571. ; PARSE BLOCK FOR CHCP
  572. ;
  573. ;
  574. ; The following parse control block can be used for any command which
  575. ; needs only one optional three digit decimal parameter for operands.
  576. ; Returns verified result in PARSE1_OUTPUT. Currently used for the
  577. ; CHCP internal command.
  578. ;
  579. CHCP_MINVAL EQU 100 ;AN000;
  580. CHCP_MAXVAL EQU 999 ;AN000;
  581. PARSE_CHCP LABEL BYTE ;AN000;
  582. DW TRANGROUP:CHCP_PARMS ;AN000;
  583. DB 0 ;AN000; no extra delimiter
  584. CHCP_PARMS LABEL BYTE ;AN000;
  585. DB 0,1 ;AN000; 1 positional parm
  586. DW TRANGROUP:CHCP_CONTROL1 ;AN000;
  587. DB 0 ;AN000; no switches
  588. DB 0 ;AN000; no keywords
  589. CHCP_CONTROL1 LABEL BYTE ;AN000;
  590. DW 8001H ;AN000; numeric value - optional
  591. DW 0 ;AN000; no function flags
  592. DW TRANGROUP:PARSE1_OUTPUT ;AN000; result buffer
  593. DW TRANGROUP:CHCP_VALUES ;AN000;
  594. DB 0 ;AN000; no keywords
  595. CHCP_VALUES LABEL BYTE ;AN000;
  596. DB 1 ;AN000;
  597. DB 1 ;AN000; 1 range
  598. DB 1 ;AN000; returned if result
  599. DD CHCP_MINVAL,CHCP_MAXVAL ;AN000; minimum & maximum value
  600. DB 0 ;AN000; no numeric values
  601. DB 0 ;AN000; no string values
  602. ;
  603. ; PARSE BLOCK FOR DATE
  604. ;
  605. ;
  606. ; The following parse control block can be used for any command which
  607. ; needs only an optional date string as an operand. Returns unverified
  608. ; result in DATE_OUTPUT. Currently used for the DATE internal command.
  609. ;
  610. PARSE_DATE LABEL BYTE ;AN000;
  611. DW TRANGROUP:DATE_PARMS ;AN000;
  612. DB 0 ;AN000; no extra delimiter
  613. DATE_PARMS LABEL BYTE ;AN000;
  614. DB 0,1 ;AN000; 1 positional parm
  615. DW TRANGROUP:DATE_CONTROL1 ;AN000;
  616. DB 0 ;AN000; no switches
  617. DB 0 ;AN000; no keywords
  618. DATE_CONTROL1 LABEL BYTE ;AN000;
  619. DW 1001H ;AN000; date - optional
  620. DW 0 ;AN000; no function flags
  621. DW TRANGROUP:DATE_OUTPUT ;AN000; result buffer
  622. DW TRANGROUP:NO_VALUES ;AN000;
  623. DB 0 ;AN000; no keywords
  624. ;
  625. ; PARSE BLOCK FOR TIME
  626. ;
  627. ;
  628. ; The following parse control block can be used for any command which
  629. ; needs only an optional time string as an operand. Returns unverified
  630. ; result in TIME_OUTPUT. Currently used for the TIME internal command.
  631. ;
  632. PARSE_TIME LABEL BYTE ;AN000;
  633. DW TRANGROUP:TIME_PARMS ;AN000;
  634. DB 0 ;AN000; no extra delimiter
  635. TIME_PARMS LABEL BYTE ;AN000;
  636. DB 0,1 ;AN000; 1 positional parm
  637. DW TRANGROUP:TIME_CONTROL1 ;AN000;
  638. DB 0 ;AN000; no switches
  639. DB 0 ;AN000; no keywords
  640. TIME_CONTROL1 LABEL BYTE ;AN000;
  641. DW 0801H ;AN000; TIME - optional
  642. DW 0 ;AN000; no function flags
  643. DW TRANGROUP:TIME_OUTPUT ;AN000; result buffer
  644. DW TRANGROUP:NO_VALUES ;AN000;
  645. DB 0 ;AN000; no keywords
  646. ;
  647. ; PARSE BLOCK FOR VOL
  648. ;
  649. ;
  650. ; The following parse control block can be used for any command which
  651. ; needs only an optional drive letter as an operand. Returns unverified
  652. ; drive number (one based) in DRIVE_OUTPUT. Currently used for the VOL
  653. ; internal command.
  654. ;
  655. PARSE_VOL LABEL BYTE ;AN000;
  656. DW TRANGROUP:VOL_PARMS ;AN000;
  657. DB 0 ;AN000; no extra delimiter
  658. VOL_PARMS LABEL BYTE ;AN000;
  659. DB 0,1 ;AN000; 1 positional parm
  660. DW TRANGROUP:DRIVE_CONTROL1;AN000;
  661. DB 0 ;AN000; no switches
  662. DB 0 ;AN000; no keywords
  663. DRIVE_CONTROL1 LABEL BYTE ;AN000;
  664. DW 0101H ;AN000; DRIVE - optional
  665. DW 1 ;AN000; capitalize - file table
  666. DW TRANGROUP:DRIVE_OUTPUT ;AN000; result buffer
  667. DW TRANGROUP:NO_VALUES ;AN000;
  668. DB 0 ;AN000; no keywords
  669. ;
  670. ; PARSE BLOCK FOR MKDIR, RMDIR, TYPE
  671. ;
  672. ;
  673. ; The following parse control block can be used for any command which
  674. ; needs only one required file specification as an operand. Returns a
  675. ; pointer to the unverified string in PARSE1_OUTPUT. Currently used
  676. ; for the MKDIR, RMDIR, and TYPE internal commands.
  677. ;
  678. PARSE_MRDIR LABEL BYTE ;AN000;
  679. DW TRANGROUP:MRDIR_PARMS ;AN000;
  680. DB 0 ;AN000; no extra delimiter
  681. MRDIR_PARMS LABEL BYTE ;AN000;
  682. DB 1,1 ;AN000; 1 positional parm
  683. DW TRANGROUP:FILE_REQUIRED ;AN000;
  684. DB 0 ;AN000; no switches
  685. DB 0 ;AN000; no keywords
  686. ;
  687. ; PARSE BLOCK FOR CHDIR, TRUENAME
  688. ;
  689. ;
  690. ; The following parse control block can be used for any command which
  691. ; needs only one optional file specification an operand. Returns a
  692. ; pointer to the unverified string in PARSE1_OUTPUT. Currently used
  693. ; for the CHDIR and TRUENAME internal commands.
  694. ;
  695. PARSE_CHDIR LABEL BYTE ;AN000;
  696. DW TRANGROUP:CHDIR_PARMS ;AN000;
  697. DB 0 ;AN000; no extra delimiter
  698. CHDIR_PARMS LABEL BYTE ;AN000;
  699. DB 0,1 ;AN000; 1 positional parm
  700. DW TRANGROUP:FILE_OPTIONAL ;AN000;
  701. DB 0 ;AN000; no switches
  702. DB 0 ;AN000; no keywords
  703. ;
  704. ; PARSE BLOCK FOR ERASE
  705. ;
  706. ;
  707. ; The following parse control block is used for the DEL/ERASE internal
  708. ; commands. This command has one required file specification and an
  709. ; optional switch (/p) as operands. The verified switch or unverified
  710. ; file specification is returned in PARSE1_OUTPUT.
  711. ;
  712. PARSE_ERASE LABEL BYTE ;AN000;
  713. DW TRANGROUP:ERASE_PARMS ;AN000;
  714. DB 0 ;AN000; no extra delimiter
  715. ERASE_PARMS LABEL BYTE ;AN000;
  716. DB 1,1 ;AN000; 1 positional parm
  717. DW TRANGROUP:FILE_REQUIRED ;AN000;
  718. DB 1 ;AN000; 1 switch
  719. DW TRANGROUP:SLASH_P_SWITCH;AN000;
  720. DB 0 ;AN000; no keywords
  721. ;
  722. ; PARSE BLOCK FOR DIR
  723. ;
  724. ;
  725. ; The following parse control block is used for the DIR internal command.
  726. ; This command has one optional file specification and several optional
  727. ; switches. Switches, switch values, and the filespec are returned in
  728. ; PARSE1_OUTPUT.
  729. ;
  730. ; Switches are /a[value], /-a, /o[value], /-o, /s, /-s, /?, /b, /-b,
  731. ; /w, /-w, /p, and /-p. The string values for /a and /o are optional,
  732. ; do not require colons, and are not checked against a value list.
  733. ;
  734. ; Switch /h has been removed from the DIR command ;M008
  735. ; Switch /? is no longer handled internally ;M008
  736. ;
  737. ; A list of pointers to all the switch synonyms is provided here to
  738. ; help identify which switch has been matched.
  739. ;
  740. PARSE_DIR LABEL BYTE
  741. DW TRANGROUP:DIR_PARMS
  742. DB 0 ; no extra delimiters
  743. DIR_PARMS LABEL BYTE
  744. DB 0,1 ; 1 optional positional param
  745. DW TRANGROUP:FILE_OPTIONAL2
  746. DB 2 ; 2 kinds of switches
  747. DW TRANGROUP:DIR_SW_VALUED
  748. DW TRANGROUP:DIR_SW_UNVALUED
  749. DB 0 ; no keywords
  750. DIR_SW_VALUED LABEL BYTE
  751. DW 2001H ; optional string value
  752. DW 21H ; optional colon; capitalize
  753. DW TRANGROUP:PARSE1_OUTPUT ; result buffer
  754. DW TRANGROUP:NULL_VALUE_LIST ; don't validate value
  755. DB 2 ; 2 'synonyms'
  756. DIR_SW_A DB "/A",0
  757. DIR_SW_O DB "/O",0
  758. DIR_SW_UNVALUED LABEL BYTE
  759. DW 0 ; no value
  760. DW 0 ; no format functions
  761. DW TRANGROUP:PARSE1_OUTPUT ; result buffer
  762. DW TRANGROUP:NO_VALUES
  763. DB 14 ; 14 'synonyms'
  764. DIR_SW_NEG_A DB "/-A",0
  765. DIR_SW_NEG_O DB "/-O",0
  766. DIR_SW_S DB "/S",0
  767. DIR_SW_NEG_S DB "/-S",0
  768. DIR_SW_B DB "/B",0
  769. DIR_SW_NEG_B DB "/-B",0
  770. DIR_SW_W DB "/W",0
  771. DIR_SW_NEG_W DB "/-W",0
  772. DIR_SW_P DB "/P",0
  773. DIR_SW_NEG_P DB "/-P",0
  774. DIR_SW_L DB "/L",0 ;M010
  775. DIR_SW_NEG_L DB "/-L",0 ;M010
  776. ;
  777. ; Here's a list of pointers to DIR's switch synonyms, for easier
  778. ; identification. Order is critical - DIR routines rely on the
  779. ; specific order in this list. Negated options appear at odd
  780. ; positions in the list, and simple on/off options appear first.
  781. ;
  782. DIR_SW_PTRS LABEL WORD ; list of ptrs to switch synonyms
  783. DW TRANGROUP:DIR_SW_NEG_W
  784. DW TRANGROUP:DIR_SW_W
  785. DW TRANGROUP:DIR_SW_NEG_P
  786. DW TRANGROUP:DIR_SW_P
  787. DW TRANGROUP:DIR_SW_NEG_S
  788. DW TRANGROUP:DIR_SW_S
  789. DW TRANGROUP:DIR_SW_NEG_B
  790. DW TRANGROUP:DIR_SW_B
  791. DW TRANGROUP:DIR_SW_NEG_L ;M010
  792. DW TRANGROUP:DIR_SW_L ;M010
  793. DW TRANGROUP:DIR_SW_NEG_O
  794. DW TRANGROUP:DIR_SW_O
  795. DW TRANGROUP:DIR_SW_NEG_A
  796. DW TRANGROUP:DIR_SW_A
  797. ;
  798. ; PARSE BLOCK FOR RENAME
  799. ;
  800. ;
  801. ; The following parse control block can be used for any command which
  802. ; needs only two required file specifications as operands. Returns
  803. ; pointers to the unverified string in PARSE1_OUTPUT.
  804. ; Currently used for the RENAME internal command.
  805. ;
  806. PARSE_RENAME LABEL BYTE ;AN000;
  807. DW TRANGROUP:RENAME_PARMS ;AN000;
  808. DB 0 ;AN000; no extra delimiter
  809. RENAME_PARMS LABEL BYTE ;AN000;
  810. DB 2,2 ;AN000; 2 positional parms
  811. DW TRANGROUP:FILE_REQUIRED ;AN000;
  812. DW TRANGROUP:FILE_REQUIRED ;AN000;
  813. DB 0 ;AN000; no switches
  814. DB 0 ;AN000; no keywords
  815. ;
  816. ; PARSE BLOCK FOR CTTY
  817. ;
  818. ;
  819. ; The following parse control block can be used for any command which
  820. ; needs one required device name as an operand. Returns a pointer to
  821. ; unverified string in PARSE1_OUTPUT. Currently used for the CTTY
  822. ; internal command.
  823. ;
  824. PARSE_CTTY LABEL BYTE ;AN000;
  825. DW TRANGROUP:CTTY_PARMS ;AN000;
  826. DB 0 ;AN000; no extra delimiter
  827. CTTY_PARMS LABEL BYTE ;AN000;
  828. DB 1,1 ;AN000; 1 positional parm
  829. DW TRANGROUP:CTTY_CONTROL1 ;AN000;
  830. DB 0 ;AN000; no switches
  831. DB 0 ;AN000; no keywords
  832. CTTY_CONTROL1 LABEL BYTE ;AN000;
  833. DW 2000H ;AN000; string value - required
  834. DW 11H ;AN000; capitalize - file table
  835. ;AN000; remove colon at end
  836. DW TRANGROUP:PARSE1_OUTPUT ;AN000; result buffer
  837. DW TRANGROUP:NO_VALUES ;AN000;
  838. DB 0 ;AN000; no keywords
  839. ;
  840. ; PARSE BLOCK FOR VER
  841. ;
  842. ;
  843. ; The following parse control block can be used for any command which
  844. ; needs an optional switch "/debug". Currently used for the VER command.
  845. ;
  846. PARSE_VER LABEL BYTE
  847. DW TRANGROUP:VER_PARMS
  848. DB 0 ; no extra delimiters
  849. VER_PARMS LABEL BYTE
  850. DB 0,0 ; no positional parameters
  851. DB 1 ; one switch
  852. DW TRANGROUP:SLASH_R
  853. DB 0 ; no keywords
  854. SLASH_R LABEL BYTE
  855. DW 0 ; no values
  856. DW 2 ; capitalize by filename table
  857. DW TRANGROUP:PARSE1_OUTPUT ; result buffer
  858. DW TRANGROUP:NO_VALUES ; no values
  859. DB 1 ; one synonym
  860. SLASH_R_SYN DB "/R",0
  861. ;
  862. ; M003 ; Start of changes for LoadHigh support
  863. ;
  864. ;
  865. ;Parse Control Block for LOADHIGH command
  866. ;
  867. Parse_LoadHi label byte
  868. dw TRANGROUP:LoadHi_Parms ;extended parm table
  869. db 0 ;no extra delimiters
  870. LoadHi_Parms label byte
  871. db 1,1 ;min. 1 parm, max. 1 parm
  872. dw TRANGROUP:File_Required ;control struc for filename
  873. db 0 ;no switches
  874. db 0 ;no keywords
  875. ;
  876. ; M003 ; End of changes for LoadHigh support
  877. ;
  878. ; Table of internal command which have special meaning under NT while at
  879. ; command.com prompt. First field is the command name length. Second is the
  880. ; command name. Third is only 1 for exit command, rest are all 0. This field
  881. ; is returned in al.
  882. public NT_INTRNL_CMND
  883. NT_INTRNL_CMND label byte
  884. db 4,"EXIT",0
  885. db 6,"PROMPT",1
  886. db 3,"SET",1
  887. db 4,"PATH",1
  888. db 2,"CD",1
  889. db 5,"CHDIR",1
  890. db 0
  891. public TempVarName
  892. TempVarName db "TEMP=",0
  893. ifdef BETA3WARN
  894. %out Take this out before we ship
  895. public Beta3WarnMsg
  896. Beta3WarnMsg label byte
  897. db '+--------------------- WARNING! ------------------------+', 0dh, 0ah
  898. db '| |', 0dh, 0ah
  899. db '| |', 0dh, 0ah
  900. db '| The license for this pre-release version of MS-DOS |', 0dh, 0ah
  901. db '| 5.0 has expired. Please replace it with an updated |', 0dh, 0ah
  902. db '| version of MS-DOS 5.0 immediately. |', 0dh, 0ah
  903. db '| |', 0dh, 0ah
  904. db '| |', 0dh, 0ah
  905. db '| <Press any key to continue> |', 0dh, 0ah
  906. db '| |', 0dh, 0ah
  907. db '+-------------------------------------------------------+', 0dh, 0ah
  908. db '$'
  909. endif
  910. TRANDATA ENDS
  911. TRANCODE SEGMENT PUBLIC BYTE ;AN000;
  912. .xlist
  913. .xcref
  914. INCLUDE SYSMSG.INC ;AN000;
  915. .list
  916. .cref
  917. ASSUME DS:TRANGROUP,ES:TRANGROUP,CS:TRANGROUP
  918. MSG_UTILNAME <COMMAND> ;AN000; define utility name
  919. MSG_SERVICES <COMT,COMMAND.CLF,COMMAND.CL1,COMMAND.CL2> ;AN000; The transient messages
  920. include msgdcl.inc
  921. TRANCODE ENDS ;AN000;
  922. TRANDATA SEGMENT PUBLIC BYTE
  923. TRANDATAEND LABEL BYTE
  924. TRANDATA ENDS ;AN000;
  925. END
  926.