Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-1


				
				        PAGE    ,132
				        TITLE   DOS KEYB Command  -  Transient Command Processing
				
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;; DOS - NLS Support - KEYB Command
				;; (C) Copyright 1988 Microsoft
				;;
				;; File Name:  KEYBTBBL.ASM
				;; ----------
				;;
				;; Description:
				;; ------------
				;;       Build SHARED_DATA_AREA with parameters specified
				;;       in KEYBCMD.ASM
				;;
				;; Documentation Reference:
				;; ------------------------
				;;       None
				;;
				;; Procedures Contained in This File:
				;; ----------------------------------
				;;     TABLE_BUILD: Build the header sections of the SHARED_DATA_AREA
				;;     STATE_BUILD: Build the state sections in the table area
				;;     FIND_CP_TABLE: Given the language and code page parm, determine the
				;;            offset of the code page table in KEYBOARD.SYS
				;;
				;; Include Files Required:
				;; -----------------------
				;;       KEYBSHAR.INC
				;;       KEYBSYS.INC
				;;       KEYBDCL.INC
				;;       KEYBI2F.INC
				;;
				;; External Procedure References:
				;; ------------------------------
				;;       None
				;;
				;; Change History:
				;; ---------------
				;;
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
				        PUBLIC TABLE_BUILD             ;;
				        PUBLIC FIND_CP_TABLE           ;;
				        PUBLIC CPN_INVALID             ;;
				        PUBLIC SD_LENGTH               ;;
				                                       ;;
 0000				CODE    SEGMENT PUBLIC 'CODE'          ;;
				                                       ;;
				        INCLUDE KEYBEQU.INC            ;;
			     C	.LIST
				        INCLUDE KEYBSHAR.INC           ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-2


			     C	.LIST
				        INCLUDE KEYBSYS.INC            ;;
			     C	.LIST
			     C	
				        INCLUDE KEYBCMD.INC            ;;
			     C	.LIST
			     C	
			     C	
				        INCLUDE KEYBDCL.INC            ;;
			     C	
			     C	.LIST
			     C	
				        INCLUDE COMMSUBS.INC           ;;
			     C	.LIST
				        INCLUDE KEYBCPSD.INC           ;;
			     C	.LIST
			     C	
				                                       ;;
				        ASSUME  CS:CODE,DS:CODE        ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; Module: TABLE_BUILD
				;;
				;; Description:
				;;     Create the table area within the shared data structure. Each
				;;     table is made up of a descriptor plus the state sections.
				;;     Translate tables are found in the Keyboard definition file and are
				;;     copied into the shared data area by means of the STATE_BUILD
				;;     routine.
				;;
				;; Input Registers:
				;;     DS - points to our data segment
				;;     ES - points to our data segment
				;;     BP - points at beginning of CMD_PARM_LIST
				;;
				;;     SHARED_DATA_STR must be allocated in memory
				;;
				;;     The following variables must also be passed from KEYB_COMMAND
				;;         KEYBSYS_FILE_HANDLE is set to file handle after opening file
				;;         CP_TAB_OFFSET is the offset of the CP table in the SHARED_DATA_AREA
				;;         STATE_LOGIC_OFFSET is the offset of the state section in the SHARED_DATA_AREA
				;;         SYS_CODE_PAGE is the binary representation of the system CP
				;;         KEYBCMD_LANG_ENTRY_PTR is a pointer to the lang entry in KEY DEF file
				;;         DESIG_CP_BUFFER is the buffer which holds a list of designated CPs
				;;         DESIG_CP_OFFSET:WORD is the offset of that list
				;;         NUM_DESIG_CP is the number of CPs designated
				;;         FILE_BUFFER is the buffer to read in the KEY DEF file
				;**********CNS ***************************************
				;;         ID_PTR_SIZE is the size of the ID ptr structure
				;**********CNS ***************************************
				;;         LANG_PTR_SIZE is the size of the lang ptr structure
				;;         CP_PTR_SIZE is the size of the CP ptr structure
				;;         NUM_CP is the number of CPs in the KEYB DEF file for that lang
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-3


				;;         SHARED_AREA_PTR segment and offset of the SHARED_DATA_AREA
				;;
				;;
				;; Output Registers:
				;;     CX - RETURN_CODE :=  0  - Table build successful
				;;                          1  - Table build unsuccessful - ERROR 1
				;;                                     (Invalid language parm)
				;;                          2  - Table build unsuccessful - ERROR 2
				;;                                     (Invalid Code Page parm)
				;;                          3  - Table build unsuccessful - ERROR 3
				;;                                     (Machine type unavaliable)
				;;                          4  - Table build unsuccessful - ERROR 4
				;;                                     (Bad or missing keyboard def file)
				;;                          5  - Table build unsuccessful - ERROR 5
				;;                                     (Memory overflow occurred)
				;; Logic:
				;;     Calculate Offset difference between TEMP and SHARED_DATA_AREAs
				;;     Get LANGUAGE_PARM and CODE_PAGE_PARM from parm list
				;;     Call FIND_CP_TABLE := Determine whether CP is valid for given language
				;;     IF CP is valid THEN
				;;        Store them in the SHARED_DATA_AREA
				;;        Prepare to read Keyboard definition file by LSEEKing to the top
				;;        READ the header
				;;        Store maximum table values for calculation of RES_END
				;;        Set DI to point at TABLE_AREA within SHARED_DATA_AREA
				;;        FOR the state logic section of the specified language:
				;;           IF STATE_LOGIC_PTR is not -1 THEN
				;;               LSEEK to state logic section in keyboard definition file
				;;               READ the state logic section into the TABLE_AREA
				;;               Set the hot keyb scan codes
				;;               Set the LOGIC_PTR in the header
				;;        FOR the common translate section:
				;;           IF Length parameter is not 0 THEN
				;;               Build state
				;;               Set the COMMON_XLAT_PTR in the header
				;;        FOR the specific translate sections:
				;;        Establish addressibility to list of designated code pages
				;;        FOR each code page
				;;           IF CP_ENTRY_PTR is not -1 THEN
				;;               Determine offset of CP table in Keyb Def file
				;;               IF CP table not avaliable THEN
				;;                   Set CPN_INVALID flag
				;;               ELSE
				;;                   LSEEK to CPn state section in keyboard definition file
				;;                   IF this is the invoked code page THEN
				;;                       Set ACTIVE_XLAT_PTR in SHARED_DATA_AREA
				;;                   Update RESIDENT_END ptr
				;;                   Build state
				;;        Update RESIDENT_END ptr
				;;        End
				;;
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                               ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-4


 =				FB                   EQU   FILE_BUFFER         ;;
 = 0002				KB_MASK              EQU   02H                 ;;
				                                               ;;
 0000  0000			FIRST_XLAT_TAB       DW    0                   ;;
 0002  FFFF			NEXT_SECT_PTR        DW    -1                  ;;
				                                               ;;
 0004  0000			MAX_COM_SIZE         DW    ?                   ;;
 0006  0000			MAX_SPEC_SIZE        DW    ?                   ;;
 0008  0000			MAX_LOGIC_SIZE       DW    ?                   ;;
				                                               ;;
 000A  0000			RESIDENT_END_ACC     DW    0                   ;;
 000C  0030			SA_HEADER_SIZE       DW    SIZE SHARED_DATA_STR;;
 000E  0000			PARM_LIST_OFFSET     DW    ?                   ;;
				;********************CNS*************************
 0010  0000			TB_ID_PARM           DW    0
				;********************CNS*************************
 0012  0000			TB_LANGUAGE_PARM     DW    0                   ;;
 0014  0000			TB_CODE_PAGE_PARM    DW    0                   ;;
				                                               ;;
 0016  0000			CPN_INVALID          DW    0                   ;;
				                                               ;;
 0018  0000			KEYB_INSTALLED       DW    0                   ;;
 001A  0000			SD_AREA_DIFFERENCE   DW    0                   ;;
 001C  07D0			SD_LENGTH            DW    2000                ;;
				                                               ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;  Program Code
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                          ;;
 001E				TABLE_BUILD          PROC NEAR            ;;
				                                          ;;
 001E  B8 0000 E		        MOV   AX,OFFSET SD_SOURCE_PTR     ;;    Setup the difference
 0021  2D 0000 E		        SUB   AX,OFFSET SD_DEST_PTR       ;;     value used to calculate
 0024  A3 001A R		        MOV   SD_AREA_DIFFERENCE,AX       ;;      new ptr values for
				                                          ;;        SHARED_DATA_AREA
 0027  8B 46 0C			        MOV   AX,[BP].ID_PARM             ;; WGR Get id parameter              ;AN000
 002A  A3 0010 R		        MOV   TB_ID_PARM,AX               ;; WGR                               ;AN000
 002D  8B 46 04			        MOV   AX,[BP].LANGUAGE_PARM       ;;    Get language parameter
 0030  A3 0012 R		        MOV   TB_LANGUAGE_PARM,AX         ;;
 0033  8B 5E 06			        MOV   BX,[BP].CODE_PAGE_PARM      ;;    Get code page parameter
 0036  89 1E 0014 R		        MOV   TB_CODE_PAGE_PARM,BX        ;;
				                                          ;;  Make sure code page is
 003A  E8 03ED R		        CALL  FIND_CP_TABLE               ;;   valid for the language
 003D  83 F9 00			        CMP   CX,0                        ;; Test return codes
 0040  74 03			        JE    TB_CHECK_CONTINUE1          ;; IF code page is found
 0042  E9 02DE R		        JMP   TB_ERROR6                   ;;               for language THEN
				                                          ;;
 0045				TB_CHECK_CONTINUE1:                       ;;;;;;;;
 0045  BD 0000 E		        MOV   BP,OFFSET SD_SOURCE_PTR           ;;    Put language parm and    ;AN000
 0048  A1 0010 R		        MOV   AX,TB_ID_PARM                     ;; WGR id parm and..           ;AN000
 004B  26: 89 46 1A		        MOV   ES:[BP].INVOKED_KBD_ID,AX         ;; WGR
 004F  8B 1E 0014 R		        MOV   BX,TB_CODE_PAGE_PARM              ;;
 0053  26: 89 5E 18		        MOV   ES:[BP].INVOKED_CP_TABLE,BX       ;;;;;; code page parm into the
 0057  A1 0012 R		        MOV   AX,TB_LANGUAGE_PARM                   ;;  SHARED_DATA_AREA
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-5


 005A  26: 89 46 16		        MOV   WORD PTR ES:[BP].ACTIVE_LANGUAGE,AX   ;;
				                                                    ;;
 005E  8B 1E 0000 E		        MOV   BX,KEYBSYS_FILE_HANDLE   ;;;;;;;;;;;;;;; Get handle
 0062  33 D2			        XOR   DX,DX                    ;; LSEEK file pointer
 0064  33 C9			        XOR   CX,CX                    ;;    back to top of file
 0066  B4 42			        MOV   AH,42H                   ;;
 0068  B0 00			        MOV   AL,0                     ;; If no problem with
 006A  CD 21			        INT   21H                      ;;     Keyboard Def file THEN
 006C  73 03			        JNC   TB_START                 ;;
 006E  E9 02CC R		        JMP   TB_ERROR4                ;;
				                                       ;;
 0071				TB_START:                              ;; Else
 0071  33 FF			        XOR   DI,DI                    ;; Set number
 0073  8D 4D 16			        LEA   CX,[DI].KH_MAX_LOGIC_SZ+2;;        bytes to read header
 0076  BA 0000 E		        MOV   DX,OFFSET FILE_BUFFER    ;; Move contents into file buffer
 0079  B4 3F			        MOV   AH,3FH                   ;;     READ
 007B  0E			        PUSH  CS                       ;;
 007C  1F			        POP   DS                       ;;
 007D  CD 21			        INT   21H                      ;;        File
 007F  73 03			        JNC   TB_CONTINUE1             ;;
 0081  E9 02CC R		        JMP   TB_ERROR4                ;;
				                                       ;;
 0084				TB_CONTINUE1:                          ;;
 0084  3B C8			        CMP   CX,AX                    ;;
 0086  74 06			        JE    TB_ERROR_CHECK1          ;;
 0088  B9 0004			        MOV   CX,4                     ;;
 008B  E9 02AE R		        JMP   TB_CPN_INVALID           ;;
				                                       ;;
 008E				TB_ERROR_CHECK1:                       ;;
 008E  8B 0E 0010 E		        MOV   CX,FB.KH_MAX_COM_SZ      ;;  Save values for RESIDENT_END
 0092  89 0E 0004 R		        MOV   MAX_COM_SIZE,CX          ;;           calculation
 0096  8B 0E 0012 E		        MOV   CX,FB.KH_MAX_SPEC_SZ     ;;
 009A  89 0E 0006 R		        MOV   MAX_SPEC_SIZE,CX         ;;
 009E  8B 0E 0014 E		        MOV   CX,FB.KH_MAX_LOGIC_SZ    ;;
 00A2  89 0E 0008 R		        MOV   MAX_LOGIC_SIZE,CX        ;;
				                                       ;;
 00A6  8D 7E 2F			        LEA   DI,[BP].TABLE_AREA       ;; Point at beginning of table area
				                                       ;;           DI ---> TABLE_AREA
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;   ** FOR STATE LOGIC SECTION FOR LANG **
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                               ;;
 00A9				TB_STATE_BEGIN:                                ;;
 00A9  8B 1E 0000 E		        MOV   BX,KEYBSYS_FILE_HANDLE           ;; Get handle
 00AD  8B 0E 0002 E		        MOV   CX,WORD PTR STATE_LOGIC_OFFSET+2 ;;
 00B1  8B 16 0000 E		        MOV   DX,WORD PTR STATE_LOGIC_OFFSET   ;; Get LSEEK file pointer
				                                               ;;
 00B5  83 FA FF			        CMP   DX,-1                    ;;;;;;;;;; If no language table then
 00B8  75 03			        JNE   TB_STATE_CONTINUE1       ;;           jump to code page begin
 00BA  E9 01BB R		        JMP   TB_CP_BEGIN              ;;
				                                       ;;
 00BD				TB_STATE_CONTINUE1:                    ;; Else
 00BD  B4 42			        MOV   AH,42H                   ;; LSEEK to beginning of state logic sect
 00BF  B0 00			        MOV   AL,0                     ;; If no problem with
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-6


 00C1  CD 21			        INT   21H                      ;;     Keyboard Def file THEN
 00C3  73 03			        JNC   TB_STATE_CONTINUE2       ;;
 00C5  E9 02CC R		        JMP   TB_ERROR4                ;;
				                                       ;;;;;;;;;;
 00C8				TB_STATE_CONTINUE2:                            ;;
 00C8  8B D0			        MOV   DX,AX                            ;;
 00CA  89 0E 02F2 R		        MOV   WORD PTR SB_STATE_OFFSET+2,CX    ;;  Save the offset of the
 00CE  89 16 02F0 R		        MOV   WORD PTR SB_STATE_OFFSET,DX      ;;     states in Keyb Def file
				                                               ;;
 00D2  2B 3E 001A R		        SUB   DI,SD_AREA_DIFFERENCE            ;;  Adjust for relocation
 00D6  26: 89 7E 22		        MOV   ES:[BP].LOGIC_PTR,DI     ;;;;;;;;;;  Set because this is state
 00DA  03 3E 001A R		        ADD   DI,SD_AREA_DIFFERENCE    ;;  Adjust for relocation
				                                       ;;
 00DE  B9 0004			        MOV   CX,4                     ;; Set number bytes to read length and
				                                       ;;    special features
 00E1  BA 0000 E		        MOV   DX,OFFSET FILE_BUFFER    ;; Set the buffer address
 00E4  B4 3F			        MOV   AH,3FH                   ;; Read from the Keyb Def file
 00E6  CD 21			        INT   21H                      ;;
 00E8  73 03			        JNC   TB_STATE_CONTINUE3       ;;
 00EA  E9 02CC R		        JMP   TB_ERROR4                ;;
				                                       ;;
 00ED				TB_STATE_CONTINUE3:                    ;;
 00ED  3B C8			        CMP   CX,AX                    ;;
 00EF  74 06			        JE    TB_ERROR_CHECK2          ;;
 00F1  B9 0004			        MOV   CX,4                     ;;
 00F4  E9 02AE R		        JMP   TB_CPN_INVALID           ;;
				                                       ;;;;;
 00F7				TB_ERROR_CHECK2:                          ;;
 00F7  A1 0002 E		        MOV   AX,FB.KT_SPECIAL_FEATURES   ;; Save the special features in the
 00FA  26: 89 46 26		        MOV   ES:[BP].SPECIAL_FEATURES,AX ;;  SHARED_DATA_AREA
				                                          ;;
 00FE  81 3E 0000 E 8000	        CMP   HW_TYPE,JR_KB               ;;;;;;;;
 0104  75 12			        JNE   USE_F1_F2                         ;;
 0106  A9 4000			        TEST  AX,JR_HOT_KEY_1_2                 ;;
 0109  74 0D			        JZ    USE_F1_F2                         ;;
 010B  26: C6 46 29 02		        MOV   ES:[BP].HOT_KEY_ON_SCAN,ONE_SCAN  ;;
 0110  26: C6 46 2A 03		        MOV   ES:[BP].HOT_KEY_OFF_SCAN,TWO_SCAN ;;
 0115  EB 0B 90			        JMP   HOT_KEY_SET                       ;;
				                                                ;;
 0118				USE_F1_F2:                                      ;;
 0118  26: C6 46 29 3B		        MOV   ES:[BP].HOT_KEY_ON_SCAN,F1_SCAN   ;;
 011D  26: C6 46 2A 3C		        MOV   ES:[BP].HOT_KEY_OFF_SCAN,F2_SCAN  ;;
				                                                ;;
 0122				HOT_KEY_SET:                              ;;;;;;;;
 0122  8B 0E 0000 E		        MOV   CX,FB.KT_LOGIC_LEN          ;; Set length of section to read
 0126  83 F9 00			        CMP   CX,0                        ;;
 0129  75 0A			        JNE   TB_STATE_CONTINUE4          ;;
 012B  B9 FFFF			        MOV   CX,-1                    ;;;;;
 012E  26: 89 4E 22		        MOV   ES:[BP].LOGIC_PTR,CX     ;;
 0132  EB 43 90			        JMP   SB_COMM_BEGIN            ;;
				                                       ;;
 0135				TB_STATE_CONTINUE4:                    ;;
 0135  26: 89 0D		        MOV   ES:[DI],CX               ;; Store length parameter in
 0138  83 C7 02			        ADD   DI,2                     ;;                  SHARED_DATA_AREA
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-7


 013B  8B 0E 0002 E		        MOV   CX,FB.KT_SPECIAL_FEATURES;; Save the special features
 013F  26: 89 0D		        MOV   ES:[DI],CX               ;;
 0142  83 C7 02			        ADD   DI,2                     ;;
 0145  8B 0E 0000 E		        MOV   CX,FB.KT_LOGIC_LEN       ;; Set length of section to read
 0149  83 E9 04			        SUB   CX,4                     ;; Adjust for what we have already read
 014C  8B D7			        MOV   DX,DI                    ;; Set the address of SHARED_DATA_AREA
 014E  06			        PUSH  ES                       ;;
 014F  1F			        POP   DS                       ;;
 0150  B4 3F			        MOV   AH,3FH                   ;; Read logic section from the
 0152  CD 21			        INT   21H                      ;;      Keyb Def file
 0154  0E			        PUSH  CS                       ;;
 0155  1F			        POP   DS                       ;;
 0156  73 03			        JNC   TB_STATE_CONTINUE5       ;;
 0158  E9 02CC R		        JMP   TB_ERROR4                ;;
				                                       ;;
 015B				TB_STATE_CONTINUE5:                    ;;
 015B  3B C8			        CMP   CX,AX                    ;;
 015D  74 06			        JE    TB_ERROR_CHECK3          ;;
 015F  B9 0004			        MOV   CX,4                     ;;
 0162  E9 02AE R		        JMP   TB_CPN_INVALID           ;;
				                                       ;;
 0165				TB_ERROR_CHECK3:                       ;;
 0165  03 F9			        ADD   DI,CX                    ;; Set DI at new beginning of area
				                                       ;;              TABLE_AREA
				                                       ;;              STATE_LOGIC
 0167  8B 0E 000A R		        MOV   CX,RESIDENT_END_ACC      ;;      DI --->
 016B  03 0E 000C R		        ADD   CX,SA_HEADER_SIZE        ;;
 016F  03 0E 0008 R		        ADD   CX,MAX_LOGIC_SIZE        ;;
 0173  89 0E 000A R		        MOV   RESIDENT_END_ACC,CX      ;;  Refresh resident end size
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;   ** FOR COMMON TRANSLATE SECTION FOR LANG **
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 0177				SB_COMM_BEGIN:                         ;;
 0177  B9 0004			        MOV   CX,SIZE KEYBSYS_XLAT_SECT-1 ;; Set number bytes to read header
 017A  8B D7			        MOV   DX,DI                    ;; Set the SHARED_DATA_AREA address
 017C  06			        PUSH  ES                       ;;
 017D  1F			        POP   DS                       ;;
 017E  B4 3F			        MOV   AH,3FH                   ;; Read from the Keyb Def file
 0180  CD 21			        INT   21H                      ;;
 0182  0E			        PUSH  CS                       ;;
 0183  1F			        POP   DS                       ;;
 0184  73 03			        JNC   TB_STATE_CONTINUE6       ;;
 0186  E9 02CC R		        JMP   TB_ERROR4                ;;
				                                       ;;
 0189				TB_STATE_CONTINUE6:                    ;;
 0189  26: 8B 0D		        MOV   CX,ES:[DI].KX_SECTION_LEN;; Set length of section to read
 018C  83 F9 00			        CMP   CX,0                     ;;
 018F  75 03			        JNE   TB_STATE_CONTINUE7       ;;
 0191  EB 28 90			        JMP   TB_CP_BEGIN              ;;
				                                       ;;;;;;;
 0194				TB_STATE_CONTINUE7:                         ;;
 0194  8B 0E 02F0 R		        MOV   CX,WORD PTR SB_STATE_OFFSET   ;;  Save the offset of the
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-8


 0198  03 0E 0000 E		        ADD   CX,FB.KT_LOGIC_LEN            ;;
 019C  89 0E 02F0 R		        MOV   WORD PTR SB_STATE_OFFSET,CX   ;;  Save the offset of the
 01A0  2B 3E 001A R		        SUB   DI,SD_AREA_DIFFERENCE         ;;  Adjust for relocation
 01A4  26: 89 7E 24		        MOV   ES:[BP].COMMON_XLAT_PTR,DI    ;;
 01A8  03 3E 001A R		        ADD   DI,SD_AREA_DIFFERENCE         ;;  Adjust for relocation
				                                       ;;;;;;;
 01AC  E8 02F8 R		        CALL  STATE_BUILD              ;;
				                                       ;; DI set at new beginning of area
				                                       ;;              TABLE_AREA
				                                       ;;              STATE_LOGIC
				                                       ;;              COMMON_XLAT_SECTION
 01AF  8B 0E 000A R		        MOV   CX,RESIDENT_END_ACC      ;;
 01B3  03 0E 0004 R		        ADD   CX,MAX_COM_SIZE          ;;
 01B7  89 0E 000A R		        MOV   RESIDENT_END_ACC,CX      ;;  Refresh resident end size
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;    FOR ALL DESIGNATED OR INVOKED CODE PAGES
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                                       ;;
 01BB				TB_CP_BEGIN:                                           ;; Get the offset to
 01BB  B9 0006 E		        MOV   CX,OFFSET DESIG_CP_BUFFER.DESIG_CP_ENTRY ;; the beginning of the
 01BE  89 0E 0000 E		        MOV   DESIG_CP_OFFSET,CX                       ;; table of designated
				                                                   ;;;;;; code pages
 01C2				TB_CPN_BEGIN:                                      ;;
 01C2  26: 8B 46 16		        MOV   AX,WORD PTR ES:[BP].ACTIVE_LANGUAGE  ;; Get the active language
 01C6  8B 0E 0000 E		        MOV   CX,NUM_DESIG_CP          ;;;;;;;;;;;;;; Get the number of CPs
 01CA  83 F9 00			        CMP   CX,0                     ;; IF we have done all requested CPs
 01CD  75 03			        JNE   TB_CPN_VALID1            ;;
 01CF  E9 026C R		        JMP   TB_DONE                  ;;   Then done
				                                       ;;
 01D2				TB_CPN_VALID1:                         ;;
 01D2  8B 36 0000 E		        MOV   SI,[DESIG_CP_OFFSET]     ;;
 01D6  8B 1C			        MOV   BX,[SI]                  ;; Get the CP
 01D8  83 FB FF			        CMP   BX,-1                    ;;
 01DB  75 03			        JNE   TB_CPN_CONTINUE1         ;;
 01DD  EB 6A 90			        JMP   TB_CPN_REPEAT            ;;
				                                       ;;
 01E0				TB_CPN_CONTINUE1:                      ;; ELSE
 01E0  57			        PUSH  DI                       ;;
 01E1  E8 03ED R		        CALL  FIND_CP_TABLE            ;;   Find offset of code page table
 01E4  5F			        POP   DI                       ;;
				                                       ;;
 01E5  83 F9 00			        CMP   CX,0                     ;; Test return codes
 01E8  74 07			        JE    TB_CPN_VALID             ;; IF code page is not found for language
 01EA  89 0E 0016 R		        MOV   CPN_INVALID,CX           ;;       Set flag and go to next CP
 01EE  EB 59 90			        JMP   TB_CPN_REPEAT            ;; Else
				                                       ;;
 01F1				TB_CPN_VALID:                          ;;;;;;
 01F1  8B 1E 0000 E		        MOV   BX,KEYBSYS_FILE_HANDLE       ;; Get handle
 01F5  8B 0E 0002 E		        MOV   CX,WORD PTR CP_TAB_OFFSET+2  ;; Get offset of the code page
 01F9  8B 16 0000 E		        MOV   DX,WORD PTR CP_TAB_OFFSET    ;;    in the Keyb Def file
				                                           ;;
 01FD  83 FA FF			        CMP   DX,-1                    ;;;;;; Test if code page is blank
 0200  75 03			        JNE   TB_CPN_CONTINUE2         ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-9


 0202  EB 45 90			        JMP   TB_CPN_REPEAT            ;; If it is then go get next CP
				                                       ;;
 0205				TB_CPN_CONTINUE2:                      ;;
 0205  B4 42			        MOV   AH,42H                   ;; LSEEK to table in Keyb Def file
 0207  B0 00			        MOV   AL,0                     ;; If no problem with
 0209  CD 21			        INT   21H                      ;;     Keyb Def file Then
 020B  73 03			        JNC   TB_CPN_CONTINUE3         ;;
 020D  E9 02CC R		        JMP   TB_ERROR4                ;;
				                                       ;;;;;;;;;;
 0210				TB_CPN_CONTINUE3:                              ;;
 0210  8B D0			        MOV   DX,AX                            ;;
 0212  89 0E 02F2 R		        MOV   WORD PTR SB_STATE_OFFSET+2,CX    ;;  Save the offset of the
 0216  89 16 02F0 R		        MOV   WORD PTR SB_STATE_OFFSET,DX      ;;      states in Keyb Def file
				                                               ;;
 021A  8B 0E 0014 R		        MOV   CX,TB_CODE_PAGE_PARM          ;;;;;  If this code page is the
 021E  8B 36 0000 E		        MOV   SI,[DESIG_CP_OFFSET]          ;;        invoked code page
 0222  3B 0C			        CMP   CX,[SI]                       ;;
 0224  75 0C			        JNE   TB_CPN_CONTINUE4              ;;  Then
				                                            ;;
 0226  2B 3E 001A R		        SUB   DI,SD_AREA_DIFFERENCE         ;;  Adjust for relocation
 022A  26: 89 7E 1C		        MOV   ES:[BP].ACTIVE_XLAT_PTR,DI    ;;  Set active xlat section
 022E  03 3E 001A R		        ADD   DI,SD_AREA_DIFFERENCE         ;;  Adjust for relocation
				                                       ;;;;;;;
 0232				TB_CPN_CONTINUE4:                      ;;
 0232  2B 3E 001A R		        SUB   DI,SD_AREA_DIFFERENCE    ;;  Adjust for relocation
 0236  26: 89 7E 1E		        MOV   ES:[BP].FIRST_XLAT_PTR,DI;;          Set flag
 023A  03 3E 001A R		        ADD   DI,SD_AREA_DIFFERENCE    ;;  Adjust for relocation
				                                       ;;
 023E				TB_CPN_CONTINUE5:                      ;;
 023E  E8 02F8 R		        CALL  STATE_BUILD              ;;  Build state
				                                       ;;             TABLE_AREA
 0241  83 F9 00			        CMP   CX,0                     ;;             COMMON_XLAT_SECTION
 0244  74 03			        JE    TB_CPN_REPEAT            ;;             SPECIFIC_XLAT_SECTION(S)
 0246  E9 02CC R		        JMP   TB_ERROR4                ;;    DI --->
				                                       ;;
 0249				TB_CPN_REPEAT:                         ;;
 0249  8B 0E 000A R		        MOV   CX,RESIDENT_END_ACC      ;;
 024D  03 0E 0006 R		        ADD   CX,MAX_SPEC_SIZE         ;;  Refresh resident end size
 0251  89 0E 000A R		        MOV   RESIDENT_END_ACC,CX      ;;
				                                       ;;
 0255  8B 0E 0000 E		        MOV   CX,DESIG_CP_OFFSET       ;;
 0259  83 C1 02			        ADD   CX,2                     ;; Adjust offset to find next code page
 025C  89 0E 0000 E		        MOV   DESIG_CP_OFFSET,CX       ;;
				                                       ;;
 0260  8B 0E 0000 E		        MOV   CX,NUM_DESIG_CP          ;; Adjust the number of code pages left
 0264  49			        DEC   CX                       ;;
 0265  89 0E 0000 E		        MOV   NUM_DESIG_CP,CX          ;;
				                                       ;;
 0269  E9 01C2 R		        JMP   TB_CPN_BEGIN             ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 026C				TB_DONE:                               ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-10


 026C  8B 0E 000A R		        MOV   CX,RESIDENT_END_ACC      ;;  Set final calculated value
 0270  03 CD			        ADD   CX,BP                    ;;;;;;;;;;;
 0272  2B 0E 001A R		        SUB   CX,SD_AREA_DIFFERENCE             ;;  Adjust for relocation
 0276  8E 06 0000 E		        MOV   ES,WORD PTR SHARED_AREA_PTR       ;;    Set segment
 027A  8B 2E 0002 E		        MOV   BP,WORD PTR SHARED_AREA_PTR+2     ;;
 027E  26: 3B 4E 20		        CMP   CX,ES:[BP].RESIDENT_END           ;;
 0282  76 03			        JNA   TB_DONE_CONTINUE1        ;;;;;;;;;;;
 0284  EB 50 90			        JMP   TB_ERROR5                ;;
				                                       ;;
 0287				TB_DONE_CONTINUE1:                     ;;
 0287  26: 83 7E 20 FF		        CMP   ES:[BP].RESIDENT_END,-1  ;;
 028C  75 0C			        JNE   DONT_REPLACE             ;;
 028E  0E			        PUSH  CS                       ;;
 028F  07			        POP   ES                       ;;
 0290  BD 0000 E		        MOV   BP,OFFSET SD_SOURCE_PTR  ;;
 0293  26: 89 4E 20		        MOV   ES:[BP].RESIDENT_END,CX  ;;  Save resident end
 0297  EB 06 90			        JMP   CONTINUE_2_END           ;;
				                                       ;;
 029A				DONT_REPLACE:                          ;;
 029A  0E			        PUSH  CS                       ;;
 029B  07			        POP   ES                       ;;
 029C  BD 0000 E		        MOV   BP,OFFSET SD_SOURCE_PTR  ;;
				                                       ;;
 029F				CONTINUE_2_END:                        ;;
 029F  81 E9 0000 E		        SUB   CX,OFFSET SD_DEST_PTR    ;;  Calculate # of bytes to copy
 02A3  89 0E 001C R		        MOV   SD_LENGTH,CX             ;;
				                                       ;;
 02A7  33 C9			        XOR   CX,CX                    ;;  Set valid completion return code
 02A9  89 0E 0000 E		        MOV   TB_RETURN_CODE,CX        ;;
 02AD  C3			        RET                            ;;
				                                       ;;
 02AE				TB_CPN_INVALID:                        ;;
 02AE  83 F9 01			        CMP   CX,1                     ;;  Set error 1 return code
 02B1  75 05			        JNE   TB_ERROR2                ;;
 02B3  89 0E 0000 E		        MOV   TB_RETURN_CODE,CX        ;;
 02B7  C3			        RET                            ;;
				                                       ;;
 02B8				TB_ERROR2:                             ;;
 02B8  83 F9 02			        CMP   CX,2                     ;;  Set error 2 return code
 02BB  75 05			        JNE   TB_ERROR3                ;;
 02BD  89 0E 0000 E		        MOV   TB_RETURN_CODE,CX        ;;
 02C1  C3			        RET                            ;;
				                                       ;;
 02C2				TB_ERROR3:                             ;;
 02C2  83 F9 03			        CMP   CX,3                     ;;  Set error 3 return code
 02C5  75 05			        JNE   TB_ERROR4                ;;
 02C7  89 0E 0000 E		        MOV   TB_RETURN_CODE,CX        ;;
 02CB  C3			        RET                            ;;
				                                       ;;
 02CC				TB_ERROR4:                             ;;
 02CC  83 F9 04			        CMP   CX,4                     ;;  Set error 4 return code
 02CF  75 05			        JNE   TB_ERROR5                ;;
 02D1  89 0E 0000 E		        MOV   TB_RETURN_CODE,CX        ;;
 02D5  C3			        RET                            ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-11


				                                       ;;
 02D6				TB_ERROR5:                             ;;
 02D6  B9 0005			        MOV   CX,5                     ;;  Set error 5 return code
 02D9  89 0E 0000 E		        MOV   TB_RETURN_CODE,CX        ;;
 02DD  C3			        RET                            ;;
				                                       ;;
 02DE				TB_ERROR6:                             ;;
 02DE  8B 1E 0014 R		        MOV   BX,TB_CODE_PAGE_PARM     ;;
 02E2  B9 0006			        MOV   CX,6                     ;;
 02E5  89 0E 0000 E		        MOV   TB_RETURN_CODE,CX        ;;  Set error 6 return code
 02E9  C3			        RET                            ;;
				                                       ;;
 02EA				TABLE_BUILD          ENDP              ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; Module: STATE_BUILD
				;;
				;; Description:
				;;     Create the state/xlat section within the specific translate section.
				;;
				;; Input Registers:
				;;     DS - points to our data segment
				;;     ES - points to our data segment
				;;     SB_STATE_OFFSET - offset to the beginning of the info in Keyb Def SYS
				;;     DI - offset of the beginning of the area used to build states
				;;
				;;     KEYBSYS_FILE_HANDLE - handle of the KEYBOARD.SYS file
				;;
				;; Output Registers:
				;;     DI  - offset of the end of the area used by STATE_BUILD
				;;
				;;     CX - Return Code := 0  -  State build successful
				;;                         4  -  State build unsuccessful
				;;                              (Bad or missing Keyboard Def file)
				;;
				;; Logic:
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                               ;;
 02EA  0000			END_OF_AREA_PTR      DW    0                   ;;
 02EC  0000			SB_FIRST_STATE       DW    0                   ;;
 02EE  0000			SB_STATE_LENGTH      DW    0                   ;;
 02F0  00000000			SB_STATE_OFFSET      DD    0                   ;;
 02F4  0000			STATE_LENGTH         DW    0                   ;;
 02F6  0000			RESTORE_BP           DW    ?                   ;;
				                                               ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;  Program Code
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 02F8				STATE_BUILD          PROC NEAR         ;;
				                                       ;;
 02F8  8B F7			        MOV   SI,DI                    ;;  Get the tally pointer
 02FA  89 3E 02EA R		        MOV   END_OF_AREA_PTR,DI       ;;  Save pointer
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-12


				                                       ;;
 02FE  89 2E 02F6 R		        MOV   RESTORE_BP,BP            ;;  Save the base pointer
				                                       ;;;;;;;;;
 0302  8B 1E 0000 E		        MOV   BX,KEYBSYS_FILE_HANDLE          ;; Get handle
 0306  8B 16 02F0 R		        MOV   DX,WORD PTR SB_STATE_OFFSET     ;; LSEEK file pointer
 030A  8B 0E 02F2 R		        MOV   CX,WORD PTR SB_STATE_OFFSET+2   ;;    back to top of XLAT table
 030E  B4 42			        MOV   AH,42H                          ;;
 0310  B0 00			        MOV   AL,0                     ;;;;;;;;; If no problem with
 0312  CD 21			        INT   21H                      ;;     Keyboard Def file THEN
 0314  73 03			        JNC   SB_FIRST_HEADER          ;;
 0316  E9 03E7 R		        JMP   SB_ERROR4                ;;
				                                       ;;
 0319				SB_FIRST_HEADER:                       ;;
 0319  33 ED			        XOR   BP,BP                    ;;
 031B  8D 4E 04			        LEA   CX,[BP].KX_FIRST_STATE   ;; Set number of bytes to read header
 031E  8B D7			        MOV   DX,DI                    ;;
 0320  06			        PUSH  ES                       ;;
 0321  1F			        POP   DS                       ;;
 0322  B4 3F			        MOV   AH,3FH                   ;; read in the header
 0324  CD 21			        INT   21H                      ;;
 0326  0E			        PUSH  CS                       ;;
 0327  1F			        POP   DS                       ;;
 0328  73 03			        JNC   SB_HEAD_CONTINUE1        ;;
 032A  E9 03E7 R		        JMP   SB_ERROR4                ;;
				                                       ;;
 032D				SB_HEAD_CONTINUE1:                     ;;
 032D  8B 16 0002 R		        MOV   DX,NEXT_SECT_PTR         ;;
 0331  83 FA FF			        CMP   DX,-1                    ;;
 0334  74 04			        JE    SB_HEAD_CONTINUE2        ;;
 0336  2B 16 001A R		        SUB   DX,SD_AREA_DIFFERENCE    ;;  Adjust for relocation
				                                       ;;;;;
 033A				SB_HEAD_CONTINUE2:                        ;;
 033A  26: 89 15		        MOV   ES:[DI].XS_NEXT_SECT_PTR,DX ;;
 033D  83 FA FF			        CMP   DX,-1                       ;;
 0340  74 04			        JE    SB_HEAD_CONTINUE3        ;;;;;
 0342  03 16 001A R		        ADD   DX,SD_AREA_DIFFERENCE    ;;  Adjust for relocation
				                                       ;;
 0346				SB_HEAD_CONTINUE3:                     ;;
 0346  03 F9			        ADD   DI,CX                    ;; Update the DI pointer
				                                       ;;
 0348				SB_NEXT_STATE:                         ;;
 0348  33 ED			        XOR   BP,BP                    ;;  Set number
 034A  8D 4E 02			        LEA   CX,[BP].KX_STATE_ID      ;;     bytes to read state length
 034D  8B D7			        MOV   DX,DI                    ;;  Read the header into the
 034F  8B 1E 0000 E		        MOV   BX,KEYBSYS_FILE_HANDLE   ;;     SHARED_DATA_AREA
 0353  06			        PUSH  ES                       ;;
 0354  1F			        POP   DS                       ;;
 0355  B4 3F			        MOV   AH,3FH                   ;;
 0357  CD 21			        INT   21H                      ;;
				                                       ;;
 0359				SB_CONTINUE1:                          ;;
 0359  0E			        PUSH  CS                       ;; Reset the data segment
 035A  1F			        POP   DS                       ;;
 035B  26: 8B 0D		        MOV   CX,ES:[DI].KX_STATE_LEN  ;; If the length of the state section
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-13


 035E  89 0E 02F4 R		        MOV   STATE_LENGTH,CX          ;;
 0362  83 C7 02			        ADD   DI,2                     ;;  is zero then done
 0365  83 F9 00			        CMP   CX,0                     ;;
 0368  74 61			        JE    SB_DONE                  ;;
 036A  33 ED			        XOR   BP,BP                    ;;  Set number
 036C  8D 4E 05			        LEA   CX,[BP].KX_FIRST_XLAT-2  ;;     bytes to read state length
 036F  8B D7			        MOV   DX,DI                    ;;  Read the header into the
 0371  8B 1E 0000 E		        MOV   BX,KEYBSYS_FILE_HANDLE   ;;     SHARED_DATA_AREA
 0375  06			        PUSH  ES                       ;;
 0376  1F			        POP   DS                       ;;
 0377  B4 3F			        MOV   AH,3FH                   ;;
 0379  CD 21			        INT   21H                      ;;
				                                       ;;
 037B				SB_CONTINUE1A:                         ;;
 037B  0E			        PUSH  CS                       ;; Reset the data segment
 037C  1F			        POP   DS                       ;;
 037D  83 EF 02			        SUB   DI,2                     ;;
 0380  26: 8B 45 03		        MOV   AX,ES:[DI].XS_KBD_TYPE   ;;   Get the keyboard type def
 0384  85 06 0000 E		        TEST  AX,HW_TYPE               ;;   Does it match our hardware?
 0388  75 12			        JNZ   SB_CONTINUE2             ;;
 038A  26: 8B 15		        MOV   DX,ES:[DI].XS_STATE_LEN  ;;     No, then
 038D  8D 4E 07			        LEA   CX,[BP].KX_FIRST_XLAT    ;;
 0390  2B D1			        SUB   DX,CX                    ;;
 0392  33 C9			        XOR   CX,CX                    ;;
 0394  B4 42			        MOV   AH,42H                   ;;          LSEEK past this state
 0396  B0 01			        MOV   AL,01H                   ;;
 0398  CD 21			        INT   21H                      ;;
 039A  EB AC			        JMP   SB_NEXT_STATE            ;;
				                                       ;;
 039C				SB_CONTINUE2:                          ;;     Yes, then
 039C  B8 0007			        MOV   AX,SIZE STATE_STR-1      ;;
 039F  03 F8			        ADD   DI,AX                    ;;  Set PTR and end of header
				                                       ;;
 03A1				SB_XLAT_TAB_BEGIN:                     ;;  Begin getting xlat tables
 03A1  8B 1E 0000 E		        MOV   BX,KEYBSYS_FILE_HANDLE   ;;
 03A5  8D 56 07			        LEA   DX,[BP].KX_FIRST_XLAT    ;;  Adjust for what we have already read
 03A8  8B 0E 02F4 R		        MOV   CX,STATE_LENGTH          ;;
 03AC  2B CA			        SUB   CX,DX                    ;;
 03AE  8B D7			        MOV   DX,DI                    ;;
 03B0  06			        PUSH  ES                       ;;
 03B1  1F			        POP   DS                       ;;
 03B2  B4 3F			        MOV   AH,3FH                   ;;  Read in the xlat tables
 03B4  CD 21			        INT   21H                      ;;
 03B6  0E			        PUSH  CS                       ;;
 03B7  1F			        POP   DS                       ;;
 03B8  73 03			        JNC   SB_CONTINUE4             ;;
 03BA  EB 2B 90			        JMP   SB_ERROR4                ;;
				                                       ;;
 03BD				SB_CONTINUE4:                          ;;
 03BD  3B C8			        CMP   CX,AX                    ;;
 03BF  74 03			        JE    SB_ERROR_CHECK1          ;;
 03C1  EB 24 90			        JMP   SB_ERROR4                ;;
				                                       ;;
 03C4				SB_ERROR_CHECK1:                       ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-14


 03C4  03 F9			        ADD   DI,CX                    ;;  Update the end of area ptr
				                                       ;;
 03C6  8B F7			        MOV   SI,DI                    ;;
 03C8  E9 0348 R		        JMP   SB_NEXT_STATE            ;;
				                                       ;;
 03CB				SB_DONE:                               ;;
 03CB  B8 FFFF			        MOV   AX,-1                    ;;
 03CE  8B 36 02EA R		        MOV   SI,END_OF_AREA_PTR       ;;
 03D2  89 36 0002 R		        MOV   NEXT_SECT_PTR,SI         ;;
				                                       ;;
 03D6  8B 2E 02F6 R		        MOV   BP,RESTORE_BP            ;;
 03DA  C3			        RET                            ;;
				                                       ;;
 03DB				SB_ERROR1:                             ;;
 03DB  B9 0001			        MOV   CX,1                     ;;
 03DE  C3			        RET                            ;;
				                                       ;;
 03DF				SB_ERROR2:                             ;;
 03DF  B9 0002			        MOV   CX,2                     ;;
 03E2  C3			        RET                            ;;
				                                       ;;
 03E3				SB_ERROR3:                             ;;
 03E3  B9 0003			        MOV   CX,3                     ;;
 03E6  C3			        RET                            ;;
				                                       ;;
 03E7				SB_ERROR4:                             ;;
 03E7  B9 0004			        MOV   CX,4                     ;;
 03EA  C3			        RET                            ;;
				                                       ;;
				                                       ;;
 03EB				STATE_BUILD          ENDP              ;;
				                                       ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;
				;; Module: FIND_CP_TABLE
				;;
				;; Description:
				;;     Determine the offset of the specified code page table in KEYBOARD.SYS
				;;
				;; Input Registers:
				;;     DS - points to our data segment
				;;     ES - points to our data segment
				;;     AX - ASCII representation of the language parm
				;;     BX - binary representation of the code page
				;;
				;;     KEYBSYS_FILE_HANDLE - handle of the KEYBOARD.SYS file
				;;
				;; Output Registers:
				;;     CP_TAB_OFFSET - offset of the CP table in KEYBOARD.SYS
				;;
				;;     CX - Return Code := 0  -  State build successful
				;;                         2  -  Invalid Code page for language
				;;                         4  -  Bad or missing Keyboard Def file
				;; Logic:
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-15


				;;
				;;     READ language table
				;;     IF error in reading file THEN
				;;         Display ERROR message and EXIT
				;;     ELSE
				;;         Use table to verify language parm
				;;         Set pointer values
				;;         IF code page was specified
				;;             READ language entry
				;;             IF error in reading file THEN
				;;                  Display ERROR message and EXIT
				;;             ELSE
				;;                  READ Code page table
				;;                  IF error in reading file THEN
				;;                      Display ERROR message and EXIT
				;;                  ELSE
				;;                      Use table to get the offset of the code page parm
				;;    RET
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                               ;;
 03EB  0000			FIND_CP_PARM          DW    ?                  ;;
				                                               ;;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				;;  Program Code
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
				                                       ;;
 03ED				FIND_CP_TABLE          PROC  NEAR      ;;
				                                       ;;
				                                       ;;
 03ED  89 1E 03EB R		        MOV   FIND_CP_PARM,BX          ;; Save Code page
				                                       ;;;;;;;;;;;;;;
 03F1  8B 1E 0000 E		        MOV   BX,KEYBSYS_FILE_HANDLE               ;; Get handle
 03F5  8B 16 0000 E		        MOV   DX,WORD PTR KEYBCMD_LANG_ENTRY_PTR   ;; LSEEK file pointer
 03F9  8B 0E 0002 E		        MOV   CX,WORD PTR KEYBCMD_LANG_ENTRY_PTR+2 ;;  to top of language entry
 03FD  B4 42			        MOV   AH,42H                               ;;
 03FF  B0 00			        MOV   AL,0                     ;;;;;;;;;;;;;; If no problem with
 0401  CD 21			        INT   21H                      ;;     Keyb Def file Then
 0403  73 03			        JNC   FIND_BEGIN               ;;
 0405  EB 68 90			        JMP   FIND_CP_ERROR4           ;;
				                                       ;;;;;;;;;
 0408				FIND_BEGIN:                                   ;;
 0408  8B F8			        MOV   DI,AX                           ;;
 040A  B9 000A			        MOV   CX,SIZE KEYBSYS_LANG_ENTRY-1    ;; Set number
				                                              ;;        bytes to read header
 040D  BA 0000 E		        MOV   DX,OFFSET FILE_BUFFER    ;;;;;;;;;
 0410  B4 3F			        MOV   AH,3FH                   ;; Read language entry in
 0412  CD 21			        INT   21H                      ;;        KEYBOARD.SYS file
 0414  73 03			        JNC   FIND_VALID4              ;; If no error in opening file then
 0416  EB 57 90			        JMP   FIND_CP_ERROR4           ;;
				                                       ;;
 0419				FIND_VALID4:                           ;;
				;****************************** CNS *******************************************
 0419  32 E4			        xor   ah,ah
 041B  A0 0009 E		        mov   al,FB.KL_NUM_CP
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-16


				;****************************** CNS *******************************************
 041E  A3 0000 E		        MOV   NUM_CP,AX                ;; Save the number of code pages
 0421  F7 26 0000 E		        MUL   CP_PTR_SIZE              ;; Determine # of bytes to read
 0425  BA 0000 E		        MOV   DX,OFFSET FILE_BUFFER    ;; Establish beginning of buffer
 0428  8B C8			        MOV   CX,AX                    ;;
 042A  81 F9 0000 E		        CMP   CX,FILE_BUFFER_SIZE      ;; Make sure buffer is not to small
 042E  76 03			        JBE   FIND_VALID5              ;;
 0430  EB 3D 90			        JMP   FIND_CP_ERROR4           ;;
				                                       ;;
 0433				FIND_VALID5:                           ;;
 0433  B4 3F			        MOV   AH,3FH                   ;; Read code page table from
 0435  CD 21			        INT   21H                      ;;              KEYBOARD.SYS file
 0437  73 03			        JNC   FIND_VALID6              ;; If no error in opening file then
 0439  EB 34 90			        JMP   FIND_CP_ERROR4           ;;
				                                       ;;
 043C				FIND_VALID6:                           ;;
 043C  8B 0E 0000 E		        MOV   CX,NUM_CP                ;;    Number of valid codes
 0440  BF 0000 E		        MOV   DI,OFFSET FILE_BUFFER    ;;    Point to correct word in table
				                                       ;;
 0443				F_SCAN_CP_TABLE:                       ;; FOR code page parm
 0443  A1 03EB R		        MOV   AX,FIND_CP_PARM          ;;    Get parameter
 0446  39 05			        CMP   [DI].KC_CODE_PAGE,AX     ;;    Valid Code ??
 0448  74 0A			        JE    F_CODE_PAGE_FOUND        ;; If not found AND more entries THEN
 044A  03 3E 0000 E		        ADD   DI,LANG_PTR_SIZE         ;;    Check next entry
 044E  49			        DEC   CX                       ;;    Decrement count of entries
 044F  75 F2			        JNE   F_SCAN_CP_TABLE          ;; Else
 0451  EB 14 90			        JMP   FIND_CP_ERROR2           ;;    Display error message
				                                       ;;;;;;;;;;
 0454				F_CODE_PAGE_FOUND:                             ;;
 0454  8B 45 02			        MOV   AX,WORD PTR [DI].KC_ENTRY_PTR    ;;
 0457  A3 0000 E		        MOV   WORD PTR CP_TAB_OFFSET,AX        ;;
 045A  8B 45 04			        MOV   AX,WORD PTR [DI].KC_ENTRY_PTR+2  ;;
 045D  A3 0002 E		        MOV   WORD PTR CP_TAB_OFFSET+2,AX      ;;
				                                               ;;
 0460  33 C9			        XOR   CX,CX                    ;;;;;;;;;;
 0462  C3			        RET                            ;;
				                                       ;;
 0463				FIND_CP_ERROR1:                        ;;
 0463  B9 0001			        MOV   CX,1                     ;;
 0466  C3			        RET                            ;;
				                                       ;;
 0467				FIND_CP_ERROR2:                        ;;
 0467  B9 0002			        MOV   CX,2                     ;;
 046A  C3			        RET                            ;;
				                                       ;;
 046B				FIND_CP_ERROR3:                        ;;
 046B  B9 0003			        MOV   CX,3                     ;;
 046E  C3			        RET                            ;;
				                                       ;;
 046F				FIND_CP_ERROR4:                        ;;
 046F  B9 0004			        MOV   CX,4                     ;;
 0472  C3			        RET                            ;;
				                                       ;;
 0473				FIND_CP_TABLE         ENDP             ;;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Page     1-17


				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 0473				CODE   ENDS
				       END    TABLE_BUILD
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Symbols-1


Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

