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.

419 lines
11 KiB

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