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

📄 cls1.lst

📁 合泰USB键盘程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
 140  003B              get_kb_input:
 141  003B              ;KB
 142  003B  0700     E  				MOV     A,FIFO_wLengthL     	;check format no.
 143  003C  0C08                        XOR     A,REPORT_KB_SIZE       	;
 144  003D  390A                        SNZ     Z                   	;
 145  003E  2800     E                  JMP		ToStallPipe0        	;
 146  003F  2000     E  				call	movekeyboarddata
 147  0040  0F08        				mov		a,8
 148  0041  2A38        				JMP		Reportl
 149  0042              ;----------------------------------------------------------------------------
 150  0042              
 151  0042              ClassRequest:
 152  0042  0700     E                  MOV     A,FIFO_Type
 153  0043  0E1F                        AND     A,Setup_Rev
 154  0044  0080     E                  MOV     TEMP,A
 155  0045  0A04                        SUB     A,04H               ;Over 4 item ?
 156  0046  3C0A                        SZ      C                   ;
 157  0047  2800     E                  JMP		ToStallPipe0        ;Yes
 158  0048  0700     E                  MOV     A,TEMP
 159  0049              class_request_pcl_5:
 160  0049  0386                        ADDM    A,PCL
 161  004A  2800     E                  JMP		ToStallPipe0        ;Invalid Device
 162  004B  2A1E                        JMP     InterfaceRev        ;Invalid Interface
 163  004C  2800     E                  JMP     ToStallPipe0        ;Endpoint
 164  004D  2800     E                  JMP		ToStallPipe0        ;Invalid Other
 165  004E              
 166  004E              InterfaceRev:
 167  004E  1080     E  				SZ      FIFO_wIndexH        ;High byte for endpoint == 0 ?
 168  004F  2800     E                  JMP		ToStallPipe0        ;No
 169  0050  0700     E  				MOV		A,FIFO_wIndexL	
 170  0051  0A02        				SUB		A,INTERFACE_NO		;2
 171  0052  3C0A        				SZ		C
 172  0053  2800     E  				JMP		ToStallPipe0
 173  0054              
 174  0054              ;Check bRequest		
 175  0054  0700     E                  MOV     A,FIFO_Request    	;bRequest
"File: CLS1.ASM      Holtek Cross-Assembler  Version 2.86      Page 4

 176  0055  0A0C                        SUB     A,CLASS_REQUEST_NO  ;Over 12 item ?
 177  0056  3C0A                        SZ      C                   ;
 178  0057  2800     E                  JMP		ToStallPipe0        ;Yes
 179  0058  0700     E                  MOV     A,FIFO_Request
 180  0059              ;!!!!! Need in same page
 181  0059              class_cmd_pcl_13:
 182  0059  0386                        ADDM    A,PCL
 183  005A  2800     E                  JMP		ToStallPipe0        ;0
 184  005B  2A39                        JMP     GetReport           ;1
 185  005C  29FD                        JMP     GetIdle             ;2
 186  005D  29DC                        JMP     GetProtocol         ;3
 187  005E  2800     E                  JMP		ToStallPipe0        ;4
 188  005F  2800     E                  JMP		ToStallPipe0        ;5
 189  0060  2800     E                  JMP		ToStallPipe0        ;6
 190  0061  2800     E                  JMP		ToStallPipe0        ;7
 191  0062  2800     E                  JMP		ToStallPipe0        ;8
 192  0063  2A4B                        JMP     SetReport           ;9
 193  0064  29EE                        JMP     SetIdle             ;A
 194  0065  29D0                        JMP     SetProtocol         ;B
 195  0066              
 196  0066              ;////////////////////////////////////////////////////////////////////////////
 197  0066              ;Class Specific Request
 198  0066              
 199  0066              ReportVL:
 200  0066  0080     E                  MOV     FIFO_OUT1,A       		;
 201  0067  0F01                        MOV     A,KB_OUTPUT_SIZE       	;FIFO data length = 1
 202  0068              
 203  0068              ReportL:
 204  0068  2800     E  				jmp		SendFIFOOut
 205  0069              ;                MOV     FIFO_SendLen,A    		;
 206  0069              ;                jmp	    RequestResponse     	;Responde
 207  0069              
 208  0069              
 209  0069              ;----------------------------------------------------------------------------
 210  0069              
 211  0069              GetReport:		;Report_type, Report_ID=0, Report_Length 
 212  0069              				;no Feature Report
 213  0069                              ;Check bmRequestType direction
 214  0069  3800     E                  SNZ     FIFO_Type.@Setup_D    	;device to host ?
 215  006A  2800     E                  JMP		ToStallPipe0            ;No:Error
 216  006B  0700     E                 	MOV     A,FIFO_wValueH        	;Get report type (Only 3 kind)
 217  006C  0A04                        SUB     A,REPORT_TYPE_NO	    ;Over 4 item ?
 218  006D  3C0A                        SZ      C                       ;
 219  006E  2800     E                  JMP		ToStallPipe0            ;Yes
 220  006F  0700     E                  MOV     A,FIFO_wValueH
 221  0070              get_report_pcl_5:
 222  0070  0386                        ADDM    A,PCL
 223  0071  2800     E                  JMP		ToStallPipe0            ;No this report type
 224  0072  2A45                        JMP     GetInputReport
 225  0073  2800     E                  JMP     Tostallpipe0
 226  0074              GetFeatureReport:                               ;No support GetFeatureReport
 227  0074  2800     E                  JMP		ToStallPipe0
 228  0075              ;----------------------------------------------------------------------------
 229  0075              GetInputReport:
 230  0075  1080     E                  SZ      FIFO_wLengthH     		;wLength = 8 ?
 231  0076  2800     E                  JMP		ToStallPipe0        	;No
 232  0077              				
 233  0077  0700     E  				mov		a,FIFO_wIndexL
 234  0078              get_input_pcl_4:
 235  0078  0386        				addm	a,pcl