DESIG_CP_STRUC . . . . . . . . .  	0008	0004
  NUM_DESIGNATES . . . . . . . .  	0000
  NUM_FONTS  . . . . . . . . . .  	0002
  NUM_HW_CPS . . . . . . . . . .  	0004
  DESIG_CP_ENTRY . . . . . . . .  	0006
KEYBSYS_CP_PTRS  . . . . . . . .  	0006	0002
  KC_CODE_PAGE . . . . . . . . .  	0000
  KC_ENTRY_PTR . . . . . . . . .  	0002
KEYBSYS_HEADER . . . . . . . . .  	001D	0009
  KH_SIGNATURE . . . . . . . . .  	0000
  KH_RESV_1  . . . . . . . . . .  	0008
  KH_MAX_COM_SZ  . . . . . . . .  	0010
  KH_MAX_SPEC_SZ . . . . . . . .  	0012
  KH_MAX_LOGIC_SZ  . . . . . . .  	0014
  KH_RESV_2  . . . . . . . . . .  	0016
  KH_NUM_ID  . . . . . . . . . .  	0018
  KH_NUM_LANG  . . . . . . . . .  	001A
  KH_LANG_PTRS . . . . . . . . .  	001C
KEYBSYS_ID_PTRS  . . . . . . . .  	0006	0002
  KP_ID_CODE . . . . . . . . . .  	0000
  KP_LANG_PTR  . . . . . . . . .  	0002
