⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smckxl.asm

📁 SMSC KBC1100键盘控制器原代码
💻 ASM
📖 第 1 页 / 共 5 页
字号:
;(2Dh) B5 - Right Alternate shift     (35h) B5 - 1st Fn Lock Make Occured
;(2Ch) B4 - Left Alternate shift      (34h) B4 - Matrix Polling in progress
;(2Bh) B3 - Right Control shift       (33h) B3 - BldScanCode Break flag
;(2Ah) B2 - Left Control shift        (32h) B2 - 101 Left Extended Shift
;(29h) B1 - Fn shift                  (31h) B1 - OUTBUF full
;(28h) B0 - GhostKey Check Disabled   (30h) B0 - KEYBUF full
;
; {KSTATE5} Kbd State5 flags           {KSTATE6} Kbd State6 flags
;(47h) B7 - NumLock = Fn Pad Lock     (57h) B7 - 30 sec timer (bit 4)
;(46h) B6 - RAM Bank Select (bit2)    (56h) B6 - 30 sec timer (bit 3)
;(45h) B5 - RAM Bank Select (bit1)    (55h) B5 - 30 sec timer (bit 2)
;(44h) B4 - RAM Bank Select (bit0)    (54h) B4 - 30 sec timer (bit 1)
;(43h) B3 - 1st SwapTest has Occurred (53h) B3 - 30 sec timer (bit 0)
;(42h) B2 - 2 or more rows of 2 keys  (52h) B2 - Flashing LED Pause
;(41h) B1 - Atleast 1 row of 2 keys   (51h) B1 - Flash LEDs for password
;(40h) B0 - Two keys in same row      (50h) B0 - System Suspended
;
;{KSTATE7}Kbc Control flags             {KSTATE8}nKbc Control flags
;B7 - Mouse Driver Hot Plug support      B7 - Any Shift Key Clears Fn flag
;B6 - Disable Hot Pluggability           B6 - Dynamic Internal Pad Support
;B5 - Disable Internal Aux Support       B5 - GA20 & KBRC output disabled
;B4 - Aux Operations Control (bit1)      B4 - 3D mouse extended support
;B3 - Aux Operations Control (bit0)      B3 - Reserved
;B2 - Aux Status Bit3 Mask#              B2 - Battery Type (bit2)
;B1 - Int Aux Stat Bit3 is Not Masked    B1 - Battery Type (bit1)
;B0 - Ext Aux Stat Bit3 is Not Masked    B0 - Battery Type (bit0)
;
;      Aux Operations Control:
;      00 - Simultaneous Mode
;      01 - External Aux - Primary Device
;      10 - Hot Switch Mode
;      11 - Alternative Mode
;
;   {KSTATE9} Kbc Control flags           {HOTKEYS} HotKey State Flags
; B7 - Reserved                         B7 - Work has been Completed
; B6 - Reserved                         B6 - HotKey Work Pending
; B5 - Reserved                         B5 - HotKey1 Active
; B4 - RAM Bank Select (bit4)           B4 - HotKey2 Active
; B3 - RAM Bank Select (bit3)           B3 - HotKey3 Active
; B2 - Reserved                         B2 - HotKey4 Active
; B1 - PS/2 Port Configuration (bit1)   B1 - HotKey5 Active
; B0 - PS/2 Port Configuration (bit0)   B0 - HotKey6 Active
;
;      PS/2 Port Configuration:
;      00 - P0&P1=External Kbd/Mouse ports, P2=Internal Aux port
;      01 - P0=External Kbd/Mouse port, P1&P2 = 2nd&Main Internal Aux ports
;      10 - P0=External Kbd/Mouse port, P1=Internal Aux port, P2=Disabled
;      11 - P0=External Kbd/Mouse port, P1=Disabled, P2=Internal Aux port
;
;   {KSTATEA} Configuration flags         {MISCTMP} Misc Temporary Flags
; B7 - AX Kana LED (1=enbl, 0=disbl)    B7 - GateA20 (D1h) Command flag
; B6 - Kana Lock LED sate               B6 - Alt + PrtScn (SysReq) active
; B5 - Internal AuxDev - TB attached    B5 - 1st Fn HotKey Make Occured
; B4 - External Keypad connected        B4 - Configure LED outputs as OD
; B3 - IO Epander enabled               B3 - Read I.D. Check in Progress
; B2 - Clock speed (0=4Mhz, 1=8Mhz)     B2 - Remote data from Int TB
; B1 - Kbd I.D. (1=AB,84-OADG, 0=AB,83) B1 - Control + PrtScn active
; B0 - Scan algorithm (0=CMPD, 1=P3)    B0 - Disable Extrn Data to Syst
;
;   {MISCTM2} Misc Temporary Flags        {MISCTM3} Misc Temporary Flags
; B7 - KBC Waiting for System Data      B7 - SM Sel Restoration Cnt (bit1)
; B6 - Controller Suspended             B6 - SM Sel Restoration Cnt (bit0)
; B5 - PS/2 Devices Tested flag         B5 - CM Battery Alarm Flag
; B4 - Reserved                         B4 - M38869 2k RAM is detected
; B3 - Last Scan Code = E0h flag        B3 - System SLEEP signal is active
; B2 - Temporary Disable Intern Kbd     B2 - PS2 Wake Up has been completed
; B1 - Upper Loop Flag                  B1 - Aux (D4) Command flag
; B0 - SWI (Resume) Event pending       B0 - Temporary bit storage
;
;----------------------------------------------------------------------------
;
;   {INFO1} Version Information I         {INFO2} Version Information II
; B7 - Processor Type (bit2)            B7 - IRQ12 software Flip/Flop
; B6 - Extended INFO available (B0)     B6 - IRQ12 software inverted
; B5 - Kbd Scanning support             B5 - IRQ1 software Flip/Flop
; B4 - Power Down Support               B4 - IRQ1 software inverted
; B3 - Processor Type (bit1)            B3 - Clock speed (bit 3)
; B2 - PS/2 Mouse Emulation             B2 - Clock speed (bit 2)
; B1 - AT Environment (0=PS/2)          B1 - Clock speed (bit 1)
; B0 - Processor Type (bit0)            B0 - Clock speed (bit 0)
;
;   {INFO3} Version Information III       {INFO4} Version Information IV
; B7 - Processor Type (bit3)            B7 - Reserved
; B6 - Processor Type (bit2)            B6 - Reserved
; B5 - Processor Type (bit1)            B5 - Reserved
; B4 - Processor Type (bit0)            B4 - Reserved
; B3 - Battery Type (bit3)              B3 - Reserved
; B2 - Battery Type (bit2)              B2 - Fn-Shift Table in ROM only
; B1 - Battery Type (bit1)              B1 - Matrix Located in ROM only
; B0 - Battery Type (bit0)              B0 - EEPROM and B#h Cmd support
;
;   {INFO5} Version Information V
; B7 - B0 - Reserved
;
; Processor Type: bit3 bit2 bit1 bit0   Battery Type: bit3 bit2 bit1 bit0
;         M38802   0    0    0    0     No Battery     0    0    0    0
;        80C51SL   0    0    0    1     Duracell SMB   0    0    0    1
;        SMC51xL   0    0    1    0     Sony SBP       0    0    1    0
;        H8/3332   0    0    1    1     Sony SBP*2     0    0    1    1
;       VL82C144   0    1    0    0     BQ High Speed  0    1    0    0
;           8042   0    1    0    1     Reserved       0    1    0    1
;       Reserved   0    1    1    0     Reserved       0    1    1    0
;         M3886X   0    1    1    1     Reserved       0    1    1    1
;         M38813   1    0    0    0     Reserved       1    0    0    0
;         SMC95x   1    0    0    1     Reserved       1    0    0    1
;        PC87570   1    0    1    0     Reserved       1    0    1    0
;        H8/3434   1    0    1    1     Reserved       1    0    1    1
;       Reserved   1    1    0    0     Reserved       1    1    0    0
;     MC68405G11   1    1    0    1     Reserved       1    1    0    1
;       Reserved   1    1    1    0     Reserved       1    1    1    0
;         M306KX   1    1    1    1     Reserved       1    1    1    1
;
; {MSTATE1} Mouse1 State flags           {MSTATE2}nMouse2 State flags
;(4Fh) B7 - Aux cmd/data flag (bit1)   B7 - Status Request in Progress
;(4Eh) B6 - Aux cmd/data flag (bit0)   B6 - Ext Aux has been Checked flag
;(4Dh) B5 - Enabled @Aux Device        B5 - Int TB Package Cnt (bit1)
;(4Ch) B4 - Wrap Mode set              B4 - Int TB Package Cnt (bit0)
;(4Bh) B3 - Remote Mode (0 = Stream)   B3 - Ext Aux Package Cnt (bit1)
;(4Ah) B2 - 2:1 scaling (0 = 1:1)      B2 - Ext Aux Package Cnt (bit0)
;(49h) B1 - Resolution (b1) 1,2,4,& 8  B1 - Last Aux Pointer (bit 1)
;(48h) B0 - Resolution (b0) counts/mm  B0 - Last Aux Pointer (bit 0)
;
; {MSTATE3} Mouse3 Sample Rate         {PSSTATUS} PS/2 Mouse Emulation Status
;      00Ah =  10 reports/sec               B7 - Y-Data Ovrfl/BallPoint Mode
;      014h =  20 reports/sec               B6 - X-Data Overflow
;      028h =  40 reports/sec               B5 - Y-Data Negative
;      03Ch =  60 reports/sec               B4 - X-Data Negative
;      050h =  80 reports/sec               B3 - Mouse key down
;      064h = 100 reports/sec (default)     B2 - Middle Button Down
;      0C8h = 200 reports/sec               B1 - Right Button Down
;                                           B0 - Left Button Down
;
;  {MPADSTAT} Embedded Mouse Pad Status
;       B7 - MPADTMR bit 0
;       B6 - Reserved
;       B5 - Reserved
;       B4 - 1st MPad Lock Make Occurred
;       B3 - Left Arrow Down
;       B2 - Down Arrow Down
;       B1 - Right Arrow Down
;       B0 - Upper Arrow Down
;
;   {MSTATE1} Mouse1 State flags          {MSTATE2} Mouse2 State flags
; B7 - Aux cmd/data flag (bit1)         B7 - Status Request in Progress
; B6 - Aux cmd/data flag (bit0)         B6 - Ext Aux has been Checked flag
; B5 - Enabled @Aux Device              B5 - Int TB Package Cnt (bit1)
; B4 - Wrap Mode set                    B4 - Int TB Package Cnt (bit0)
; B3 - Stream Mode (1 = Remote)         B3 - Ext Aux Package Cnt (bit1)
; B2 - 2:1 scaling (0 = 1:1)            B2 - Ext Aux Package Cnt (bit0)
; B1 - Resolution (b1) 1,2,4,& 8        B1 - Last Aux Pointer (bit 1)
; B0 - Resolution (b0) counts/mm        B0 - Last Aux Pointer (bit 0)
;
;   {MSTATE3} Mouse3 Sample Rate          {MSTATE4} Mouse4 State flags
; B7 - B0 - Sample Rate:                B7 - Int Aux Z emulation
;      00Ah =  10 reports/sec           B6 - Ext Aux Z emulation
;      014h =  20 reports/sec           B5 - 3D Mouse detected
;      028h =  40 reports/sec           B4 - 5Button Mouse detected
;      03Ch =  60 reports/sec           B3 - Reserved (carry frm B2-0)
;      050h =  80 reports/sec           B2 - Dual Aux Reset in progress
;      064h = 100 reports/sec (deflt)   B1 - Ext Reset completed
;      0C8h = 200 reports/sec           B0 - First Completion code received
;
;    {INTBUT} TB Buttons State flags         B2 - B0 Dual Aux Reset counter
;  B7,B6,B3 - Reserved                       100 = Start Dual Aux Reset
;  B5 - Int TB Small Thumb Button Down       101 = 1st Ext code AAh received
;  B4 - Int TB Large Thumb Button Down       110 = 2nd Ext code 00h received
;  B2 - Int TB Middle Button Down            111 = 1st Int code AAh received
;  B1 - Int TB Right Button Down             000 = 2nd Int code 00h received
;  B0 - Int TB Left Button Down
;
;    {EXTBUT} Extrn Aux Buttons flags
;  B7,B6,B3 - Reserved
;  B5 - Ext Aux Small Thumb Button Down
;  B4 - Ext Aux Large Thumb Button Down
;  B2 - Ext Aux Middle Button Down
;  B1 - Ext Aux Right Button Down
;  B0 - Ext Aux Left Button Down
;
;   {MSTATE1} Mouse1 State flags          {MSTATE2}nMouse2 State flags
; B7 - Aux cmd/data flag (bit1)         B7 - Status Request in Progress
; B6 - Aux cmd/data flag (bit0)         B6 - Ext Aux has been Checked flag
; B5 - Enabled @Aux Device              B5 - Int TB Package Cnt (bit1)
; B4 - Wrap Mode set                    B4 - Int TB Package Cnt (bit0)
; B3 - Stream Mode (1 = Remote)         B3 - Ext Aux Package Cnt (bit1)
; B2 - 2:1 scaling (0 = 1:1)            B2 - Ext Aux Package Cnt (bit0)
; B1 - Resolution (b1) 1,2,4,& 8        B1 - Last Aux Pointer (bit 1)
; B0 - Resolution (b0) counts/mm        B0 - Last Aux Pointer (bit 0)
;
;   {MSTATE3} Mouse3 Sample Rate          {INTBUT} TB Buttons State flags
; B7 - B0 - Sample Rate:                B7 - B3 - Reserved
;      00Ah =  10 reports/sec           B2 - Int TB Middle Button Down
;      014h =  20 reports/sec           B1 - Int TB Right Button Down
;      028h =  40 reports/sec           B0 - Int TB Left Button Down
;      03Ch =  60 reports/sec             {EXTBUT} Extrn Aux Buttons flags
;      050h =  80 reports/sec           B7 - B3 - Reserved
;      064h = 100 reports/sec (deflt)   B2 - Ext Aux Middle Button Down
;      0C8h = 200 reports/sec           B1 - Ext Aux Right Button Down
;                                       B0 - Ext Aux Left Button Down
;
;    {MSTATE4}nMouse4 State flags
;  B7 - Int Aux Z emulation
;  B6 - Ext Aux Z emulation
;  B5 - 3D Mouse detected               B2 - B0 Dual Aux Reset counter
;  B4 - Reserved                        100 = Start Dual Aux Reset
;  B3 - Reserved (carry frm B2-0)       101 = 1st Ext code AAh received
;  B2 - Dual Aux Reset in progress      110 = 2nd Ext code 00h received
;  B1 - Ext Reset completed             111 = 1st Int code AAh received
;  B0 - First Completion code received  000 = 2nd Int code 00h received
;
;   {AUXMUX} Aux Multiplexed mode flags  {AUXPORT1-3} Aux1-3 Port State flags
; B7 - Multiplexed mode enabled         B7 - Aux Port expecting resp. (bit 1)
; B6 - Reverted Legacy mode enabled     B6 - Aux Port expecting resp. (bit 0)
; B5 - Reserved                         B5 - Reserved
; B4 - Reserved                         B4 - Aux Port Disable flag
; B3 - Reserved                         B3 - Aux device attached
; B2 - Internal Aux was detected        B2 - Port type (1/0=Ext/Int)
; B1 - D3 cmd sequence ptr (bit 1)      B1 - Reserved
; B0 - D3 cmd sequence ptr (bit 0)      B0 - Reserved
;
; {SB_CSR} SMBus Control/Status Register
; B7 - SB in Master(=1)/Slave(=0) mode
; B6 - SB in PEC mode(=1)
; B5 - SB1 Queue pointer bit 1
; B4 - SB1 Queue pointer bit 0
; B3 - SB0(=0)/SB1(=1) usage
; B2 - SMBus RAM in 03xx/02xx(1/0)
; B1 - SB0 Queue pointer bit 1
; B0 - SB0 Queue pointer bit 0
;
;----------------------------------------------------------------------------
        DEFSEG  KBCORESEG, ABSOLUTE
        SEG     KBCORESEG
;-------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -