]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/CMD/KEYB/KEYBI48.ASM
4 TITLE DOS
- KEYB Command
- Interrupt 48H Handler
6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7 ;; DOS - NLS Support - KEYB Command
8 ;; (C) Copyright 1988 Microsoft
10 ;; File Name: KEYBI48.ASM
15 ;; Contains Interrupt 48H handler.
17 ;; Documentation Reference:
18 ;; ------------------------
19 ;; PC DOS 3.3 Detailed Design Document - May ?? 1986
21 ;; Procedures Contained in This File:
22 ;; ----------------------------------
24 ;; Include Files Required:
25 ;; -----------------------
26 ;; INCLUDE KEYBEQU.INC
27 ;; INCLUDE KEYBSHAR.INC
28 ;; INCLUDE KEYBMAC.INC
29 ;; INCLUDE KEYBCMD.INC
30 ;; INCLUDE KEYBCPSD.INC
31 ;; INCLUDE POSTEQU.inc
34 ;; External Procedure References:
35 ;; ------------------------------
36 ;; FROM FILE ????????.ASM:
37 ;; procedure - description????????????????????????????????
39 ;; Linkage Information: Refer to file KEYB.ASM
40 ;; --------------------
46 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
48 INCLUDE KEYBEQU
.INC ;;
49 INCLUDE KEYBSHAR
.INC ;;
50 INCLUDE KEYBMAC
.INC ;;
51 INCLUDE KEYBCMD
.INC ;;
52 INCLUDE KEYBCPSD
.INC ;;
53 INCLUDE POSTEQU
.inc ;;
58 EXTRN ERROR_BEEP
:NEAR ;;
60 CODE SEGMENT PUBLIC 'CODE' ;;
62 ASSUME
CS:CODE,DS:CODE,ES:DATA;;
64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
66 ;; Module: KEYB_INT_48
77 ;; IF scan code is not a break code THEN
78 ;; IF CNTL was not entered THEN
79 ;; IF ALT+SHIFT was pressed THEN
80 ;; Set JB_KB_FLAG in SHARED_DATA_AREA
81 ;; Clear ALT and SHIFT states in KB_FLAG
82 ;; IRET or JMP to a chained INT48 routine
84 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
86 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
88 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
92 STI ;; allow NON-KB interrupts
103 MOV SD
.JR_KB_FLAG
,0 ;; Clear the flag
105 CMP AL,80H
;; Test for break code
106 JA INT48_EXIT
;; IF not a break code THEN
108 PUSH DS ;; Save segment registers
111 PUSH CS ;; Set up addressing
112 POP DS ;; for DATA SEGMENT (=CODE SEGMENT)
113 MOV BX,DATA ;; Set up addressing
114 MOV ES,BX ;; for EXTRA SEGMENT (=BIOS RAM AREA)
116 MOV AH,KB_FLAG
;; Get the flag status
117 AND AH,0FH ;; Clear all shift states
119 TEST AH,CTL_SHIFT
;; Test if CNTL was entered?
120 JNE INT48_PASS
;;;;;;;;;;;;;;;; IF yes THEN
122 AND AH,ALT_SHIFT
+RIGHT_SHIFT
+LEFT_SHIFT
;; Test if both ALT and
123 CMP AH,ALT_SHIFT
;; SHIFT were pressed
124 JBE INT48_PASS
;; IF no THEN
126 MOV BH,KB_FLAG
;;;;;;;;;;;; IF yes then
127 MOV SD
.JR_KB_FLAG
,BH ;; Setup JR flag
128 AND SD
.JR_KB_FLAG
,ALT_SHIFT
+RIGHT_SHIFT
+LEFT_SHIFT
;; Pass flags
130 ;;;;;;;;;;;;;;;;;;;;;;;;;; EITHER/BOTH SHIFT)
131 XOR KB_FLAG
,AH ;; Clear the ALT state and SHIFT state
132 ;; Reset the KB_FLAG to permit
133 ;; third shifts to go through
139 CMP WORD PTR CS:SD
.OLD_INT_48
,0 ;; Q..are we the last in the chain?
140 JNE INT_48_JMP
;; N..call next in chain
141 CMP WORD PTR CS:SD
.OLD_INT_48
+2,0 ;; Q..are we the last in the chain?
142 JNE INT_48_JMP
;; N..call next in chain
144 POP AX ;; restore regs
154 IRET ;; Y..return to caller
158 POP AX ;; restore regs
168 JMP CS:SD
.OLD_INT_48
;;
171 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;