KEYBSYS_LANG_ENTRY . . . . . . .  	000B	0006
  KL_LANG_CODE . . . . . . . . .  	0000
  KL_ID_CODE . . . . . . . . . .  	0002
  KL_LOGIC_PTR . . . . . . . . .  	0004
  KL_NUM_ID  . . . . . . . . . .  	0008
  KL_NUM_CP  . . . . . . . . . .  	0009
  KL_CP_PTRS . . . . . . . . . .  	000A
KEYBSYS_LANG_PTRS  . . . . . . .  	0006	0002
  KP_LANG_CODE . . . . . . . . .  	0000
  KP_ENTRY_PTR . . . . . . . . .  	0002
KEYBSYS_STATE  . . . . . . . . .  	0008	0005
  KX_STATE_LEN . . . . . . . . .  	0000
  KX_STATE_ID  . . . . . . . . .  	0002
  KX_KBD_TYPE  . . . . . . . . .  	0003
  KX_ERROR_CHAR  . . . . . . . .  	0005
  KX_FIRST_XLAT  . . . . . . . .  	0007
KEYBSYS_STATE_LOGIC  . . . . . .  	0005	0003
  KT_LOGIC_LEN . . . . . . . . .  	0000
  KT_SPECIAL_FEATURES  . . . . .  	0002
  KT_LOGIC_CMDS  . . . . . . . .  	0004