"File: CLS1.ASM      Holtek Cross-Assembler  Version 2.86      Page 5

 236  0079  2A0B        				jmp		get_KB_input			;0
 237  007A  2800     E  				jmp		Tostallpipe0			;1
 238  007B              ;----------------------------------------------------------------------------
 239  007B              
 240  007B              
 241  007B              SetReport:		;Report_Type, Report_ID=0, 
 242  007B                              ;Check bmRequestType direction
 243  007B              				;No Feature Report, Input Report
 244  007B  3C00     E                  SZ      FIFO_Type.@Setup_D    	;Host to device ?
 245  007C  2800     E                  JMP		ToStallPipe0            ;No:Error
 246  007D  0700     E                  MOV     A,FIFO_wValueH        	;Get report type (Only 3 kind)
 247  007E  0A04                        SUB     A,04H                   ;Over 4 item ?
 248  007F  3C0A                        SZ      C                       ;
 249  0080  2800     E                  JMP		ToStallPipe0            ;Yes
 250  0081  0700     E                  MOV     A,FIFO_wValueH
 251  0082              setreport_pcl_5:
 252  0082  0386                        ADDM    A,PCL
 253  0083  2800     E                  JMP		ToStallPipe0            ;No this report type
 254  0084  2800     E                  JMP		ToStallPipe0            ;No support SetInputReport
 255  0085  2A57                        JMP     SetOutputReport
 256  0086              SetFeatureReport:                               ;No support SetFeatureReport
 257  0086  2800     E                  JMP		ToStallPipe0
 258  0087              SetOutputReport:
 259  0087  1080     E  				SZ		FIFO_wIndexL			;0-KB,	1-Mouse
 260  0088  2800     E  				JMP		ToStallPipe0
 261  0089              ;KB					
 262  0089  1080     E  				SZ      FIFO_wLengthH         	;wLength = 1 ?
 263  008A  2800     E                  JMP		ToStallPipe0            ;No
 264  008B  0700     E                  MOV     A,FIFO_wLengthL       	;1 byte report
 265  008C  0C01                        XOR     A,KB_Output_SIZE    	;
 266  008D  390A                        SNZ     Z                       ;
 267  008E  2800     E      	        JMP		ToStallPipe0            ;No
 268  008F  3000     E                  set     bCMD_INDEX    
 269  0090  2800     E                  JMP     ExitExt        	                
 270  0091              
 271  0091              ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 272  0091              
 273  0091              
 274  0091              
 275  0091              PUBLIC		ClassRequest
 276  0091              public		class_request_pcl_5
 277  0091              public		class_cmd_pcl_13
 278  0091              public		get_report_pcl_5
 279  0091              public		get_input_pcl_4
 280  0091              public		setreport_pcl_5
 281  0091              				END


        0 Errors

⌨️ 快捷键说明

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