Source code of Windows XP (NT5)
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.

559 lines
20 KiB

  1. ; PAGE ,132
  2. SUBTTL DOS - Message Retriever - SYSTEM CONTROL file
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;; DOS -- Message Retriever
  5. ;; (c) Copyright 1988 Microsoft
  6. ;;
  7. ;; File Name: SYSMSG.INC
  8. ;; ----------
  9. ;;
  10. ;; Description: Message retriever functions are included into source code
  11. ;; ------------ by referencing a MSG_SERVICES macro. That macro is defined
  12. ;; here as well as the logic to include necessary .ASM and .INC
  13. ;; files.
  14. ;;
  15. ;;
  16. ;; Documentation Reference:
  17. ;; ------------------------
  18. ;; DOS -Message Retriever I0 Document - Feb. ?? 1987
  19. ;; DOS -Message Retriever I1 Document - Mar. ?? 1987
  20. ;; DOS -Message Retriever I2 Document - Mar. ?? 1987
  21. ;; DOS -Final Functional Specification Document - Mar ?? 1987
  22. ;;
  23. ;; Procedures Contained in This File:
  24. ;; ---------------------------------
  25. ;; None
  26. ;;
  27. ;; Include Files Required:
  28. ;; -----------------------
  29. ;; MSGSERV.INC := All message services
  30. ;; ???? := ????
  31. ;;
  32. ;; External Procedure References:
  33. ;; ------------------------------
  34. ;; None
  35. ;;
  36. ;; Linkage Instructions:
  37. ;; --------------------
  38. ;; None
  39. ;;
  40. ;; Change History:
  41. ;; ---------------
  42. ;; CREATED March, 1987 RPS
  43. ;;
  44. ;; Psuedocode:
  45. ;; -----------
  46. ;; None
  47. ;;
  48. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  49. ;;
  50. INCLUDE VERSIONA.INC ;;AN003;;
  51. FALSE = 0 ;;
  52. TRUE = NOT FALSE ;; List message services and flags
  53. ;;
  54. ; Control Characters For Message Skeleton file
  55. NULL EQU 00H ;; Null
  56. BELL EQU 07H ;; Bell
  57. TAB EQU 09H ;; Tab
  58. LF EQU 0AH ;; Line Feed
  59. HOME EQU 0BH ;; Home
  60. FORMFD EQU 0CH ;; Form Feed
  61. CR EQU 0DH ;; Carriage Return
  62. COLON EQU 3AH ;; Colon
  63. ; SYSDISPMSG and SYSGETMSG Equates
  64. MSG_SER_CLASS EQU 00H ;; Message Service Class (reserved)
  65. EXT_ERR_CLASS EQU 01H ;; DOS Extended error class
  66. PARSE_ERR_CLASS EQU 02H ;; Parse error class
  67. UTILITY_MSG_CLASS EQU 0FFH ;; Utility message class
  68. NO_HANDLE EQU 0FFFFH ;; No handle specified (Use DOS functions 01H-09H only)
  69. NO_REPLACE EQU 0000H ;; No replacable parameters
  70. ; SUBLIST Equates
  71. Sublist_Length EQU 11 ;; Length of sublist structure
  72. Reserved EQU 0 ;; Reserved byte field
  73. Left_Align EQU 0 ;;00xxxxxx
  74. Right_Align EQU 80h ;;10xxxxxx
  75. Char_type EQU 0 ;;axxx0000 - Character type
  76. Char_Field_Char EQU 0 ;;a0000000
  77. Char_Field_ASCIIZ EQU 10h ;;a0010000
  78. Unsgn_Bin_Type EQU 01h ;;axxx0001 - Unsigned Binary to Decimal character
  79. Unsgn_Bin_Byte EQU 11h ;;a0010001
  80. Unsgn_Bin_Word EQU 21h ;;a0100001
  81. Unsgn_Bin_DWord EQU 31h ;;a0110001
  82. Sgn_Bin_Type EQU 02h ;;axxx0010 - Signed Binary to Decimal character
  83. Sgn_Bin_Byte EQU 12h ;;a0010010
  84. Sgn_Bin_Word EQU 22h ;;a0100010
  85. Sgn_Bin_DWord EQU 32h ;;a0110010
  86. Bin_Hex_Type EQU 03h ;;axxx0011 - Unsigned Binary to Hexidecimal character
  87. Bin_Hex_Byte EQU 13h ;;a0010011
  88. Bin_Hex_Word EQU 23h ;;a0100011
  89. Bin_Hex_DWord EQU 33h ;;a0110011
  90. Date_Type EQU 04h ;;axxx0100 - Date to character using current country format
  91. Date_MD EQU 14h ;;a0010100
  92. Date_MDY_2 EQU 24h ;;a0100100
  93. Date_MDY_4 EQU 34h ;;a0110100
  94. Time_Cty_Type EQU 05h ;;axxx0101 - Time to character using current country format
  95. Time_HHMM_Cty EQU 05h ;;a0000101
  96. Time_HHMMSS_Cty EQU 15h ;;a0010101
  97. Time_HHMMSSHH_Cty EQU 25h ;;a0100101
  98. Time_24_Type EQU 06h ;;axxx0110 - Time to character using 24 hour format
  99. Time_HHMM_24 EQU 06h ;;a0000110
  100. Time_HHMMSS_24 EQU 16h ;;a0010110
  101. Time_HHMMSSHH_24 EQU 26h ;;a0100110
  102. $M_EXTPAR_Type EQU 08h ;;axxx1000 - Special case for extended parse replace format
  103. NO_INPUT EQU 00H ;; No input characters
  104. DOS_KEYB_INP EQU 01H ;; DOS INT 21H - AH=01H := Keyboard Input
  105. DOS_DIR_CON_INP EQU 07H ;; DOS INT 21H - AH=07H := Direct Console Input Without Echo
  106. DOS_CON_INP EQU 08H ;; DOS INT 21H - AH=08H := Console Input Without Echo (Check CTL-BK)
  107. DOS_BUF_KEYB_INP EQU 0AH ;; DOS INT 21H - AH=0AH := Buffered Keyboard Input
  108. DOS_CLR_KEYB_BUF EQU 0CH ;; DOS INT 21H - AH=0CH := Clear keyboard buffer
  109. DOS_WRITE_HANDLE EQU 40H ;; DOS INT 21H - AH=40H := Write to a DOS handle
  110. DOS_DISP_STRING EQU 09H ;; DOS INT 21H - AH=09H := Display $ terminated string
  111. DOS_DISP_CHAR EQU 02H ;; DOS INT 21H - AH=02H := Display Character
  112. LOWEST_4CH_VERSION EQU 0002H ;; First DOS version to allow AH = 4CH Exit (VERSION 2.00)
  113. DOS_GET_DBCS_INFO EQU 6300H ;; DOS INT 21H - AX=6507H := Get DBCS Vector Table
  114. DOS_GET_EXT_ERROR EQU 59H ;; DOS INT 21H - AH=59H := Get Extended Error
  115. DOS_GET_EXT_ERROR_BX EQU 00H ;; DOS INT 21H - BX=0000H := Version 0
  116. DOS_EXTENDED_OPEN EQU 6C00H ;AN003; DOS INT 21H - AX=6C00H := Extended Open
  117. NO_CRIT_OPEN EQU 2000H ;AN003; Extended Open Mode bit
  118. NOT_EX_FAIL_EX_OPEN EQU 0101H ;AN003; Extended Open Flag
  119. DOS_LSEEK_FILE EQU 4200H ;AN003; DOS INT 21H - AX=4200H := LSEEK file
  120. DOS_READ_BYTE EQU 3FH ;AN003; DOS INT 21H - AH=3FH := Read byte block
  121. DOS_CLOSE_FILE EQU 3EH ;AN003; DOS INT 21H - AH=3EH := Close file handle
  122. IFSFUNC_INSTALL_CHECK EQU 0500H ;AN006; IFSFUNC Installation Check
  123. IFS_GET_ERR_TEXT EQU 0502H ;AN006; IFSFUNC Get Extended Error Text
  124. IFSFUNC_INSTALLED EQU 0FFH ;AN006; Return code if IFSFUNC is installed
  125. EXT_ERR_39 EQU 39 ;; Insufficent Disk Space EXTENDED ERROR (changed from hex to decimal - eg d201)
  126. ERROR_CLASS_39 EQU 01H ;; Error Class = 1
  127. ACTION_39 EQU 04H ;; Suggested Action = 4
  128. LOCUS_39 EQU 01H ;; Locus = 1
  129. DOS_GET_COUNTRY EQU 38H ;; DOS INT 21H - AH=38H := Get Country Dependant Information
  130. DOS_GET_VERSION EQU 30H ;; DOS INT 21H - AH=30H := Get DOS Version number
  131. DOS_IOCTL_GET_INFO EQU 4400H ;; DOS INT 21H - AH=4400H := I/O control for devices
  132. DOS_IOCTL_SET_INFO EQU 4401H ;; DOS INT 21H - AH=4401H := I/O control for devices
  133. DOS_GET_EXT_PARSE_ADD EQU 122EH ;; DOS INT 2FH - AX=122EH := Get Extended/Parse error address
  134. DOS_GET_EXTENDED EQU 00 ;; DOS INT 2FH - AX=122EH - DL=00 := Get Extended address
  135. DOS_GET_PARSE EQU 02 ;; DOS INT 2FH - AX=122EH - DL=02 := Get Parse address
  136. DOS_GET_CRITICAL EQU 04 ;; DOS INT 2FH - AX=122EH - DL=04 := Get Critical address
  137. DOS_GET_FILE EQU 06 ;; DOS INT 2FH - AX=122EH - DL=06 := Get File system dependant
  138. DOS_GET_ADDR EQU 08 ;; DOS INT 2FH - AX=122EH - DL=08 := Get Address of READ_DISK_PROC
  139. DOS_SET_ADDR EQU 09 ;; DOS INT 2FH - AX=122EH - DL=09 := Set Address of READ_DISK_PROC
  140. LOW_NIB_MASK EQU 0FH ;; Mask out the high byte
  141. DOS_CLR_KEYB_BUF_MASK EQU 0C0H ;; Check if high nibble is C Hex
  142. $M_CON_INP EQU -1 ;; If DOS INT 21H Function 06H - DL := 0FFH for input
  143. $M_CRIT_LO EQU 19 ;; First Extended Error considered CRITICAL
  144. $M_CRIT_HI EQU 39 ;; Last Extended Error considered CRITICAL (EG - D191)
  145. $M_AM EQU "a" ;; Time format AM indicator
  146. $M_PM EQU "p" ;; Time format PM indicator
  147. $M_NEG_SIGN EQU "-" ;; Signed decimal number format negative indicator
  148. $M_DEF_TIME_FORM EQU 1 ;; Default Time format - 24 hour
  149. $M_DEF_DATE_FORM EQU 0 ;; Default Time format - 0 := USA format
  150. $M_DEF_TIME_SEP EQU ":" ;; Default Time separator - ":"
  151. $M_DEF_DATE_SEP EQU "-" ;; Default Time separator - "-"
  152. $M_DEF_DECI_SEP EQU "." ;; Default Time hundreds separator - "."
  153. $M_TIMEDATE_PAD EQU "0" ;; Time/Date PAD character - "0" (ie 12:03p)
  154. $M_MAX_2_YEAR EQU 99 ;; Maximum 2 digit year
  155. $M_SINGLE_CHAR EQU 1 ;; A single character is this long ^
  156. $M_SPECIAL_CASE EQU 30H ;; Special case for replacable parameters %0
  157. $M_UNLIM_W EQU 0 ;; Unlimited width character
  158. $M_COMMA EQU "," ;; Default Thousand separate
  159. $M_CR_LF EQU 0A0DH ;; Default CR/LF
  160. $M_SPACE_HYP EQU "- " ;; Default Space/Hyphan
  161. $M_SPACE EQU " " ;; Default Space
  162. $M_NULL EQU 0 ;; Null
  163. $M_FIRST_THOU EQU 3 ;; Location of first thousand separator
  164. $M_SECOND_THOU EQU 6 ;; Location of second thousand separator
  165. $M_THIRD_THOU EQU 9 ;; Location of third thousand separator
  166. $M_BASE10 EQU 10 ;; Base 10 for arthmetic
  167. $M_BASE16 EQU 16 ;; Base 16 for arthmetic
  168. $M_CLASS_NOT_EXIST EQU 0 ;; Does class exist?
  169. $M_TERMINATING_FLAG EQU -1 ;; Is there any more classes?
  170. $M_ADDR_SZ_NEAR EQU 2 ;; Size to increment if NEAR
  171. $M_ADDR_SZ_FAR EQU 4 ;; Size to increment if FAR
  172. $M_SL EQU DS:[SI] ;; Refer to SUBLIST as $M_SL
  173. $M_NO_HANDLE EQU -1 ;; No handle flag
  174. $M_TEMP_BUF_SZ EQU 64 ;; Size of temporary buffer ;AN003;
  175. $M_NEXT_DBCS_VECTOR EQU 2 ;; Amount to increment to get next vector
  176. $M_DBCS_TERM EQU 0000 ;; DBCS vector table terminating flag
  177. $M_SPECIAL_MSG_NUM EQU 0FFFFH ;; Special generic message number
  178. $M_CRLF_SIZE EQU 2 ;; Size of the CR LF message
  179. $M_NO_CRLF_MASK EQU 10000000B ;; Mask to supress CR LF
  180. $M_ONE_REPLACE EQU 1 ;; Indicate one replacement
  181. $M_CRIT_ERR_MASK EQU 00000001B ;; Mask to allow EOF/EOI Crit error
  182. ;;
  183. $M_ALIGN_MASK EQU 10000000b ;; Mask for align
  184. $M_TYPE_MASK EQU 00001111b ;; Mask for types
  185. $M_SIZE_MASK EQU 00110000b ;; Mask for types
  186. $M_TIME_MASK EQU 00000001b ;; Mask for TIME
  187. $M_DATE_MASK EQU 00010000b ;; Mask for TIME
  188. $M_BYTE EQU 00010000b ;; BYTE indicator
  189. $M_WORD EQU 00100000b ;; WORD indicator
  190. $M_DWORD EQU 00110000b ;; DWORD indicator
  191. ; Standard reserved DOS handles
  192. STDIN EQU 0000H ;; Standard Input device handle
  193. STDOUT EQU 0001H ;; Standard Output device handle
  194. STDERR EQU 0002H ;; Standard Error Output device handle
  195. STDAUX EQU 0003H ;; Standard Auxiliary device handle
  196. STDPRN EQU 0004H ;; Standard Printer device handle
  197. ifdef BILINGUAL
  198. ; BILINGUAL equates
  199. EXT_MSG_ADJ EQU 90
  200. PARSE_MSG_ADJ EQU 11
  201. UTILITY_MSG_ADJ EQU 8000
  202. endif
  203. ; Reserved Message Service equates
  204. NEARmsg = TRUE ;; \
  205. NOVERCHECKmsg = FALSE ;; |
  206. MSGDATA = FALSE ;; |
  207. FARmsg = FALSE ;; |
  208. GETmsg = FALSE ;; |
  209. LOADmsg = FALSE ;; |
  210. DISPLAYmsg = FALSE ;; } Set default cases
  211. SETSTDIO = FALSE ;; |
  212. NOCHECKSTDIN = FALSE ;; |
  213. NOCHECKSTDOUT = FALSE ;; |
  214. DISK_PROC = FALSE ;; | ;AN003;
  215. INPUTmsg = FALSE ;; |
  216. CHARmsg = FALSE ;; |
  217. NUMmsg = FALSE ;; |
  218. TIMEmsg = FALSE ;; |
  219. DATEmsg = FALSE ;; /
  220. IF1 ;;
  221. COMR = FALSE ;; COMMAND.COM Cases (resident)
  222. COMT = FALSE ;; (transient)
  223. ENDIF ;;
  224. $M_STRUC = TRUE ;; Internal message service defaults
  225. $M_LOAD = TRUE ;;
  226. $M_SUBS = TRUE ;;
  227. $M_REPLACE = TRUE ;;
  228. $M_REPL_DONE = FALSE ;;
  229. $M_CHAR_ONLY = TRUE ;;
  230. $M_PARSE_FLAG = TRUE ;;
  231. $M_EXT_ERR_FLAG = TRUE ;;
  232. $M_MSGDATA_ONLY = TRUE ;;
  233. $M_END = FALSE ;;
  234. $M_EXT_CLS = TRUE ;;
  235. $M_PAR_CLS = TRUE ;;
  236. ;;
  237. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  238. ;; $M_POPF Macro
  239. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  240. $M_POPF MACRO
  241. LOCAL $M_MYRET
  242. JMP $+3
  243. $M_MYRET LABEL NEAR
  244. IRET
  245. PUSH CS
  246. CALL $M_MYRET
  247. ENDM
  248. ; This Macro was removed from sysmsg.inc. We had to remove this
  249. ; macro and put it into it's own include file in order to clear up
  250. ; some assembly errors. MS MASM will not allow a public declaration
  251. ; during the second pass of the assembler. IBM MASM will allow this.
  252. ;
  253. ;
  254. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  255. ;; $M_DECLARE Macro
  256. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  257. ; ;
  258. ;$M_DECLARE macro numcls ;
  259. ; $M_DCOUNT = 0 ;
  260. ; REPT numcls ;
  261. ; $M_DCOUNT = $M_DCOUNT + 1 ;
  262. ; $M_DECLARE2 %$M_DCOUNT ;
  263. ; ENDM ;
  264. ;
  265. ; IF COMR
  266. ; IFNDEF $M_RT2 ; If Resident table is not in this assembly,
  267. ; EXTRN $M_RT2:BYTE ; Must be external
  268. ; ELSE
  269. ; PUBLIC $M_RT2
  270. ; ENDIF ;
  271. ; ELSE
  272. ; IFNDEF $M_RT ; If Resident table is not in this assembly,
  273. ; EXTRN $M_RT:BYTE ; Must be external
  274. ; ELSE
  275. ; PUBLIC $M_RT
  276. ; ENDIF ;
  277. ; ENDIF
  278. ;
  279. ; $M_CHECK $M_GET_MSG_ADDRESS ; If this subroutine is not in this assembly,
  280. ; $M_CHECK $M_MSGSERV_1 ; If this subroutine is not in this assembly,
  281. ; $M_CHECK $M_MSGSERV_2 ; If this subroutine is not in this assembly,
  282. ;
  283. ;ENDM ;
  284. ; ;
  285. ;$M_DECLARE2 macro innum ;
  286. ; IF NOT COMR ; IF Not resident COMMAND.COM
  287. ; IF NOT COMT ; IF Not transient COMMAND.COM
  288. ; IFNDEF $M_CLS_&innum ; IF class is not in this assembly,
  289. ; IF FARmsg ;
  290. ; EXTRN $M_CLS_&innum:FAR ; Must be external
  291. ; ELSE ;
  292. ; EXTRN $M_CLS_&innum:NEAR ; Must be external
  293. ; ENDIF ;
  294. ; ELSE ; ELSE
  295. ; PUBLIC $M_CLS_&innum ; Label PUBLIC
  296. ; ENDIF ;
  297. ; ELSE ; ELSE
  298. ; IFDIF <$M_CLS_&innum>,<$M_CLS_1> ; IF NOT $M_CLS_1 or
  299. ; IFDIF <$M_CLS_&innum>,<$M_CLS_2> ; IF NOT $M_CLS_2 then
  300. ; IFNDEF $M_CLS_&innum ; IF class is not in this assembly,
  301. ; IF FARmsg ;
  302. ; EXTRN $M_CLS_&innum:FAR ; Must be external
  303. ; ELSE ;
  304. ; EXTRN $M_CLS_&innum:NEAR ; Must be external
  305. ; ENDIF ;
  306. ; ELSE ; ELSE
  307. ; PUBLIC $M_CLS_&innum ; Label PUBLIC
  308. ; ENDIF ;
  309. ; ENDIF ;
  310. ; ENDIF ;
  311. ; ENDIF ;
  312. ; ELSE ; ELSE
  313. ; IFDIF <$M_CLS_&innum>,<$M_CLS_1> ; IF NOT $M_CLS_1 or
  314. ; IFDIF <$M_CLS_&innum>,<$M_CLS_2> ; IF NOT $M_CLS_2 then
  315. ; IFNDEF $M_CLS_&innum ; IF class is not in this assembly,
  316. ; IF FARmsg ;
  317. ; EXTRN $M_CLS_&innum:FAR ; Must be external
  318. ; ELSE ;
  319. ; EXTRN $M_CLS_&innum:NEAR ; Must be external
  320. ; ENDIF ;
  321. ; ELSE ; ELSE
  322. ; PUBLIC $M_CLS_&innum ; Label PUBLIC
  323. ; ENDIF ;
  324. ; ENDIF ;
  325. ; ENDIF ;
  326. ; ENDIF ;
  327. ;ENDM ;
  328. ; ;
  329. ;$M_CHECK macro parm ;
  330. ; IFNDEF parm ; IF class is not in this assembly,
  331. ; IF FARmsg ;
  332. ; EXTRN parm:FAR ; Must be external
  333. ; ELSE ;
  334. ; EXTRN parm:NEAR ; Must be external
  335. ; ENDIF ;
  336. ; ELSE
  337. ; IF COMR
  338. ; ELSE
  339. ; PUBLIC parm
  340. ; ENDIF
  341. ; ENDIF ;
  342. ;ENDM ;
  343. ; ;
  344. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  345. ;;;
  346. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  347. ; ;
  348. ;IF2 ;
  349. ; $M_DECLARE %$M_NUM_CLS ; Declare any class not in this assembly
  350. ;ENDIF ;
  351. ; ;
  352. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  353. ;;
  354. ;; Message Retreiver requests
  355. ;;
  356. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  357. ;
  358. MSG_UTILNAME Macro utilname ;
  359. ;
  360. INCLUDE &utilname.CTL ; Include the control file for the utility
  361. $M_STRUC = TRUE ;
  362. INCLUDE MSGSERV.ASM ; Get structure definitions
  363. ;
  364. ENDM ;
  365. ;
  366. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  367. ;; MSG_SERVICES Macro
  368. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  369. ;
  370. MSG_SERVICES Macro varlist ; MACRO used in source routine
  371. ;
  372. $M_SERVICE = FALSE ; Reset service flag
  373. IRP var,<varlist> ; FOR each variable in the list
  374. $M_INCLUDE = TRUE ; Reset include flag
  375. ; For each service predefined
  376. IRP serv,<MSGDATA,LOADmsg,NOVERCHECKmsg,DISPLAYmsg,GETmsg,INPUTmsg,CHARmsg,NUMmsg,TIMEmsg,DATEmsg,NEARmsg,FARmsg,COMR,COMT>
  377. IFDIF <var>,<serv> ; IF it IS a service (defined above)
  378. ELSE ;
  379. IFDIF <var>,<MSGDATA> ; IF it is NOT the message data space request
  380. $M_MSGDATA_ONLY = FALSE ; Instruct the assembler to include all services
  381. ENDIF ; ENDIF
  382. IRP repl,<CHARmsg,NUMmsg,TIMEmsg,DATEmsg> ; IF it is a replace service
  383. IFIDN <var>,<repl> ;
  384. $M_REPLACE = TRUE ; Set replace flag
  385. ENDIF ;
  386. ENDM ;
  387. serv = TRUE ; Let the assembler know about the service
  388. $M_SERVICE = TRUE ; Let the macro know it was a service
  389. $M_INCLUDE = FALSE ; Let the macro know it wasn't a class
  390. ENDIF ; ENDIF
  391. ENDM ; NEXT service
  392. MSG_SERVICES2 <varlist>
  393. ; Continue further checks (If we add any more predefined
  394. ; function to the above IRP command, it generates a
  395. ; syntax error. We must continue the processing in another
  396. ; MACRO called MSG_SERVICES2)
  397. IF $M_INCLUDE ; IF message class was requested
  398. $M_INC var ; Include it as a message class
  399. ENDIF ; ENDIF
  400. ENDM ; NEXT variable
  401. ;
  402. IF $M_SERVICE ; IF it any services were requested THEN
  403. INCLUDE MSGSERV.ASM ; THEN include module to get service
  404. ENDIF ; ENDIF
  405. ENDM
  406. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  407. ;; MSG_SERVICES2 Macro
  408. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  409. ;
  410. MSG_SERVICES2 Macro varlist2 ; MACRO used in source routine
  411. ;
  412. ; FOR each variable in the list
  413. IRP var2,<varlist2>
  414. ; For each service predefined
  415. IRP serv2,<SETSTDIO,NOCHECKSTDIN,NOCHECKSTDOUT,DISK_PROC>
  416. ;AN003; IF it IS a service (defined above)
  417. IFDIF <var2>,<serv2>
  418. ELSE ;
  419. serv2 = TRUE ; Let the assembler know about the service
  420. $M_SERVICE = TRUE ; Let the macro know it was a service
  421. $M_INCLUDE = FALSE ; Let the macro know it wasn't a class
  422. ENDIF ; ENDIF
  423. ENDM ; NEXT service
  424. ENDM ; NEXT variable
  425. ENDM ;
  426. ;
  427. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  428. ;; $M_INC Macro
  429. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  430. ;
  431. $M_INC Macro ext ;
  432. ;
  433. INCLUDE &ext ;
  434. ;
  435. ENDM ;
  436. ;
  437. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  438. ;; $M_BUILD_PTRS Macro
  439. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  440. ;
  441. $M_BUILD_PTRS Macro nummsg ;
  442. ;
  443. $M_INDEX = 0 ;
  444. IF COMR ; IF this is resident COMMAND.COM
  445. $M_MAKE_COMR ;
  446. ELSE ; ELSE
  447. IF COMT ; IF this is transient COMMAND.COM
  448. $M_MAKE_COMT ;
  449. ELSE ; ELSE
  450. ;
  451. $M_INDEX = 0 ;
  452. $M_COUNT = 0 ; Build normal utilities
  453. ;
  454. REPT nummsg ;
  455. $M_COUNT = $M_COUNT + 1 ;
  456. $M_MAKE %$M_COUNT ;
  457. ENDM ;
  458. ENDIF ;
  459. ENDIF ;
  460. ENDM ;
  461. ;
  462. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  463. ;; $M_MAKE Macro
  464. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  465. ;
  466. $M_MAKE Macro $m_append ;
  467. IF FARmsg ;
  468. CALL FAR PTR $M_CLS_&$m_append ; Get addressibilty to class &$M_APPEND (ES:DI)
  469. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX+2,ES ; Move into first avaliable table location
  470. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX,DI ;
  471. ELSE ;
  472. CALL $M_CLS_&$m_append ; Get addressibilty to class &$M_APPEND (ES:DI)
  473. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX,DI ;
  474. ENDIF ;
  475. $M_INDEX = $M_INDEX + 4 ; Set next available table location
  476. ;
  477. ENDM ;
  478. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  479. ;; $M_MAKE_COMR Macro
  480. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  481. ;
  482. $M_MAKE_COMR macro ;
  483. ;
  484. CALL $M_CLS_3 ; Get addressibilty to class A
  485. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX,DI ;
  486. $M_INDEX = $M_INDEX + 4 ; Set next available table location
  487. ;
  488. CALL $M_CLS_4 ; Get addressibilty to class B
  489. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX,DI ;
  490. $M_INDEX = $M_INDEX + 4 ; Set next available table location
  491. ;
  492. CALL $M_CLS_5 ; Get addressibilty to class C
  493. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX,DI ;
  494. $M_INDEX = $M_INDEX + 4 ; Set next available table location
  495. ;
  496. CALL $M_CLS_6 ; Get addressibilty to class D
  497. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX,DI ;
  498. $M_INDEX = $M_INDEX + 4 ; Set next available table location
  499. ;
  500. CALL $M_CLS_7 ; Get addressibilty to class E
  501. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX,DI ;
  502. $M_INDEX = $M_INDEX + 4 ; Set next available table location
  503. ;
  504. ENDM ;
  505. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  506. ;; $M_MAKE_COMT Macro
  507. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  508. ;
  509. $M_MAKE_COMT macro ;
  510. ;
  511. ;; CALL $M_CLS_8 ; Get addressibilty to class A
  512. CALL $M_CLS_3 ; Get addressibilty to class F
  513. MOV WORD PTR $M_RT.$M_CLASS_ADDRS+$M_INDEX,DI ;
  514. $M_INDEX = $M_INDEX + 4 ; Set next available table location
  515. ;
  516. ENDM ;
  517. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;