KEYBSYS_XLAT_SECT  . . . . . . .  	0005	0003
  KX_SECTION_LEN . . . . . . . .  	0000
  KX_CP_ID . . . . . . . . . . .  	0002
  KX_FIRST_STATE . . . . . . . .  	0004
PARM_LIST  . . . . . . . . . . .  	000E	0009
  RET_CODE_1 . . . . . . . . . .  	0000
  RET_CODE_2 . . . . . . . . . .  	0001
  RET_CODE_3 . . . . . . . . . .  	0002
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Symbols-2


  RET_CODE_4 . . . . . . . . . .  	0003
  LANGUAGE_PARM  . . . . . . . .  	0004
  CODE_PAGE_PARM . . . . . . . .  	0006
  PATH_OFFSET  . . . . . . . . .  	0008
  PATH_LENGTH  . . . . . . . . .  	000A
  ID_PARM  . . . . . . . . . . .  	000C
SET_FLAG_STR . . . . . . . . . .  	0004	0004
  SF_NUM . . . . . . . . . . . .  	0000
  SF_SCAN_CODE . . . . . . . . .  	0001
  SF_FLAG_ID . . . . . . . . . .  	0002
  SF_FLAG_MASK . . . . . . . . .  	0003
SHARED_DATA_STR  . . . . . . . .  	0030	0017
  OLD_INT_9  . . . . . . . . . .  	0000
  OLD_INT_2F . . . . . . . . . .  	0004
  OLD_INT_48 . . . . . . . . . .  	0008
  KEYB_TYPE  . . . . . . . . . .  	000C
  SYSTEM_FLAG  . . . . . . . . .  	000E
  TABLE_OK . . . . . . . . . . .  	0010
  JR_KB_FLAG . . . . . . . . . .  	0011
  TIMING_FACTOR  . . . . . . . .  	0012
  ACTIVE_LANGUAGE  . . . . . . .  	0016
  INVOKED_CP_TABLE . . . . . . .  	0018
  INVOKED_KBD_ID . . . . . . . .  	001A
  ACTIVE_XLAT_PTR  . . . . . . .  	001C
  FIRST_XLAT_PTR . . . . . . . .  	001E
  RESIDENT_END . . . . . . . . .  	0020
  LOGIC_PTR  . . . . . . . . . .  	0022
  COMMON_XLAT_PTR  . . . . . . .  	0024
  SPECIAL_FEATURES . . . . . . .  	0026
  TABLE_OVERFLOW . . . . . . . .  	0028
  HOT_KEY_ON_SCAN  . . . . . . .  	0029
  HOT_KEY_OFF_SCAN . . . . . . .  	002A
  TABLE_AREA . . . . . . . . . .  	002F
