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.

450 lines
12 KiB

  1. ;/*
  2. ; * Microsoft Confidential
  3. ; * Copyright (C) Microsoft Corporation 1991
  4. ; * All Rights Reserved.
  5. ; */
  6. .XLIST
  7. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  8. ;; MS DOS 3.3 - NLS Support - Keyboard Definition File
  9. ;;
  10. ;; File Name: KEYBMAC.INC
  11. ;; ----------
  12. ;;
  13. ;; Author: Bill Devlin - IBM Canada Laboratory - May 1986
  14. ;; ------- ???????????
  15. ;;
  16. ;; Description:
  17. ;; ------------
  18. ;; Include file containing macros for the Keyboard Definition File.
  19. ;;
  20. ;; Change History:
  21. ;; ---------------
  22. ;;
  23. ;;
  24. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  25. ;;
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27. ;; Dead key flags
  28. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  29. ;;
  30. ACUTE EQU 80H ;; NLS_FLAG_1
  31. GRAVE EQU 40H ;;
  32. DIARESIS EQU 20H ;;
  33. CIRCUMFLEX EQU 10H ;;
  34. CEDILLA EQU 08H ;;
  35. TILDE EQU 04H ;;
  36. RUS_MODE EQU 01H ;; added by YST for cryillic keyboard
  37. LAT_MODE EQU 00H ;; 1/21/91
  38. ;; NLS_FLAG_2 : nothing defined yet
  39. CARON EQU 80H ;;
  40. BREVE EQU 40H ;;
  41. OVERCIRCLE EQU 20H ;;
  42. OGONEK EQU 10H ;;
  43. OVERDOT EQU 08H ;;
  44. DOUBLEACUTE EQU 04H ;;
  45. ACUTE_DIAR EQU 02h ;; Greek dead key combo
  46. ACUTE_SEC EQU 01h ;; Greek
  47. DIARESIS_SEC EQU 10h ;; Greek-BUG-BUG instead of making a NLS_FLAG_3 we
  48. ;; use 10h, which is not used in the Greek keyboard
  49. ;; and the Greek keyboard is the only one that uses
  50. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DIARESIS_SEC.
  51. ;; State IDs
  52. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  53. ;;
  54. DEAD_LOWER EQU 1 ;; dead keys on lower shift
  55. DEAD_UPPER EQU 2 ;;
  56. ALPHA_LOWER EQU 3 ;;
  57. ALPHA_UPPER EQU 4 ;;
  58. NON_ALPHA_LOWER EQU 5 ;;
  59. NON_ALPHA_UPPER EQU 6 ;;
  60. THIRD_SHIFT EQU 7 ;;
  61. ACUTE_LOWER EQU 8 ;;
  62. ACUTE_UPPER EQU 9 ;;
  63. ACUTE_SPACE EQU 10 ;;
  64. GRAVE_LOWER EQU 11 ;;
  65. GRAVE_UPPER EQU 12 ;;
  66. GRAVE_SPACE EQU 13 ;;
  67. DIARESIS_LOWER EQU 14 ;;
  68. DIARESIS_UPPER EQU 15 ;;
  69. DIARESIS_SPACE EQU 16 ;;
  70. CIRCUMFLEX_LOWER EQU 17 ;;
  71. CIRCUMFLEX_UPPER EQU 18 ;;
  72. CIRCUMFLEX_SPACE EQU 19 ;;
  73. CEDILLA_LOWER EQU 20 ;;
  74. CEDILLA_UPPER EQU 21 ;;
  75. CEDILLA_SPACE EQU 22 ;;
  76. CEDILLA_CEDILLA EQU 23 ;;
  77. DEAD_THIRD EQU 24 ;;
  78. ACUTE_ACUTE EQU 25 ;;
  79. GRAVE_GRAVE EQU 26 ;;
  80. DIARESIS_DIARESIS EQU 27 ;;
  81. CIRCUMFLEX_CIRCUMFLEX EQU 28 ;;
  82. FOURTH_SHIFT EQU 29 ;;
  83. DEAD_FOURTH EQU 30 ;;
  84. TILDE_LOWER EQU 31 ;;
  85. TILDE_UPPER EQU 32 ;;
  86. TILDE_SPACE EQU 33 ;;
  87. TILDE_TILDE EQU 34 ;;
  88. ALT_CASE EQU 35 ;;
  89. CTRL_CASE EQU 36 ;;
  90. NUMERIC_PAD EQU 37 ;;
  91. DIVIDE_SIGN EQU 38 ;;
  92. BOTLH_CAPS EQU 39 ;;
  93. BOTRH_CAPS EQU 40 ;;
  94. BOTLH_F_CAPS EQU 41 ;;
  95. BOTRH_F_CAPS EQU 42 ;;
  96. RUS_MODE_SET EQU 143 ;; Added for FR-CAN
  97. LAT_MODE_SET EQU 144 ;; Added for FR-CAN
  98. ;************************************************
  99. ; Mihindu 11/30/90 - Added Eastern Europe support
  100. ;************************************************
  101. CARON_SPACE EQU 43
  102. CARON_LOWER EQU 44
  103. CARON_UPPER EQU 45
  104. BREVE_SPACE EQU 46
  105. BREVE_LOWER EQU 47
  106. BREVE_UPPER EQU 48
  107. OVERCIRCLE_SPACE EQU 49
  108. OVERCIRCLE_LOWER EQU 50
  109. OVERCIRCLE_UPPER EQU 51
  110. OGONEK_SPACE EQU 52
  111. OGONEK_LOWER EQU 53
  112. OGONEK_UPPER EQU 54
  113. OVERDOT_SPACE EQU 55
  114. OVERDOT_LOWER EQU 56
  115. OVERDOT_UPPER EQU 57
  116. DOUBLEACUTE_SPACE EQU 58
  117. DOUBLEACUTE_LOWER EQU 59
  118. DOUBLEACUTE_UPPER EQU 60
  119. ;******************************************************
  120. ; M000 --- new state for KDFJP.ASM (Kermit) *******
  121. ;******************************************************
  122. DBCS_OLD_A EQU 61 ; M000 (JP9009)
  123. NON_ALPHA_LOWER_SEC EQU 62 ;; Added for FR-CAN
  124. NON_ALPHA_UPPER_SEC EQU 63 ;; For secondary keyboard on Dual Mode
  125. ALPHA_LOWER_SEC EQU 64 ;; keyboard systems
  126. ALPHA_UPPER_SEC EQU 65 ;;
  127. DEAD_LOWER_SEC EQU 66 ;; Added for FR-CAN
  128. DEAD_THIRD_SEC EQU 67 ;; Greek
  129. DEAD_UPPER_SEC EQU 68 ;; Greek
  130. ACUTE_SPACE_SEC EQU 69 ;; Greek
  131. ACUTE_LOWER_SEC EQU 70 ;; Greek
  132. ACUTE_UPPER_SEC EQU 71 ;; Greek
  133. ACDI_SPACE_SEC EQU 72 ;; Greek Acute-diaresis combo
  134. ACDI_LOWER_SEC EQU 73 ;; Greek
  135. ACDI_UPPER_SEC EQU 74 ;; Greek
  136. DIARESIS_LOWER_SEC EQU 75 ;; Greek
  137. DIARESIS_UPPER_SEC EQU 76 ;; Greek
  138. DIARESIS_SPACE_SEC EQU 77 ;; Greek
  139. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  140. ;; Logic Macros
  141. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  142. ;;
  143. UNKNOWN = 255
  144. FIND_FLAG MACRO FLAG_MASK
  145. IFIDN <FLAG_MASK>,<SCAN_MATCH>
  146. FLAG_ID = EXT_KB_FLAG_ID
  147. ELSE
  148. IFIDN <FLAG_MASK>,<EITHER_SHIFT>
  149. FLAG_ID = EXT_KB_FLAG_ID
  150. ELSE
  151. IFIDN <FLAG_MASK>,<CAPS_STATE>
  152. FLAG_ID = KB_FLAG_ID
  153. ELSE
  154. IFIDN <FLAG_MASK>,<NUM_STATE>
  155. FLAG_ID = KB_FLAG_ID
  156. ELSE
  157. IFIDN <FLAG_MASK>,<EITHER_CTL>
  158. FLAG_ID = EXT_KB_FLAG_ID
  159. ELSE
  160. IFIDN <FLAG_MASK>,<EITHER_ALT>
  161. FLAG_ID = EXT_KB_FLAG_ID
  162. ELSE
  163. IFIDN <FLAG_MASK>,<LEFT_SHIFT>
  164. FLAG_ID = KB_FLAG_ID
  165. ELSE
  166. IFIDN <FLAG_MASK>,<RIGHT_SHIFT>
  167. FLAG_ID = KB_FLAG_ID
  168. ELSE
  169. IFIDN <FLAG_MASK>,<ALT_SHIFT>
  170. FLAG_ID = KB_FLAG_ID
  171. ELSE
  172. IFIDN <FLAG_MASK>,<CTL_SHIFT>
  173. FLAG_ID = KB_FLAG_ID
  174. ELSE
  175. IFIDN <FLAG_MASK>,<R_ALT_SHIFT>
  176. FLAG_ID = KB_FLAG_3_ID
  177. ELSE
  178. IFIDN <FLAG_MASK>,<R_CTL_SHIFT>
  179. FLAG_ID = KB_FLAG_3_ID
  180. ELSE
  181. IFIDN <FLAG_MASK>,<TILDE>
  182. FLAG_ID = NLS_FLAG_1_ID
  183. ELSE
  184. IFIDN <FLAG_MASK>,<ACUTE>
  185. FLAG_ID = NLS_FLAG_1_ID
  186. ELSE
  187. IFIDN <FLAG_MASK>,<GRAVE>
  188. FLAG_ID = NLS_FLAG_1_ID
  189. ELSE
  190. IFIDN <FLAG_MASK>,<DIARESIS>
  191. FLAG_ID = NLS_FLAG_1_ID
  192. ELSE
  193. IFIDN <FLAG_MASK>,<CEDILLA>
  194. FLAG_ID = NLS_FLAG_1_ID
  195. ELSE
  196. IFIDN <FLAG_MASK>,<CIRCUMFLEX>
  197. FLAG_ID = NLS_FLAG_1_ID
  198. ELSE
  199. IFIDN <FLAG_MASK>,<CARON>
  200. FLAG_ID = NLS_FLAG_2_ID
  201. ELSE
  202. IFIDN <FLAG_MASK>,<BREVE>
  203. FLAG_ID = NLS_FLAG_2_ID
  204. ELSE
  205. IFIDN <FLAG_MASK>,<OVERCIRCLE>
  206. FLAG_ID = NLS_FLAG_2_ID
  207. ELSE
  208. IFIDN <FLAG_MASK>,<OGONEK>
  209. FLAG_ID = NLS_FLAG_2_ID
  210. ELSE
  211. IFIDN <FLAG_MASK>,<OVERDOT>
  212. FLAG_ID = NLS_FLAG_2_ID
  213. ELSE
  214. IFIDN <FLAG_MASK>,<DOUBLEACUTE>
  215. FLAG_ID = NLS_FLAG_2_ID
  216. ELSE
  217. IFIDN <FLAG_MASK>,<ACUTE_DIAR>
  218. FLAG_ID = NLS_FLAG_2_ID
  219. ELSE
  220. IFIDN <FLAG_MASK>,<ACUTE_SEC>
  221. FLAG_ID = NLS_FLAG_2_ID
  222. ELSE
  223. IFIDN <FLAG_MASK>,<DIARESIS_SEC>
  224. FLAG_ID = NLS_FLAG_2_ID
  225. ELSE
  226. IFIDN <FLAG_MASK>,<LC_E0>
  227. FLAG_ID = KB_FLAG_3_ID
  228. ELSE
  229. ;; ============================================================
  230. ;; For FR-CAN Dual mode
  231. ;; ============================================================
  232. IFIDN <FLAG_MASK>,<SHIFTS_PRESSED>
  233. FLAG_ID = EXT_KB_FLAG_ID
  234. ELSE
  235. IFIDN <FLAG_MASK>,<RUS_MODE>
  236. FLAG_ID = NLS_FLAG_1_ID
  237. ELSE
  238. IFIDN <FLAG_MASK>,<LAT_MODE>
  239. FLAG_ID = NLS_FLAG_1_ID
  240. ELSE
  241. ;; ============================================================
  242. ;; End of FR-CAN dual mode
  243. ;; ============================================================
  244. FLAG_ID = UNKNOWN
  245. ENDIF
  246. ENDIF
  247. ENDIF
  248. ENDIF
  249. ENDIF
  250. ENDIF
  251. ENDIF
  252. ENDIF
  253. ENDIF
  254. ENDIF
  255. ENDIF
  256. ENDIF
  257. ENDIF
  258. ENDIF
  259. ENDIF
  260. ENDIF
  261. ENDIF
  262. ENDIF
  263. ENDIF
  264. ENDIF
  265. ENDIF
  266. ENDIF
  267. ENDIF
  268. ENDIF
  269. ENDIF
  270. ENDIF
  271. ENDIF
  272. ENDIF
  273. ENDIF
  274. ENDIF
  275. ENDIF
  276. ENDM
  277. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  278. FLAG MACRO FLAG_MASK
  279. FIND_FLAG FLAG_MASK
  280. IF (FLAG_ID EQ UNKNOWN)
  281. IF2
  282. %OUT Unknown parameter FLAG_MASK on FLAG MACRO
  283. ENDIF
  284. ELSE
  285. DB FLAG_ID
  286. DB FLAG_MASK
  287. ENDIF
  288. ENDM
  289. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  290. IFF MACRO FLAG_MASK,MASK_TYPE
  291. MAC_OK = 1
  292. IFB <MASK_TYPE>
  293. NOT_BIT = 00000000B
  294. ELSE
  295. IFIDN <MASK_TYPE>,<NOT>
  296. NOT_BIT = 00001000B
  297. ELSE
  298. MAC_OK = 0
  299. IF2
  300. %OUT Unknown parameter MASK_TYPE on IFF MACRO
  301. ENDIF
  302. ENDIF
  303. ENDIF
  304. IF MAC_OK
  305. FIND_FLAG FLAG_MASK
  306. IF (FLAG_ID EQ UNKNOWN)
  307. IF2
  308. %OUT Unknown parameter FLAG_MASK on IFF MACRO
  309. ENDIF
  310. ELSE
  311. DB IFF_COMMAND+NOT_BIT+FLAG_ID
  312. DB FLAG_MASK
  313. ENDIF
  314. ENDIF
  315. ENDM
  316. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  317. IFKBD MACRO SYS
  318. DB IFKBD_COMMAND
  319. DW SYS
  320. ENDM
  321. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  322. ANDF MACRO FLAG_MASK,MASK_TYPE
  323. MAC_OK = 1
  324. IFB <MASK_TYPE>
  325. NOT_BIT = 00000000B
  326. ELSE
  327. IFIDN <MASK_TYPE>,<NOT>
  328. NOT_BIT = 00001000B
  329. ELSE
  330. MAC_OK = 0
  331. IF2
  332. %OUT Unknown parameter MASK_TYPE on ANDF MACRO
  333. ENDIF
  334. ENDIF
  335. ENDIF
  336. IF MAC_OK
  337. FIND_FLAG FLAG_MASK
  338. IF (FLAG_ID EQ UNKNOWN)
  339. IF2
  340. %OUT Unknown parameter FLAG_MASK on ANDF MACRO
  341. ENDIF
  342. ELSE
  343. DB ANDF_COMMAND+NOT_BIT+FLAG_ID
  344. DB FLAG_MASK
  345. ENDIF
  346. ENDIF
  347. ENDM
  348. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  349. ELSEF MACRO
  350. DB ELSEF_COMMAND
  351. ENDM
  352. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  353. ENDIFF MACRO
  354. DB ENDIFF_COMMAND
  355. ENDM
  356. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  357. XLATT MACRO STATE
  358. DB XLATT_COMMAND
  359. DB STATE
  360. ENDM
  361. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  362. PUT_ERROR_CHAR MACRO STATE
  363. DB PUT_ERROR_COMMAND
  364. DB STATE
  365. ENDM
  366. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  367. OPTION MACRO MASK,MASK_TYPE
  368. MAC_OK = 1
  369. IFB <MASK_TYPE>
  370. NOT_BIT = 00000000B
  371. ELSE
  372. IFIDN <MASK_TYPE>,<NOT>
  373. NOT_BIT = 00001000B
  374. ELSE
  375. MAC_OK = 0
  376. IF2
  377. %OUT Unknown parameter MASK_TYPE on OPTION MACRO
  378. ENDIF
  379. ENDIF
  380. ENDIF
  381. IF MAC_OK
  382. DB OPTION_COMMAND+NOT_BIT
  383. DB MASK
  384. ENDIF
  385. ENDM
  386. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  387. SET_FLAG MACRO STATE
  388. DB SET_FLAG_COMMAND
  389. DB STATE
  390. ENDM
  391. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  392. RESET_NLS MACRO
  393. DB RESET_NLS_COMMAND
  394. ENDM
  395. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  396. RESET_NLS1 MACRO
  397. DB RESET_NLS1_COMMAND
  398. ENDM
  399. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  400. BEEP MACRO
  401. DB BEEP_COMMAND
  402. ENDM
  403. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  404. GOTO MACRO GOTO_OFFSET
  405. DB GOTO_COMMAND
  406. DW GOTO_OFFSET-$-2
  407. ENDM
  408. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  409. EXIT_INT_9 MACRO
  410. DB GOTO_COMMAND+EXIT_INT_9_FLAG
  411. DW 0
  412. ENDM
  413. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  414. EXIT_STATE_LOGIC MACRO
  415. DB GOTO_COMMAND+EXIT_STATE_LOGIC_FLAG
  416. DW 0
  417. ENDM
  418. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  419. CHECK_FOR_CORE_KEY MACRO
  420. DB CHECK_CORE_COMMAND
  421. ENDM
  422. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  423. .LIST
  424.