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

📄 ps2code.lst

📁 PIC 系列单片机开发用于与计算机PS2通信的程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
00DE   01A3           00389                 clrf    PARITY
                      00390                 Delay   28
                          M   if (28==1)
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (28==2)
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (28==3)
                          M                 nop
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (28==4)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (28==5)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
MPASM 03.20.02 Released       PS2CODE.ASM   6-30-2004  14:27:07         PAGE 14
PS/2 Keyboard Emulator
Copyright 2001, Adam Chapweske
LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (28==6)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (28==7)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (28%4==0)
00DF   3006               M                 movlw   (28-4)/4
00E0   2121               M                 call    Delay_us
                          M                 exitm
00E1   2112           00391 ByteInLoop      call    BitIn           ;Data bits
00E2   1D85           00392                 btfss   CLOCK           ;Test for inhibit
00E3   34FE           00393                 retlw   0xFE
00E4   1003           00394                 bcf     STATUS, C
00E5   0CA2           00395                 rrf     RECEIVE, f
00E6   04A2           00396                 iorwf   RECEIVE, f
00E7   06A3           00397                 xorwf   PARITY,f
00E8   0BA4           00398                 decfsz  COUNTER, f
00E9   28E1           00399                 goto    ByteInLoop
                      00400                 Delay   1
                          M   if (1==1)
00EA   0000               M                 nop
                          M                 exitm
00EB   2112           00401                 call    BitIn           ;Parity bit
00EC   1D85           00402                 btfss   CLOCK           ;Test for inhibit
00ED   34FE           00403                 retlw   0xFE
00EE   06A3           00404                 xorwf   PARITY, f
                      00405                 Delay   5
                          M   if (5==1)
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (5==2)
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (5==3)
                          M                 nop
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (5==4)
                          M                 goto    $ + 1
MPASM 03.20.02 Released       PS2CODE.ASM   6-30-2004  14:27:07         PAGE 15
PS/2 Keyboard Emulator
Copyright 2001, Adam Chapweske
LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (5==5)
00EF   28F0               M                 goto    $ + 1
00F0   28F1               M                 goto    $ + 1
00F1   0000               M                 nop
                          M                 exitm
                      00406 ByteInLoop1     Delay   1
                          M   if (1==1)
00F2   0000               M                 nop
                          M                 exitm
00F3   2112           00407                 call    BitIn           ;Stop bit
00F4   1D85           00408                 btfss   CLOCK           ;Test for inhibit
00F5   34FE           00409                 retlw   0xFE
00F6   3A00           00410                 xorlw   0x00
00F7   1903           00411                 btfsc   STATUS, Z
00F8   01A3           00412                 clrf    PARITY
00F9   1903           00413                 btfsc   STATUS, Z       ;Stop bit = 1?
00FA   28F2           00414                 goto    ByteInLoop1     ;  No--keep clocking.
                      00415 
00FB   1683           00416                 bsf     STATUS, RP0     ;Acknowledge
00FC   1105           00417                 bcf     DATA
                      00418                 Delay   11
                          M   if (11==1)
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (11==2)
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (11==3)
                          M                 nop
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (11==4)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (11==5)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (11==6)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 exitm
MPASM 03.20.02 Released       PS2CODE.ASM   6-30-2004  14:27:07         PAGE 16
PS/2 Keyboard Emulator
Copyright 2001, Adam Chapweske
LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                          M   endif
                          M   if (11==7)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (11%4==0)
                          M                 movlw   (11-4)/4
                          M                 call    Delay_us
                          M                 exitm
                          M   endif
                          M   if (11%4==1)
                          M                 movlw   (11-5)/4
                          M                 call    Delay_us
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (11%4==2)
                          M                 movlw   (11-6)/4
                          M                 call    Delay_us
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (11%4==3)
00FD   3001               M                 movlw   (11-7)/4
00FE   2121               M                 call    Delay_us
00FF   2900               M                 goto    $ + 1
0100   0000               M                 nop
                          M                 exitm
0101   1185           00419                 bcf     CLOCK
                      00420                 Delay   45
                          M   if (45==1)
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (45==2)
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (45==3)
                          M                 nop
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (45==4)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (45==5)
                          M                 goto    $ + 1
MPASM 03.20.02 Released       PS2CODE.ASM   6-30-2004  14:27:07         PAGE 17
PS/2 Keyboard Emulator
Copyright 2001, Adam Chapweske
LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                          M                 goto    $ + 1
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (45==6)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (45==7)
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 goto    $ + 1
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (45%4==0)
                          M                 movlw   (45-4)/4
                          M                 call    Delay_us
                          M                 exitm
                          M   endif
                          M   if (45%4==1)
0102   300A               M                 movlw   (45-5)/4
0103   2121               M                 call    Delay_us
0104   0000               M                 nop
                          M                 exitm
0105   1585           00421                 bsf     CLOCK
                      00422                 Delay   7
                          M   if (7==1)
                          M                 nop
                          M                 exitm
                          M   endif
                          M   if (7==2)
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif
                          M   if (7==3)
                          M                 nop
                          M                 goto    $ + 1
                          M                 exitm
                          M   endif

⌨️ 快捷键说明

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