STATE_LOGIC_STR  . . . . . . . .  	0005	0003
  SL_LOGIC_LEN . . . . . . . . .  	0000
  SL_SPECIAL_FEATURES  . . . . .  	0002
  SL_LOGIC_CMDS  . . . . . . . .  	0004
STATE_STR  . . . . . . . . . . .  	0008	0005
  XS_STATE_LEN . . . . . . . . .  	0000
  XS_STATE_ID  . . . . . . . . .  	0002
  XS_KBD_TYPE  . . . . . . . . .  	0003
  XS_ERROR_CHAR  . . . . . . . .  	0005
  XS_FIRST_TAB . . . . . . . . .  	0007
XLAT_SECT_STR  . . . . . . . . .  	0005	0003
  XS_NEXT_SECT_PTR . . . . . . .  	0000
  XS_CP_ID . . . . . . . . . . .  	0002
  XS_FIRST_STATE . . . . . . . .  	0004
XLAT_STR . . . . . . . . . . . .  	0003	0002
  XLAT_TAB_SIZE  . . . . . . . .  	0000
  XLAT_OPTIONS . . . . . . . . .  	0002
XLAT_TYPE_1_STR  . . . . . . . .  	0006	0004
  XLAT_SCAN_LO . . . . . . . . .  	0003
  XLAT_SCAN_HI . . . . . . . . .  	0004
  XLAT_1_BUF_ENTRY . . . . . . .  	0005
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Symbols-3


XLAT_TYPE_2_STR  . . . . . . . .  	0006	0004
  XLAT_NUM . . . . . . . . . . .  	0003
  XLAT_SCAN  . . . . . . . . . .  	0004
  XLAT_2_BUF_ENTRY . . . . . . .  	0005

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CODE . . . . . . . . . . . . . .  	0473	PARA	PUBLIC	'CODE'

Symbols:            

                N a m e         	Type	 Value	 Attr

ANDF_COMMAND . . . . . . . . . .  	NUMBER	0010	
ANY_KB . . . . . . . . . . . . .  	NUMBER	FFFF	
ASCII_ONLY . . . . . . . . . . .  	NUMBER	0080	
ASC_ONLY_TAB_2_ENT_SZ  . . . . .  	NUMBER	0002	
AT_KB  . . . . . . . . . . . . .  	NUMBER	2000	

BEEP_COMMAND . . . . . . . . . .  	NUMBER	00A0	

CHECK_CORE_COMMAND . . . . . . .  	NUMBER	00C0	
COMMAND_BITS . . . . . . . . . .  	NUMBER	00F0	
COMMAND_SHIFT  . . . . . . . . .  	NUMBER	0004	
CONTINUE_2_END . . . . . . . . .  	L NEAR	029F	CODE
COPY_SD_AREA . . . . . . . . . .  	L NEAR	0000	CODE	External
CPN_INVALID  . . . . . . . . . .  	L WORD	0016	CODE	Global
CP_PTR_SIZE  . . . . . . . . . .  	V WORD	0000	CODE	External
CP_TAB_OFFSET  . . . . . . . . .  	V DWORD	0000	CODE	External

DEFAULT_TAB_2_ENT_SZ . . . . . .  	NUMBER	0003	
DESIG_CP_BUFFER  . . . . . . . .  	V WORD	0000	CODE	External
DESIG_CP_OFFSET  . . . . . . . .  	V WORD	0000	CODE	External
DONT_REPLACE . . . . . . . . . .  	L NEAR	029A	CODE

EITHER_ALT . . . . . . . . . . .  	NUMBER	0020	
EITHER_CTL . . . . . . . . . . .  	NUMBER	0040	
EITHER_SHIFT . . . . . . . . . .  	NUMBER	0080	
ELSEF_COMMAND  . . . . . . . . .  	NUMBER	0020	
ENDIFF_COMMAND . . . . . . . . .  	NUMBER	0030	
END_OF_AREA_PTR  . . . . . . . .  	L WORD	02EA	CODE
EXIT_IF_FOUND  . . . . . . . . .  	NUMBER	0080	
EXIT_INT_9_FLAG  . . . . . . . .  	NUMBER	0001	
EXIT_STATE_LOGIC_FLAG  . . . . .  	NUMBER	0002	
EXT_16 . . . . . . . . . . . . .  	NUMBER	8000	
EXT_KB_FLAG_ID . . . . . . . . .  	NUMBER	0004	

F1_SCAN  . . . . . . . . . . . .  	NUMBER	003B	
F2_SCAN  . . . . . . . . . . . .  	NUMBER	003C	
FB . . . . . . . . . . . . . . .  	ALIAS	 FILE_BUFFER		
FILE_BUFFER  . . . . . . . . . .  	V WORD	0000	CODE	External
FILE_BUFFER_SIZE . . . . . . . .  	NUMBER	0000		Communal
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Symbols-4


FIND_BEGIN . . . . . . . . . . .  	L NEAR	0408	CODE
FIND_CP_ERROR1 . . . . . . . . .  	L NEAR	0463	CODE
FIND_CP_ERROR2 . . . . . . . . .  	L NEAR	0467	CODE
FIND_CP_ERROR3 . . . . . . . . .  	L NEAR	046B	CODE
FIND_CP_ERROR4 . . . . . . . . .  	L NEAR	046F	CODE
FIND_CP_PARM . . . . . . . . . .  	L WORD	03EB	CODE
FIND_CP_TABLE  . . . . . . . . .  	N PROC	03ED	CODE	Global	Length = 0086
FIND_KEYB_TYPE . . . . . . . . .  	L NEAR	0000	CODE	External
FIND_SYS_TYPE  . . . . . . . . .  	L NEAR	0000	CODE	External
FIND_VALID4  . . . . . . . . . .  	L NEAR	0419	CODE
FIND_VALID5  . . . . . . . . . .  	L NEAR	0433	CODE
FIND_VALID6  . . . . . . . . . .  	L NEAR	043C	CODE
FIRST_XLAT_TAB . . . . . . . . .  	L WORD	0000	CODE
FLAG_ID_BITS . . . . . . . . . .  	NUMBER	0007	
F_CODE_PAGE_FOUND  . . . . . . .  	L NEAR	0454	CODE
F_SCAN_CP_TABLE  . . . . . . . .  	L NEAR	0443	CODE

GOTO_COMMAND . . . . . . . . . .  	NUMBER	0090	
G_KB . . . . . . . . . . . . . .  	NUMBER	1000	

HOT_KEY_SET  . . . . . . . . . .  	L NEAR	0122	CODE
HW_TYPE  . . . . . . . . . . . .  	V WORD	0000	CODE	External

ID_PTR_SIZE  . . . . . . . . . .  	V WORD	0000	CODE	External
IFF_COMMAND  . . . . . . . . . .  	NUMBER	0000	
IFKBD_COMMAND  . . . . . . . . .  	NUMBER	0080	
INT_2F_SUB_FUNC  . . . . . . . .  	NUMBER	00AD	

JR_HOT_KEY_1_2 . . . . . . . . .  	NUMBER	4000	
JR_KB  . . . . . . . . . . . . .  	NUMBER	8000	

KB_FLAG_1_ID . . . . . . . . . .  	NUMBER	0001	
KB_FLAG_2_ID . . . . . . . . . .  	NUMBER	0002	
KB_FLAG_3_ID . . . . . . . . . .  	NUMBER	0003	
KB_FLAG_ID . . . . . . . . . . .  	NUMBER	0000	
KB_MASK  . . . . . . . . . . . .  	NUMBER	0002	
KEYBCMD_LANG_ENTRY_PTR . . . . .  	V DWORD	0000	CODE	External
KEYBSYS_FILE_HANDLE  . . . . . .  	V WORD	0000	CODE	External
KEYB_COMMAND . . . . . . . . . .  	L NEAR	0000	CODE	External
KEYB_INSTALLED . . . . . . . . .  	L WORD	0018	CODE

LANG_MODE  . . . . . . . . . . .  	NUMBER	00FF	
LANG_PTR_SIZE  . . . . . . . . .  	V WORD	0000	CODE	External

MAX_COM_SIZE . . . . . . . . . .  	L WORD	0004	CODE
MAX_LOGIC_SIZE . . . . . . . . .  	L WORD	0008	CODE
MAX_SPEC_SIZE  . . . . . . . . .  	L WORD	0006	CODE

NEXT_SECT_PTR  . . . . . . . . .  	L WORD	0002	CODE
NLS_FLAG_1_ID  . . . . . . . . .  	NUMBER	0005	
NLS_FLAG_2_ID  . . . . . . . . .  	NUMBER	0006	
NO . . . . . . . . . . . . . . .  	NUMBER	0000	
NOT_TEST . . . . . . . . . . . .  	NUMBER	0008	
NULL_ASCII_CODE  . . . . . . . .  	NUMBER	-0001	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Symbols-5


NUM_BIOS_FLAGS . . . . . . . . .  	NUMBER	0004	
NUM_COMMANDS . . . . . . . . . .  	NUMBER	000C	
NUM_CP . . . . . . . . . . . . .  	V WORD	0000	CODE	External
NUM_DESIG_CP . . . . . . . . . .  	V WORD	0000	CODE	External
NUM_FLAGS  . . . . . . . . . . .  	NUMBER	0007	
NUM_ID . . . . . . . . . . . . .  	V WORD	0000	CODE	External
NUM_LANG . . . . . . . . . . . .  	V WORD	0000	CODE	External
NUM_NLS_FLAGS  . . . . . . . . .  	NUMBER	0002	

ONE_SCAN . . . . . . . . . . . .  	NUMBER	0002	
OPTION_COMMAND . . . . . . . . .  	NUMBER	0050	

P12_KB . . . . . . . . . . . . .  	NUMBER	0400	
PARM_LIST_OFFSET . . . . . . . .  	L WORD	000E	CODE
PC_386 . . . . . . . . . . . . .  	NUMBER	0200	
PC_AT  . . . . . . . . . . . . .  	NUMBER	4000	
PC_JR  . . . . . . . . . . . . .  	NUMBER	0800	
PC_LAP . . . . . . . . . . . . .  	NUMBER	2000	
PC_NET . . . . . . . . . . . . .  	NUMBER	0100	
PC_PAL . . . . . . . . . . . . .  	NUMBER	0400	
PC_XT  . . . . . . . . . . . . .  	NUMBER	1000	
PUT_ERROR_COMMAND  . . . . . . .  	NUMBER	0070	
P_KB . . . . . . . . . . . . . .  	NUMBER	0800	

RESET_NLS_COMMAND  . . . . . . .  	NUMBER	00B0	
RESIDENT_END_ACC . . . . . . . .  	L WORD	000A	CODE
RESTORE_BP . . . . . . . . . . .  	L WORD	02F6	CODE

SA_HEADER_SIZE . . . . . . . . .  	L WORD	000C	CODE
SB_COMM_BEGIN  . . . . . . . . .  	L NEAR	0177	CODE
SB_CONTINUE1 . . . . . . . . . .  	L NEAR	0359	CODE
SB_CONTINUE1A  . . . . . . . . .  	L NEAR	037B	CODE
SB_CONTINUE2 . . . . . . . . . .  	L NEAR	039C	CODE
SB_CONTINUE4 . . . . . . . . . .  	L NEAR	03BD	CODE
SB_DONE  . . . . . . . . . . . .  	L NEAR	03CB	CODE
SB_ERROR1  . . . . . . . . . . .  	L NEAR	03DB	CODE
SB_ERROR2  . . . . . . . . . . .  	L NEAR	03DF	CODE
SB_ERROR3  . . . . . . . . . . .  	L NEAR	03E3	CODE
SB_ERROR4  . . . . . . . . . . .  	L NEAR	03E7	CODE
SB_ERROR_CHECK1  . . . . . . . .  	L NEAR	03C4	CODE
SB_FIRST_HEADER  . . . . . . . .  	L NEAR	0319	CODE
SB_FIRST_STATE . . . . . . . . .  	L WORD	02EC	CODE
SB_HEAD_CONTINUE1  . . . . . . .  	L NEAR	032D	CODE
SB_HEAD_CONTINUE2  . . . . . . .  	L NEAR	033A	CODE
SB_HEAD_CONTINUE3  . . . . . . .  	L NEAR	0346	CODE
SB_NEXT_STATE  . . . . . . . . .  	L NEAR	0348	CODE
SB_STATE_LENGTH  . . . . . . . .  	L WORD	02EE	CODE
SB_STATE_OFFSET  . . . . . . . .  	L DWORD	02F0	CODE
SB_XLAT_TAB_BEGIN  . . . . . . .  	L NEAR	03A1	CODE
SCAN_MATCH . . . . . . . . . . .  	NUMBER	0008	
SD . . . . . . . . . . . . . . .  	ALIAS	 SHARED_DATA		
SD_AREA_DIFFERENCE . . . . . . .  	L WORD	001A	CODE
SD_DEST_PTR  . . . . . . . . . .  	V BYTE	0000	CODE	External
SD_LENGTH  . . . . . . . . . . .  	L WORD	001C	CODE	Global
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Symbols-6


SD_SOURCE_PTR  . . . . . . . . .  	V BYTE	0000	CODE	External
SET_FLAG_COMMAND . . . . . . . .  	NUMBER	0060	
SF_ENT_SZ  . . . . . . . . . . .  	NUMBER	0003	
SHARED_AREA_PTR  . . . . . . . .  	V DWORD	0000	CODE	External
SHARED_DATA  . . . . . . . . . .  	V BYTE	0000	CODE	External
STATE_BUILD  . . . . . . . . . .  	N PROC	02F8	CODE	Length = 00F3
STATE_LENGTH . . . . . . . . . .  	L WORD	02F4	CODE
STATE_LOGIC_OFFSET . . . . . . .  	V DWORD	0000	CODE	External
SUB_CMD_BITS . . . . . . . . . .  	NUMBER	000F	
SYS_CODE_PAGE  . . . . . . . . .  	V WORD	0000	CODE	External

TABLE_BUILD  . . . . . . . . . .  	N PROC	001E	CODE	Global	Length = 02CC
TB_CHECK_CONTINUE1 . . . . . . .  	L NEAR	0045	CODE
TB_CODE_PAGE_PARM  . . . . . . .  	L WORD	0014	CODE
TB_CONTINUE1 . . . . . . . . . .  	L NEAR	0084	CODE
TB_CPN_BEGIN . . . . . . . . . .  	L NEAR	01C2	CODE
TB_CPN_CONTINUE1 . . . . . . . .  	L NEAR	01E0	CODE
TB_CPN_CONTINUE2 . . . . . . . .  	L NEAR	0205	CODE
TB_CPN_CONTINUE3 . . . . . . . .  	L NEAR	0210	CODE
TB_CPN_CONTINUE4 . . . . . . . .  	L NEAR	0232	CODE
TB_CPN_CONTINUE5 . . . . . . . .  	L NEAR	023E	CODE
TB_CPN_INVALID . . . . . . . . .  	L NEAR	02AE	CODE
TB_CPN_REPEAT  . . . . . . . . .  	L NEAR	0249	CODE
TB_CPN_VALID . . . . . . . . . .  	L NEAR	01F1	CODE
TB_CPN_VALID1  . . . . . . . . .  	L NEAR	01D2	CODE
TB_CP_BEGIN  . . . . . . . . . .  	L NEAR	01BB	CODE
TB_DONE  . . . . . . . . . . . .  	L NEAR	026C	CODE
TB_DONE_CONTINUE1  . . . . . . .  	L NEAR	0287	CODE
TB_ERROR2  . . . . . . . . . . .  	L NEAR	02B8	CODE
TB_ERROR3  . . . . . . . . . . .  	L NEAR	02C2	CODE
TB_ERROR4  . . . . . . . . . . .  	L NEAR	02CC	CODE
TB_ERROR5  . . . . . . . . . . .  	L NEAR	02D6	CODE
TB_ERROR6  . . . . . . . . . . .  	L NEAR	02DE	CODE
TB_ERROR_CHECK1  . . . . . . . .  	L NEAR	008E	CODE
TB_ERROR_CHECK2  . . . . . . . .  	L NEAR	00F7	CODE
TB_ERROR_CHECK3  . . . . . . . .  	L NEAR	0165	CODE
TB_ID_PARM . . . . . . . . . . .  	L WORD	0010	CODE
TB_LANGUAGE_PARM . . . . . . . .  	L WORD	0012	CODE
TB_RETURN_CODE . . . . . . . . .  	V WORD	0000	CODE	External
TB_START . . . . . . . . . . . .  	L NEAR	0071	CODE
TB_STATE_BEGIN . . . . . . . . .  	L NEAR	00A9	CODE
TB_STATE_CONTINUE1 . . . . . . .  	L NEAR	00BD	CODE
TB_STATE_CONTINUE2 . . . . . . .  	L NEAR	00C8	CODE
TB_STATE_CONTINUE3 . . . . . . .  	L NEAR	00ED	CODE
TB_STATE_CONTINUE4 . . . . . . .  	L NEAR	0135	CODE
TB_STATE_CONTINUE5 . . . . . . .  	L NEAR	015B	CODE
TB_STATE_CONTINUE6 . . . . . . .  	L NEAR	0189	CODE
TB_STATE_CONTINUE7 . . . . . . .  	L NEAR	0194	CODE
TEMP_SHARED_DATA . . . . . . . .  	V BYTE	0000	CODE	External
TSD  . . . . . . . . . . . . . .  	ALIAS	 TEMP_SHARED_DATA		
TWO_SCAN . . . . . . . . . . . .  	NUMBER	0003	
TYPEWRITER_CAPS_LK . . . . . . .  	NUMBER	8000	
TYPE_2_TAB . . . . . . . . . . .  	NUMBER	0040	

Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:41
DOS KEYB Command  -  Transient Command Processing           Symbols-7


USE_F1_F2  . . . . . . . . . . .  	L NEAR	0118	CODE
US_MODE  . . . . . . . . . . . .  	NUMBER	0000	

XLATT_COMMAND  . . . . . . . . .  	NUMBER	0040	
XT_KB  . . . . . . . . . . . . .  	NUMBER	4000	

YES  . . . . . . . . . . . . . .  	NUMBER	0001	

ZERO_SCAN  . . . . . . . . . . .  	NUMBER	0020	

@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  keybtbbl		
@VERSION . . . . . . . . . . . .  	TEXT  510		


   1491 Source  Lines
   1491 Total   Lines
    301 Symbols

  45982 + 196915 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
