Difference between revisions of "Wiimote/Firmware"
< Wiimote
Jump to navigation
Jump to search
Wiihacker12 (talk | contribs) |
Wiihacker12 (talk | contribs) |
||
Line 1: | Line 1: | ||
− | The processor in the Wiimote is a distant ancestor of the PC's 8086 processor, the 8051. The assembly language should be familiar to PC programmers. | + | The processor in the Wiimote is a distant ancestor of the PC's 8086 processor, the 8051. The assembly language should be familiar to PC programmers. |
− | |||
The registers are named R1 to R7. There is also a register called "A" which is the equivalent of AX, a register called "DPTR" (data pointer) which usually contains memory addresses. | The registers are named R1 to R7. There is also a register called "A" which is the equivalent of AX, a register called "DPTR" (data pointer) which usually contains memory addresses. | ||
Revision as of 00:17, 19 August 2009
The processor in the Wiimote is a distant ancestor of the PC's 8086 processor, the 8051. The assembly language should be familiar to PC programmers. The registers are named R1 to R7. There is also a register called "A" which is the equivalent of AX, a register called "DPTR" (data pointer) which usually contains memory addresses.
You can view the 8051 Opcodes here.
Code
;===============================================================; ; Disassembled Using DIS8051 - (C)1989 Data Sync Engineering ; ;===============================================================; ; 7F04 ? ; 1:0 10 when speaker enabled ; 00 when speaker disabled L_SpeakerEnabled1: NOP ; 7F0A: GPIO_port ; bit 5 enable/disable LED ; bit 4 enable/disable LED ; bit 3 enable/disable LED ; bit 2 enable/disable LED ; bit 1 1=enable rumble motor, 0=disable rumble motor L_GPIO_port: NOP L7F35: ADD A,R3 NOP INC @R1 NOP NOP JC L7F3C ; L7F3C: ADD A,R5 NOP INC @R0
; Bluetooth Class ID
; 7F3F L_BluetoothClassID: INC A ADD A,000H ; L7F42: ADD A,#000H INC @R1 DEC A INC R7 ; L7F47: ADDC A,R4 ; L7F48: LJMP L4600 ; INC 00CH SJMP L7F94 NOP DEC @R1 ORL A,R6 XRL A,R1 XRL A,R6 MOV A,#065H XRL A,R6 XRL A,#06FH JB 052H,L7FB2 ORL A,R4 ; 7F5D bit 7 is speaker enabled L_SpeakerEnabled: ADD A,R5 ORL 04EH,#054H ; L7F61: ADD A,R5 ; L7F62: JNB 031H,L7F65 ; L7F65: ORL 000H,#004H AJMP L7842 ; ; L7F6A: NOP ; L7F6B: INC A AJMP L7836 ; NOP INC R5 NOP JC L7F7B NOP ; L7F74: NOP JC L7F7F NOP JBC 000H,L7F8A ; L7F7B: LJMP LA803 ; MOV R5,#007H XCHD A,@R1 NOP NOP INC 00AH NOP ; L7F86: NOP NOP NOP XCHD A,@R1 ; L7F8A: NOP AJMP L7805 ; ADDC A,003H DEC R1 JBC 000H,L7F6A NOP ; L7F94: INC A INC R7 ADDC A,00DH ADDC A,006H DEC R1 AJMP L7800 ; INC R1 NOP AJMP L7835 ; RR A DEC R1 NOP AJMP L78D7 ; NOP INC 005H ADDC A,003H DEC R1 JBC 002H,L7F86 NOP INC @R0 INC R3 ; L7FB2: ADDC A,009H INC R1 XRL A,06EH INC R1 NOP XRL A,R2 INC R1 AJMP L7800 ; XCHD A,@R1 NOP INC R1 INC R2 ADDC A,008H ADDC A,006H DEC R1 AJMP L7800 ; INC R1 AJMP L7800 ; XCHD A,@R1 LJMP L0005 ; ADDC A,003H INC R1 AJMP L7800 ; MOV R5,#019H XCHD A,@R1 NOP NOP INC 00AH NOP ; L7FDC: AJMP L7800 ; NOP XCHD A,@R1 NOP AJMP L7805 ; ADDC A,003H DEC R1 ACALL L7824 XCHD A,@R1 NOP INC A INC R7 ADDC A,00DH ADDC A,006H DEC R1 AJMP L7800 ; INC R1 NOP ACALL L7835 RR A DEC R1 NOP ACALL L78D7 NOP INC 005H ADDC A,003H ; L8001: DEC R1 ; L8002: JBC 002H,L7FDC ; L8005: NOP ; L8006: INC @R0 INC R3 ADDC A,009H INC R1 XRL A,06EH INC R1 NOP XRL A,R2 INC R1 ; L8011: AJMP L8000 ; XCHD A,@R1 NOP INC R1 INC R2 ADDC A,008H ADDC A,006H DEC R1 ACALL L8024 INC R1 AJMP L8000 ; XCHD A,@R1 NOP INC R5 ; L8024: ACALL L8035 INC R7 ; L8027: ADDC A,00DH ADDC A,006H DEC R1 AJMP L8000 ; INC R1 NOP RRC A ; L8031: ADDC A,003H DEC R1 NOP ; L8035: ACALL L80D7 AJMP L8000 ; DEC 025H RRC A ORL A,R6 XRL A,R1 XRL A,R6 MOV A,#065H XRL A,R6 XRL A,#06FH JB 052H,L809D ORL A,R4 ADD A,R5 ORL 04EH,#054H ADD A,R5 JNB 031H,L8027 AJMP L8001 ; DEC 025H RRC A ORL A,R6 XRL A,R1 XRL A,R6 MOV A,#065H XRL A,R6 XRL A,#06FH JB 052H,L80B6 ORL A,R4 ADD A,R5 ORL 04EH,#054H ADD A,R5 JNB 031H,L8040 AJMP L8002 ; INC R2 ADD A,008H ORL A,R6 XRL A,R1 XRL A,R6 MOV A,#065H XRL A,R6 XRL A,#06FH XCHD A,@R1 LJMP L0003 ; INC R1 AJMP L8000 ; XCHD A,@R1 LJMP L0103 ; ; L8081: INC R1 AJMP L8011 ; XCHD A,@R1 ; L8085: LJMP L0202 ; INC R0 INC A XCHD A,@R1 LJMP L0302 ; INC R0 RLC A ; L8090: XCHD A,@R1 ; L8091: LJMP L0402 ; ADD A,R0 NOP XCHD A,@R1 LJMP L0502 ; ADD A,R0 AJMP L80D7 ; ; L809D: LJMP L06E1 ; ; L80A0: ADDC A,0DFH ADDC A,0DDH INC R0 RET ; ADD A,0D9H INC 001H INC R1 INC 0A1H AJMP L8085 ; JBC 015H,L80B2 ; L80B2: ADD A,@R0 MOV R7,A NOP MOV 008H,#095H AJMP L8006 ; NOP MOV R7,A INC R1 AJMP L8091 ; NOP MOV 095H,011H AJMP L8009 ; AJMP L8091 ; NOP MOV 095H,012H LJMP L0901 ; ACALL L8400 MOV 095H,013H AJMP L8009 ; AJMP L8091 ; ; L80D7: NOP MOV 095H,014H AJMP L8009 ; AJMP L8091 ; NOP MOV 095H,015H AJMP L8009 ; AJMP L8091 ; NOP MOV 095H,016H DEC 009H AJMP L8091 ; NOP MOV 095H,017H INC @R0 INC R1 AJMP L8091 ; NOP MOV 095H,018H DEC 009H AJMP L8091 ; NOP MOV 095H,019H AJMP L8009 ; AJMP L8091 ; NOP MOV 095H,01AH AJMP L8009 ; AJMP L8091 ; NOP MOV 095H,020H INC @R0 INC R1 AJMP L8081 ; NOP MOV 095H,021H DEC 009H AJMP L8081 ; NOP MOV 095H,022H INC A INC R1 AJMP L8081 ; NOP MOV 095H,030H LJMP L0901 ; AJMP L8400 ; MOV 095H,031H INC 009H AJMP L8081 ; NOP MOV 095H,032H INC R2 INC R1 AJMP L8081 ; NOP MOV 095H,033H ACALL L8009 AJMP L8081 ; NOP MOV 095H,034H DEC 009H AJMP L8081 ; NOP MOV 095H,035H DEC 009H AJMP L8081 ; NOP MOV 095H,036H DEC 009H AJMP L8081 ; NOP MOV 095H,037H DEC 009H AJMP L8081 ; NOP MOV 095H,03DH DEC 009H AJMP L8081 ; NOP MOV 095H,03EH DEC 009H AJMP L8081 ; NOP MOV 095H,03FH DEC 009H AJMP L8081 ; NOP PUSH 0D7H LJMP L070A ; ADDC A,008H ; L8187: ADDC A,006H INC R1 INC A INC R1 INC R1 AJMP L8000 ; XCHD A,@R1 LJMP L0802 ; ADD A,R0 NOP XCHD A,@R1 LJMP L0902 ; ADD A,R0 AJMP L80D7 ; LJMP L0A02 ; ADD A,R0 AJMP L80D7 ; LJMP L0B03 ; INC R1 AJMP L8000 ; XCHD A,@R1 LJMP L0C03 ; INC R1 INC R4 SJMP L8187 LJMP L0D02 ; ADD A,R0 NOP XCHD A,@R1 LJMP L0E02 ; ADD A,R0 NOP MOV R5,#00BH XCHD A,@R1 NOP NOP INC 00AH NOP ; L81C3: AJMP L8000 ; AJMP L80D7 ; NOP AJMP L8005 ; ADDC A,003H DEC R1 LCALL L00D7 NOP INC A INC R7 ADDC A,00DH ADDC A,006H DEC R1 AJMP L8000 ; INC R1 NOP AJMP L8035 ; RR A DEC R1 NOP AJMP L80D7 ; NOP INC 005H ADDC A,003H DEC R1 JBC 002H,L81C3 NOP INC R1 INC R2 ADDC A,008H ADDC A,006H DEC R1 LCALL L0009 AJMP L8000 ; XCHD A,@R1 LJMP L0003 ; INC R1 AJMP L8000 ; XCHD A,@R1 LJMP L0103 ; INC R1 INC 07EH XCHD A,@R1 LJMP L0203 ; INC R1 RR A INC @R0 XCHD A,@R1 LJMP L0303 ; INC R1 ADDC A,R2 DEC @R0 XCHD A,@R1 LJMP L0402 ; ADD A,R0 AJMP L80D7 ; LJMP L0503 ; INC R1 NOP LJMP L3700 ; INC R2 NOP NOP INC @R0 JC L822B AJMP L8001 ; ADDC A,R0 NOP DEC @R0 NOP XRL A,R0 AJMP L8000 ; INC R0 AJMP L8000 ; NOP INC R0 NOP INC P0 NOP NOP NOP RETI ; NOP RR A NOP ADDC A,R0 NOP DEC @R0 AJMP L8078 ; INC @R0 NOP INC R0 AJMP L8000 ; NOP INC R0 NOP INC P0 NOP NOP NOP AJMP L8000 ; RR A NOP ORL A,R4 NOP INC R5 XRL A,R0 NOP INC A NOP NOP RR A RLC A NOP INC R1 ANL C,/03FH NOP ADD A,@R0 DEC A INC R2 INC R2 INC R2 INC R2 INC R2 INC @R0 JC L8277 JC L8274 INC 002H LJMP L0000 ; NOP NOP AJMP L8001 ; NOP AJMP L8001 ; AJMP L8000 ; NOP JBC 003H,L828D ADDC A,#000H NOP AJMP L8090 ; AJMP L8031 ; NOP ; L828D: ACALL L8101 NOP NOP LJMP L0000 ; NOP JBC 000H,L8298 ; L8298: NOP AJMP L8000 ; NOP MOV R6,A AJMP L8000 ; INC A JNB 030H,L82D3 JNB 000H,L82A6 ; L82A6: NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP INC A NOP RR A INC A NOP LJMP L0180 ; NOP NOP NOP ADD A,R4 NOP RRC A INC @R1 NOP NOP INC R4 SJMP L82CD INC R6 JBC 008H,L82FD INC R0 ADDC A,#0FFH LJMP L0300 ; ADDC A,R4 NOP INC A NOP ; L82D3: ADDC A,R6 NOP ADDC A,#010H LJMP L001A ; RR A JBC 018H,L82E2 NOP DEC R4 INC 000H ; L82E2: DEC R4 INC @R0 NOP DEC R4 INC @R1 NOP DEC R0 DEC @R0 JBC 018H,L8304 JBC 018H,L8308 JBC 018H,L830C JBC 018H,L8310 MOV DPTR,#L181B MOV DPTR,#L181C MOV DPTR,#L181D MOV DPTR,#L1820 MOV DPTR,#L1821 NOP DEC R2 ORL A,R3 ; L8308: NOP DEC A MOV 000H,R6 ; L830C: ADD A,#024H INC A JBC 000H,L8391 ADD A,#07FH ADD A,#00FH ORL C,/009H SWAP A NOP NOP ORL A,R7 NOP INC 000H DEC R0 ADD A,R6 NOP INC R5 JZ L8325 ; L8325: LJMP L0103 ; ADDC A,R3 SUBB A,R2 XCH A,R2 NOP INC R0 ANL 000H,#005H AJMP L8020 ; ADDC A,R2 NOP INC R2 ADDC A,R7 AJMP L80A0 ; AJMP L80A0 ; INC R0 NOP INC R1 NOP ; L833E: INC @R1 XCH A,@R1 ANL A,@R0 RLC A NOP INC R1 NOP INC @R1 ; L8346: SETB ACC.4 CPL C RET ; INC R1 NOP INC @R1 SETB 028H CPL C ORL 009H,#000H INC @R1 XCHD A,@R0 ACALL L86B3 MOV R2,#009H NOP INC @R1 XCH A,09BH CPL C SWAP A INC R1 NOP INC @R1 ADDC A,R7 CJNE R1,#033H,L8346 INC R1 NOP INC @R1 ANL A,R2 DJNZ R3,L8371 MOV 009H,R3 NOP INC @R1 MOV @R0,A ; L8371: JZ L8378 ORL C,/009H NOP INC @R1 SUBB A,@R1 ; L8378: LJMP L05C6 ; INC R1 NOP INC @R1 ORL A,#09DH ; L8380: INC 0D3H INC R1 NOP INC @R1 ORL A,038H INC 0E6H INC R1 NOP INC @R1 ACALL L83E9 INC 0EEH INC R0 ; L8391: RL A CJNE A,#000H,L8397 ADD A,#001H ; L8397: MOVX A,@R1 LJMP L949F ; LJMP LDBA6 ; CLR C RET ; NOP LJMP LA262 ; RET ; NOP NOP CLR C RET ; NOP LJMP LE9A6 ; RET ; NOP NOP RET ; NOP NOP LJMP LDC5E ; LJMP LA3EC ; LJMP LDBF4 ; LJMP LA3E7 ; LJMP LA209 ; LJMP LDA9C ; LJMP LD420 ; RET ; NOP NOP LJMP LD92D ; LJMP LD90F ; LJMP LA1CA ; LJMP LA399 ; RET ; NOP NOP LJMP LDA2C ; LJMP LA259 ; LJMP LDA45 ; LJMP LE9B0 ; LJMP LE9ED ; ; L83E9: LJMP LD48F ; CLR C RET ; NOP RET ; NOP NOP RET ; NOP NOP LJMP L7BDA ; RET ; NOP NOP RET ; NOP NOP LJMP L7A6A ; LJMP L7B1D ; LJMP L7990 ; LJMP LE0F7 ; LJMP LE0EE ; LJMP LE0EB ; LJMP LE0EB ; LJMP LE072 ; LJMP LE02A ; LJMP LDFFA ; LJMP LDFC3 ; LJMP LDEEB ; LJMP LDEA4 ; LJMP LDE6F ; LJMP LDE49 ; LJMP LDE36 ; LJMP LDE2A ; LJMP LDE14 ; LJMP LDE01 ; LJMP LDDB6 ; LJMP LDD97 ; LJMP LDD7C ; LJMP LDD5D ; LJMP LA3F2 ; LJMP LDCC0 ; LJMP LA3D6 ; LJMP LDC78 ; LJMP LDC6E ; LJMP LD84E ; RET ; NOP NOP LJMP LE99F ; LJMP LD8AD ; LJMP L9B8F ; LJMP L9BCE ; RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP LJMP LDAA1 ; LJMP L9C24 ; LJMP L9C39 ; LJMP LA3A6 ; LJMP LA3CE ; RET ; NOP NOP LJMP LDBC4 ; LJMP LE78E ; LJMP LE793 ; RET ; NOP NOP LJMP L7BB2 ; LJMP L7BB2 ; LJMP L11FA ; LJMP L1200 ; LJMP LA48B ; LJMP LA141 ; LJMP L9FCD ; LJMP LE558 ; LJMP LE558 ; LJMP LE558 ; LJMP LE558 ; LJMP L9F9C ; LJMP LE558 ; LJMP LE823 ; LJMP L97DA ; LJMP L9B2A ; LJMP L7B91 ; LJMP LDA9C ; RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP LJMP L7BD7 ; LJMP L7BDA ; RET ; NOP NOP RET ; NOP NOP LJMP LEAE7 ; LJMP LA161 ; LJMP L7BE3 ; LJMP LED61 ; RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP ; L8551: RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP RET ; NOP NOP NOP INC P0 JB EXF2,L8551 MOVX @DPTR,A PUSH DPL PUSH DPH PUSH B LJMP L6107 ; MOV R7,#000H LCALL L110A MOV R7,#001H LCALL L110A MOV R7,#002H LCALL L110A MOV DPTR,#L5AEE LJMP L8580 ; CLR A MOV R3,A MOV R5,#06AH MOV R7,#047H LCALL L1032 CLR A MOV R3,A MOV R5,#06AH MOV R7,#046H LCALL L1032 MOV DPTR,#L4631 MOVX A,@DPTR ORL A,#080H MOV R5,A CLR A MOV R3,A MOV R7,#041H LCALL L1032 MOV DPTR,#LF66D LJMP L8580 ; MOV R7,A LCALL L784C LCALL L6EC7 MOV DPTR,#L9709 LJMP L8580 ; CLR EA MOV A,04AH CPL A ANL A,04BH MOV 032H,A CLR C RRC A MOV 032H,A MOV DPTR,#L44A8 LJMP L8580 ; SETB EA MOV DPTR,#L45D9 LJMP L8580 ; MOV DPTR,#L57AF MOVX A,@DPTR MOV B,A ANL A,#03FH MOV DPTR,#L7F11 MOVX @DPTR,A ORL PCON,#001H NOP NOP MOV A,B MOV DPTR,#L7F11 MOVX @DPTR,A MOV DPTR,#L71EE LJMP L8580 ; ; L860B: INC R1 ; L860C: INC R0 INC @R0 ; L860E: NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP RR A NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP ; L863E: NOP LJMP L0203 ; INC @R0 INC 005H INC 008H INC R0 INC R0 INC R0 INC R0 INC @R0 INC 005H RR A RR A INC A RR A RR A RR A DEC @R1 INC R0 DEC @R1 RR A RR A INC A INC A INC A INC A INC A INC R0 DEC @R1 INC @R0 INC A INC A INC A INC A INC A INC A INC A INC A INC A INC A INC A INC A INC A INC A INC @R1 INC R4 RRC A DEC @R1 DEC @R1 DEC @R1 DEC @R1 INC A INC A INC A INC A INC A DEC @R1 DEC @R1 DEC @R1 ADDC A,#0AAH ADDC A,#0ADH ADDC A,#0B0H ; L8684: ADDC A,#0B4H ADDC A,#0B7H ADDC A,#0BAH ADDC A,#0BDH ADDC A,#0D4H ; L868E: ADDC A,#0DCH ADDC A,#0F3H ADDC A,#0F6H NOP AJMP L8001 ; AJMP L8001 ; NOP NOP NOP NOP AJMP L8001 ; MOV C,010H NOP MOV C,011H NOP MOV C,012H NOP JNB P2.2,L86BE NOP MOV C,014H NOP MOV C,015H NOP MOV C,016H NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP ; L86BE: NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP MOV C,017H NOP NOP NOP NOP NOP NOP MOV C,018H NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP MOV C,019H NOP MOV C,01AH NOP ; L86EE: NOP LJMP L0404 ; AJMP L8004 ; INC A INC R6 INC A INC R6 AJMP L8000 ; LJMP L0004 ; NOP INC R0 NOP JBC 000H,L_DoJT ; 8703 L_DoJT: AJMP L8000 ; LJMP L0004 ; NOP INC R0 NOP JBC 000H,L868E JB 000H,L8751 NOP SJMP L_JumpTable
; Jump Table
; 8714 Jump table, 32 entries L_JumpTable: LJMP L_JumpTable1 ; LJMP L9575 ; LJMP L965A ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9675 ; LJMP L9690 ; LJMP L96AE ; LJMP L96C4 ; LJMP L96E2 ; LJMP L9714 ; LJMP L972D ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L9663 ; LJMP L974D ; LJMP L975B ; LJMP L9774 ; ; L8774: MOV A,R7 RL A ADD A,R7 ADD A,#014H PUSH ACC CLR A ADDC A,#087H PUSH ACC RET ; LJMP L_InputReport20H ; LJMP L_InputReport21H ; LJMP L_InputReport22H ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_DataReport31H ; LJMP L_DataReport32H ; LJMP L_DataReport33H ; LJMP L_DataReport34H ; LJMP L_DataReport35H ; LJMP L_DataReport36H ; LJMP L_DataReport37H ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_InputReportInvalid ; LJMP L_DataReport3DH ; LJMP L_DataReport3EH ; LJMP L_DataReport3FH ; ; L87E1: MOV A,R5 RL A ADD A,R5 ADD A,#081H PUSH ACC CLR A ADDC A,#087H PUSH ACC RET ; 87EE L_OutputReportTable: LJMP L_OutputReport10H ; LJMP L_OutputReport11H ; LJMP L_OutputReport12H ; LJMP L_OutputReport13H ; LJMP L_OutputReport14H ; LJMP L_OutputReport15H ; LJMP L_OutputReport16H ; LJMP L_OutputReport17H ; LJMP L_OutputReport18H ; LJMP L_OutputReport19H ; LJMP L_OutputReport1AH
; L880F: MOV A,R3 RL A ADD A,R3 ADD A,#0EEH PUSH ACC CLR A ADDC A,#087H PUSH ACC RET ; ; L881C: MOV DPTR,#L35F8 MOV A,R6 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A MOV R3,#000H MOV R2,#010H CLR A MOV R5,A MOV R7,A LCALL L5181 MOV DPTR,#L35F0 LCALL LA630 ; L8834: MOV DPTR,#L35FA MOVX A,@DPTR MOV R5,A CLR C SUBB A,#008H JNC L8857 INC DPTR MOVX A,@DPTR JNB ACC.0,L8849 MOV R6,#000H MOV R7,#000H SJMP L884D ; L8849: MOV R6,#002H MOV R7,#000H ; L884D: LCALL LA63B MOV R7,#001H LCALL L888B SJMP L8834 ; L8857: MOV DPTR,#L35F1 LCALL LA630 ; L885D: MOV DPTR,#L35FA MOVX A,@DPTR MOV R5,A CLR C SUBB A,#006H JNC L8880 INC DPTR MOVX A,@DPTR JNB ACC.0,L8872 MOV R6,#000H MOV R7,#000H SJMP L8876 ; L8872: MOV R6,#002H MOV R7,#000H ; L8876: LCALL LA63B MOV R7,#002H LCALL L888B SJMP L885D ; L8880: MOV DPTR,#L7F21 MOV A,#0FFH MOVX @DPTR,A INC DPTR MOV A,#03FH MOVX @DPTR,A RET ; ; L888B: LCALL L5181 MOV DPTR,#L35FA MOVX A,@DPTR INC A MOVX @DPTR,A INC DPTR MOVX A,@DPTR MOV R7,A CLR C RRC A MOVX @DPTR,A RET ; ; L889B: CLR A MOV DPTR,#L35F0 MOVX @DPTR,A INC DPTR MOVX @DPTR,A MOV R7,#004H MOV R6,#008H LCALL L881C CLR A MOV DPTR,#L35F2 MOVX @DPTR,A INC DPTR MOVX @DPTR,A MOV R7,A LJMP L91C4 ; MOV R7,#004H MOV R6,#000H LCALL L881C CLR A MOV R7,A LJMP L91C4 ; MOV R7,#004H MOV R6,#008H LCALL L881C CLR A MOV R7,A LJMP L91C4 ; ; L88CC: MOV DPTR,#L7F30 MOVX A,@DPTR MOV R5,A INC DPTR MOVX A,@DPTR MOV R4,A MOV DPTR,#L7F30 MOVX A,@DPTR ORL A,R5 MOV R5,A INC DPTR MOVX A,@DPTR ORL A,R4 MOV R4,A MOV A,R5 CPL A MOV R5,A MOV A,R4 CPL A MOV R4,A MOV DPTR,#L35F0 MOV A,R5 MOVX @DPTR,A INC DPTR MOV A,R4 MOVX @DPTR,A MOV A,R5 ANL A,#01FH MOV 035H,#000H MOV 034H,A MOV R7,005H MOV A,R7 ANL A,#0E0H MOV R7,A SWAP A RRC A ANL A,#007H ORL 035H,A CLR A MOV A,R4 ANL A,#003H MOV B,#008H MUL AB MOV R6,B ORL 035H,A MOV A,R6 ORL 034H,A MOV A,R4 JNB ACC.2,L8916 ORL 035H,#080H ; L8916: MOV R7,004H MOV A,R4 ANL A,#038H ADD A,ACC ADD A,ACC MOV R6,A CLR A MOV A,R6 ORL 034H,A MOV DPTR,#L35F2 MOV A,034H MOVX @DPTR,A INC DPTR MOV A,035H MOVX @DPTR,A MOV R7,A MOV R6,034H RET ; LJMP L88CC ; ; L8935: CLR C RET ; ; L8937: MOV R7,#004H MOV R6,#008H LJMP L881C ; ; L893E: CLR A MOV DPTR,#L7D22 MOVX @DPTR,A MOV DPTR,#L7D24 MOVX A,@DPTR MOV R6,A CLR C MOV A,R7 SUBB A,R6 MOV R7,A RET ; ; L894D: MOV R7,#014H LCALL L784C MOV DPTR,#L7F60 MOV A,#0FFH MOVX @DPTR,A MOV 030H,#001H MOV 032H,#002H MOV DPTR,#L7F69 MOV A,030H MOVX @DPTR,A INC DPTR MOV A,032H MOVX @DPTR,A INC DPTR MOV A,#001H MOVX @DPTR,A MOV DPTR,#L3520 MOV A,#064H MOVX @DPTR,A ; L8972: MOV DPTR,#L7F6B MOVX A,@DPTR JB ACC.1,L8981 MOV DPTR,#L3520 MOVX A,@DPTR DEC A MOVX @DPTR,A JNZ L8972 ; L8981: CLR A MOV DPTR,#L7F6B MOVX @DPTR,A RET ; ; L8987: CLR A MOV DPTR,#L7F6B MOVX @DPTR,A MOV DPTR,#L7F60 MOV A,R5 MOVX @DPTR,A MOV DPTR,#L7F69 MOV A,R7 MOVX @DPTR,A INC DPTR MOV A,R3 MOVX @DPTR,A INC DPTR MOV A,#001H MOVX @DPTR,A RET ; ; L899E: MOV DPTR,#L3521 MOV A,#0FFH MOVX @DPTR,A ; L89A4: MOV DPTR,#L7F6B MOVX A,@DPTR MOV R7,A JB ACC.1,L89B4 MOV DPTR,#L3521 MOVX A,@DPTR DEC A MOVX @DPTR,A JNZ L89A4 ; L89B4: CLR A MOV DPTR,#L7F6B MOVX @DPTR,A MOV A,R7 JB ACC.2,L89C3 MOV DPTR,#L3521 MOVX A,@DPTR JNZ L89C6 ; L89C3: MOV R7,#003H RET ; ; L89C6: MOV R7,#001H RET ; ; L89C9: LCALL L899E MOV A,R7 XRL A,#001H JZ L89D7 LCALL L894D MOV R7,#003H RET ; ; L89D7: MOV R7,#001H RET ; ; L89DA: CLR A MOV R3,A LCALL L8987 LCALL L89C9 RET ; ; L89E3: MOV DPTR,#L7F61 MOV A,R5 MOVX @DPTR,A MOV R5,007H MOV R7,#001H LCALL L89DA RET ; ; L89F0: MOV DPTR,#L3522 LCALL LA4BD MOV A,R3 MOVX @DPTR,A MOV DPTR,#L3524 MOVX A,@DPTR MOV R7,A SETB C SUBB A,#008H JC L8A08 MOV R6,#008H MOV R7,#008H SJMP L8A08 ; L8A08: MOV DPTR,#L3526 MOV A,R7 MOVX @DPTR,A ; L8A0D: MOV DPTR,#L3524 MOVX A,@DPTR JZ L8A72 MOV R6,#07FH MOV R7,#061H MOV DPTR,#L3522 MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A MOV DPTR,#L3526 MOVX A,@DPTR MOV R3,A LCALL L7175 MOV DPTR,#L3526 MOVX A,@DPTR MOV R7,A MOV DPTR,#L3525 MOVX A,@DPTR MOV R5,A CLR A MOV R3,A LCALL L8987 MOV DPTR,#L3524 MOVX A,@DPTR MOV R7,A MOV DPTR,#L3526 MOVX A,@DPTR MOV R6,A CLR C MOV A,R7 SUBB A,R6 MOV R7,A MOV DPTR,#L3524 MOVX @DPTR,A MOV A,R6 MOV R5,A MOV DPTR,#L3522 CLR A MOV B,R5 LCALL L1C56 MOV A,R7 SETB C SUBB A,#008H JC L8A5D MOV R7,#008H SJMP L8A62 ; L8A5D: MOV DPTR,#L3524 MOVX A,@DPTR MOV R7,A ; L8A62: MOV DPTR,#L3526 MOV A,R7 MOVX @DPTR,A LCALL L89C9 MOV A,R7 XRL A,#001H JZ L8A0D MOV R7,#003H RET ; ; L8A72: MOV R7,#001H RET ; ; L8A75: MOV DPTR,#L3527 LCALL LA4BD MOV A,R2 MOVX @DPTR,A INC DPTR MOV A,R3 MOVX @DPTR,A INC DPTR MOVX A,@DPTR SETB C SUBB A,#002H JC L8A8A MOV A,#002H MOVX @DPTR,A ; L8A8A: MOV DPTR,#L352C MOVX A,@DPTR MOV R7,A CLR C MOV A,#008H SUBB A,R7 MOV R7,A MOV DPTR,#L3529 MOVX A,@DPTR MOV R6,A SETB C SUBB A,R7 JC L8A9F SJMP L8AA1 ; L8A9F: MOV R7,006H ; L8AA1: MOV DPTR,#L352E MOV A,R7 MOVX @DPTR,A ; L8AA6: MOV DPTR,#L3529 MOVX A,@DPTR JNZ L8AAF LJMP L8B54 ; ; L8AAF: MOV DPTR,#L352C MOVX A,@DPTR MOV R5,A CJNE A,#001H,L8AC1 MOV DPTR,#L352B MOVX A,@DPTR MOV DPTR,#L7F61 MOVX @DPTR,A SJMP L8AD1 ; L8AC1: MOV DPTR,#L352A MOVX A,@DPTR MOV DPTR,#L7F61 MOVX @DPTR,A MOV DPTR,#L352B MOVX A,@DPTR MOV DPTR,#L7F62 MOVX @DPTR,A ; L8AD1: MOV A,#061H ADD A,R5 MOV DPL,A CLR A ADDC A,#07FH MOV R7,DPL MOV R6,A MOV DPTR,#L3527 MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A MOV DPTR,#L352E MOVX A,@DPTR MOV R3,A LCALL L7175 MOV DPTR,#L352C MOVX A,@DPTR MOV R7,A MOV DPTR,#L352E MOVX A,@DPTR ADD A,R7 MOV R7,A MOV DPTR,#L352D MOVX A,@DPTR MOV R5,A CLR A MOV R3,A LCALL L8987 MOV DPTR,#L3529 MOVX A,@DPTR MOV R7,A MOV DPTR,#L352E MOVX A,@DPTR MOV R6,A CLR C MOV A,R7 SUBB A,R6 MOV R7,A MOV DPTR,#L3529 MOVX @DPTR,A MOV A,R6 MOV R5,A MOV R4,#000H MOV DPTR,#L3527 MOV A,R4 MOV B,R5 LCALL L1C56 MOV DPTR,#L352A MOV A,R4 MOV B,R5 LCALL L1C56 MOV DPTR,#L352C MOVX A,@DPTR MOV R6,A CLR C MOV A,#008H SUBB A,R6 MOV R6,A MOV A,R7 SETB C SUBB A,R6 JC L8B3C MOV R7,006H SJMP L8B41 ; L8B3C: MOV DPTR,#L3529 MOVX A,@DPTR MOV R7,A ; L8B41: MOV DPTR,#L352E MOV A,R7 MOVX @DPTR,A LCALL L89C9 MOV A,R7 XRL A,#001H JNZ L8B51 LJMP L8AA6 ; ; L8B51: MOV R7,#003H RET ; ; L8B54: MOV R7,#001H RET ; ; L8B57: MOV R3,#001H LJMP L8987 ; ; L8B5C: MOV DPTR,#L352F LCALL LA4BD MOV A,R3 MOVX @DPTR,A MOV DPTR,#L3531 MOVX A,@DPTR MOV R7,A SETB C SUBB A,#008H JC L8B74 MOV R6,#008H MOV R7,#008H SJMP L8B74 ; L8B74: MOV DPTR,#L3533 MOV A,R7 MOVX @DPTR,A ; L8B79: MOV DPTR,#L3531 MOVX A,@DPTR MOV R7,A MOV DPTR,#L3533 MOVX A,@DPTR MOV R6,A CLR C MOV A,R7 SUBB A,R6 MOV DPTR,#L3531 MOVX @DPTR,A LCALL L89C9 MOV DPTR,#L3534 MOV A,R7 MOVX @DPTR,A XRL A,#001H JNZ L8BD3 MOV DPTR,#L352F MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A MOV R4,#07FH MOV R5,#06CH MOV DPTR,#L3533 MOVX A,@DPTR MOV R3,A LCALL L7175 MOV DPTR,#L3531 MOVX A,@DPTR MOV R7,A JZ L8BD3 SETB C SUBB A,#008H JC L8BBC MOV R6,#008H MOV R7,#008H SJMP L8BBC ; L8BBC: MOV DPTR,#L3533 MOV A,R7 MOVX @DPTR,A MOV DPTR,#L3532 MOVX A,@DPTR MOV R5,A LCALL L8B57 MOV DPTR,#L352F CLR A MOV B,#008H LCALL L1C56 ; L8BD3: MOV DPTR,#L3534 MOVX A,@DPTR MOV R7,A CJNE A,#001H,L8BE1 MOV DPTR,#L3531 MOVX A,@DPTR JNZ L8B79 ; L8BE1: RET ; ; L8BE2: MOV DPTR,#L3535 MOV A,R6 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A MOV R4,005H MOV R2,003H MOV A,R4 SETB C SUBB A,#008H JC L8BF8 MOV R7,#008H SJMP L8BFA ; L8BF8: MOV R7,004H ; L8BFA: MOV R5,002H LCALL L8B57 MOV DPTR,#L3535 MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A MOV R5,004H MOV R4,002H MOV R3,004H LCALL L8B5C RET ; ; L8C11: MOV DPTR,#L7F0B MOVX A,@DPTR ANL A,#0FEH ORL A,R7 MOVX @DPTR,A RET ; ; L8C1A: MOV DPTR,#L7F33 MOVX A,@DPTR ANL A,#002H MOV R7,A MOV DPTR,#L3400 MOVX A,@DPTR MOV R6,A XRL A,R7 JZ L8C55 MOV A,R6 XRL A,#002H JZ L8C34 INC DPTR MOVX A,@DPTR DEC A MOVX @DPTR,A JNZ L8C5B ; L8C34: MOV DPTR,#L3400 MOVX A,@DPTR XRL A,#002H MOVX @DPTR,A INC DPTR MOV A,#008H MOVX @DPTR,A INC DPTR MOV A,#001H MOVX @DPTR,A MOV DPTR,#L5631 MOVX A,@DPTR CJNE A,#008H,L8C4F CLR A MOV DPTR,#L3471 MOVX @DPTR,A ; L8C4F: CLR A MOV DPTR,#L3474 MOVX @DPTR,A RET ; ; L8C55: MOV DPTR,#L3401 MOV A,#008H MOVX @DPTR,A ; L8C5B: RET ; ; L8C5C: CLR A MOV DPTR,#L3400 MOVX @DPTR,A INC DPTR MOV A,#008H MOVX @DPTR,A MOV R5,A ; L8C66: MOV R7,005H DEC R5 MOV A,R7 JZ L8C71 LCALL L8C1A SJMP L8C66 ; L8C71: CLR A MOV DPTR,#L3402 MOVX @DPTR,A MOV DPTR,#L3404 MOVX @DPTR,A RET ; ; L8C7B: MOV DPTR,#L3537 MOV A,R7 MOVX @DPTR,A MOVX A,@DPTR SETB C SUBB A,#008H JC L8C89 MOV A,#008H MOVX @DPTR,A ; L8C89: LCALL L1248 JC L8CB4 MOV DPTR,#L3400 MOVX A,@DPTR CJNE A,#002H,L8CB4 CLR A MOV R5,A MOV R7,#0A4H LCALL L89E3 CJNE R7,#001H,L8CB4 MOV R7,#011H LCALL L784C MOV DPTR,#L3537 MOVX A,@DPTR MOV R7,A MOV R5,#0A4H LCALL L8B57 MOV DPTR,#L3404 MOV A,#001H MOVX @DPTR,A ; L8CB4: RET ; ; L8CB5: MOV DPTR,#L3538 MOV A,R7 MOVX @DPTR,A INC DPTR MOV A,#003H MOVX @DPTR,A MOV DPTR,#L3404 MOVX A,@DPTR JZ L8CD9 CLR A MOVX @DPTR,A MOV R6,#034H MOV R7,#005H MOV DPTR,#L3538 MOVX A,@DPTR MOV R5,A MOV R3,#0A4H LCALL L8B5C MOV DPTR,#L3539 MOV A,R7 MOVX @DPTR,A ; L8CD9: MOV DPTR,#L3539 MOVX A,@DPTR XRL A,#001H JZ L8CEF MOV R6,#034H MOV R7,#005H MOV DPTR,#L3538 MOVX A,@DPTR MOV R3,A MOV R5,#0FFH LCALL L7A03 ; L8CEF: MOV R6,#034H MOV R7,#005H MOV R4,#034H MOV R5,#01AH MOV DPTR,#L3538 MOVX A,@DPTR MOV R3,A LCALL L7195 MOV A,R7 JZ L8D15 MOV R6,#034H MOV R7,#01AH MOV R4,#034H MOV R5,#005H MOV DPTR,#L3538 MOVX A,@DPTR MOV R3,A LCALL L7175 MOV R7,#001H RET ; ; L8D15: MOV R7,#000H RET ; ; L8D18: MOV DPTR,#L3512 MOVX A,@DPTR MOV R7,A CLR A MOV R6,A MOV DPTR,#L3445 MOVX A,@DPTR MOV R5,A RRC A RRC A ANL A,#03FH MOV R5,A ; L8D29: MOV A,R6 CLR C SUBB A,#004H JNC L8D92 MOV DPTR,#L344B MOVX A,@DPTR JZ L8D39 MOV A,R5 JNB ACC.0,L8D53 ; L8D39: LCALL LA590 MOV A,#0FFH LCALL LA59B MOV A,#003H MOV R0,003H INC R0 SJMP L8D4A ; L8D48: CLR C RLC A ; L8D4A: DJNZ R0,L8D48 ORL A,R4 MOV DPTR,#L7F47 MOVX @DPTR,A SJMP L8D8A ; L8D53: MOV A,R7 ADD A,ACC ADD A,ACC MOV R4,A LCALL LA590 MOV A,R4 LCALL LA59B CLR C MOV A,#006H SUBB A,R3 MOV R3,A MOV A,#0C0H MOV R0,003H INC R0 SJMP L8D6E ; L8D6C: CLR C RRC A ; L8D6E: DJNZ R0,L8D6C CPL A ANL A,R4 MOV DPTR,#L7F47 MOVX @DPTR,A MOVX A,@DPTR MOV R4,A MOV A,R7 ANL A,#0C0H MOV R2,A MOV R0,003H INC R0 SJMP L8D83 ; L8D81: CLR C RRC A ; L8D83: DJNZ R0,L8D81 ORL A,R4 MOV DPTR,#L7F47 MOVX @DPTR,A ; L8D8A: INC R6 MOV A,R5 CLR C RRC A MOV R5,A LJMP L8D29 ; ; L8D92: RET ; ; L8D93: MOV DPTR,#L3445 MOV A,R7 MOVX @DPTR,A MOV DPTR,#L_GPIO_port MOVX A,@DPTR ANL A,#0C3H ORL A,R7 MOVX @DPTR,A LJMP L8D18 ; ; L8DA3: MOV DPTR,#L3446 MOVX A,@DPTR CJNE A,#0FFH,L8DBA MOV DPTR,#L344C MOVX A,@DPTR CPL A MOV R7,A ADD A,ACC ADD A,ACC ANL A,#03CH MOV R7,A LCALL L8D93 ; L8DBA: RET ; ; L8DBB: LCALL L741C MOV DPTR,#L3447 LCALL L1FB5 MOV DPTR,#L565B MOVX A,@DPTR MOV R7,A SETB C SUBB A,#055H JC L8DD5 CLR A MOV DPTR,#L3446 MOVX @DPTR,A SJMP L8DF7 ; L8DD5: MOV A,R7 CLR C SUBB A,#044H JC L8DE3 MOV DPTR,#L3446 MOV A,#020H MOVX @DPTR,A SJMP L8DF7 ; L8DE3: MOV A,R7 CLR C SUBB A,#033H JC L8DF1 MOV DPTR,#L3446 MOV A,#030H MOVX @DPTR,A SJMP L8DF7 ; L8DF1: MOV DPTR,#L3446 MOV A,#038H MOVX @DPTR,A ; L8DF7: MOV DPTR,#L3446 MOVX A,@DPTR MOV R7,A LJMP L8D93 ; ; L8DFF: LCALL L741C MOV DPTR,#L3447 LCALL L1FB5 MOV DPTR,#L3446 MOV A,#03CH MOVX @DPTR,A MOV R7,A LJMP L8D93 ; ; L8E12: MOV DPTR,#L3446 MOVX A,@DPTR CJNE A,#0FFH,L8E1C LCALL L8DBB ; L8E1C: RET ; ; L8E1D: MOV DPTR,#L3446 MOV A,#0FFH MOVX @DPTR,A LJMP L8DA3 ; ; L8E26: MOV DPTR,#L3446 MOVX A,@DPTR CPL A JZ L8E72 MOV DPTR,#L344D MOVX A,@DPTR JZ L8E41 LCALL L8E73 MOV DPTR,#L3517 LCALL LA4CF JC L8E41 LJMP L8E1D ; ; L8E41: MOV DPTR,#L3446 MOVX A,@DPTR CJNE A,#03CH,L8E56 LCALL L8E73 MOV DPTR,#L3515 LCALL LA4CF JC L8E72 LJMP L8DBB ; ; L8E56: MOV DPTR,#L3447 LCALL L1F9D LCALL L55B9 MOV R0,004H MOV R1,005H MOV R2,006H MOV R3,007H MOV DPTR,#L3513 LCALL LA4CF JC L8E72 LCALL L8DFF ; L8E72: RET ; ; L8E73: INC DPTR LCALL L1F9D LCALL L55B9 MOV R0,004H MOV R1,005H MOV R2,006H MOV R3,007H RET ; ; L8E83: MOVX @DPTR,A LCALL L93FE ; L8E87: LCALL L8E1D CLR A MOV R7,A ; L8E8C: MOV DPTR,#L344C MOV A,R7 MOVX @DPTR,A LJMP L8DA3
; Feedback: LEDs, Rumble, and Speaker
; LEDs
; ; 8E94 Enable/disable LEDs (bits 0-3 of r7) L_EnableLEDs: MOV DPTR,#L353A MOV A,R7 MOVX @DPTR,A MOV DPTR,#L344D MOV A,#001H MOVX @DPTR,A LCALL L741C MOV DPTR,#L344E LCALL L1FB5 MOV DPTR,#L353A MOVX A,@DPTR MOV R7,A LJMP L8E8C
; Rumble
; ; 8eb0 Store register a at address pointed by dptr, calls 8eb1 L_Store_A_at_DPTR: MOVX @DPTR,A ; 8eb1 Load address pointed by dptr to register r7, calls 8eb5 L_LOAD_DPTR_TO_R7: MOVX A,@DPTR ANL A,#001H MOV R7,A ; 8eb5 Enable Rumble L_EnableRumble: MOV A,R7 JZ L8EBC MOV R6,#002H SJMP L8EBE ; L8EBC: MOV R6,#000H ; L8EBE: MOV R7,006H MOV DPTR,#L_GPIO_port MOVX A,@DPTR ANL A,#0FDH ORL A,R7 MOVX @DPTR,A RET
; Speaker
; ; L8EC9: MOV DPTR,#L7F03 MOVX A,@DPTR ANL A,#03FH ORL A,#080H MOVX @DPTR,A MOV DPTR,#L_SpeakerEnabled MOVX A,@DPTR ANL A,#0F7H ORL A,#008H MOVX @DPTR,A RET ; ; L8EDC: MOV DPTR,#L_SpeakerEnabled MOVX A,@DPTR ANL A,#0F7H MOVX @DPTR,A MOV DPTR,#L7F03 MOVX A,@DPTR ANL A,#03FH MOVX @DPTR,A RET ; ; L8EEB: MOV DPTR,#L_GPIO_port MOVX A,@DPTR ANL A,#0FEH ORL A,R7 MOVX @DPTR,A RET ; ; L8EF4: MOV R5,#0B0H MOV R7,#008H LJMP L8B57 ; ; L8EFB: MOV R5,#037H MOV R7,#0B0H LCALL L89E3 LJMP L8EF4 ; ; L8F05: MOV R5,007H MOV R6,#034H MOV R7,#05FH MOV R3,#0B0H LCALL L8B5C MOV R7,#001H RET ; ; L8F13: MOV R7,#00AH LCALL L8F05 RET ; ; L8F19: MOV R7,#00CH LCALL L8F05 RET ; ; L8F1F: MOV R7,#012H LCALL L8F05 RET ; ; 8f25 UnmuteSpeaker (when R7 = 8) L_UnMuteSpeaker: MOV DPTR,#L7F07 MOVX A,@DPTR ANL A,#0F7H ORL A,R7 MOVX @DPTR,A RET ; ; 8f2e Enable Speaker L_EnableSpeaker: MOV DPTR,#L7F04 MOVX A,@DPTR ANL A,#0FCH ORL A,#002H MOVX @DPTR,A MOV DPTR,#L_SpeakerEnabled MOVX A,@DPTR ANL A,#07FH ORL A,#080H MOVX @DPTR,A MOV R7,#008H LCALL L_UnMuteSpeaker MOV DPTR,#L3452 MOV A,#001H MOVX @DPTR,A RET ; ; 8f4c Disable Speaker L_DisableSpeaker: CLR A MOV R7,A LCALL L_UnMuteSpeaker MOV DPTR,#L_SpeakerEnabled MOVX A,@DPTR ANL A,#07FH MOVX @DPTR,A MOV DPTR,#L7F04 MOVX A,@DPTR ANL A,#0FCH MOVX @DPTR,A CLR A MOV DPTR,#L3452 MOVX @DPTR,A RET ; ; L8F65: MOV DPTR,#L353B MOV A,R6 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A INC DPTR MOV A,R5 MOVX @DPTR,A CLR A MOV DPTR,#L7F61 MOVX @DPTR,A ; L8F75: MOV DPTR,#L353D MOVX A,@DPTR MOV R7,A JZ L8FC8 CLR C SUBB A,#007H JC L8F87 MOV R6,#007H MOV R7,#007H SJMP L8F87 ; L8F87: MOV DPTR,#L353E MOV A,R7 MOVX @DPTR,A MOV R3,A MOV R6,#07FH MOV R7,#062H MOV DPTR,#L353B MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A LCALL L7175 MOV DPTR,#L353E MOVX A,@DPTR INC A MOV R7,A CLR A MOV R3,A MOV R5,#0A2H LCALL L8987 LCALL L899E MOV DPTR,#L353D MOVX A,@DPTR MOV R7,A INC DPTR MOVX A,@DPTR MOV R6,A CLR C MOV A,R7 SUBB A,R6 MOV DPTR,#L353D MOVX @DPTR,A MOV A,R6 MOV R7,A MOV DPTR,#L353B CLR A MOV B,R7 LCALL L1C56 SJMP L8F75 ; L8FC8: RET ; ; L8FC9: MOV DPTR,#L3452 MOVX A,@DPTR JZ L8FEC MOV DPTR,#L7F2F MOVX A,@DPTR JNB ACC.2,L8FDA MOV R7,#001H SJMP L8FDC ; L8FDA: MOV R7,#000H ; L8FDC: MOV DPTR,#L3453 MOV A,R7 MOVX @DPTR,A INC DPTR MOVX A,@DPTR XRL A,R7 JZ L8FE9 MOV R7,#001H RET ; ; L8FE9: MOV R7,#000H RET ; ; L8FEC: MOV R7,#000H RET ; ; L8FEF: MOV R1,007H MOV A,R5 MOV R5,#000H MOV R4,A MOV A,R5 MOV R6,004H MOV R0,#004H ; L8FFA: XCH A,R6 MOV C,ACC.7 RRC A XCH A,R6 RRC A DJNZ R0,L8FFA MOV R7,A MOV A,R3 ANL A,#00FH MOV R3,A MOV A,R6 MOV R4,A MOV A,R7 ORL A,R3 MOV R5,A CLR C MOV DPTR,#L3431 MOVX A,@DPTR SUBB A,R5 MOV A,R4 XRL A,#080H MOV R0,A MOV DPTR,#L3430 MOVX A,@DPTR XRL A,#080H SUBB A,R0 JC L902D INC DPTR MOVX A,@DPTR SUBB A,R5 MOV 035H,A MOV DPTR,#L3430 MOVX A,@DPTR SUBB A,R4 MOV 034H,A SJMP L9032 ; L902D: CLR A MOV 034H,A MOV 035H,A ; L9032: MOV A,034H SWAP A MOV R0,A ANL A,#0F0H XCH A,R0 XRL A,R0 MOV A,035H SWAP A ANL A,#00FH ORL A,R0 MOV 032H,A MOV R6,#000H ADD A,035H MOV R7,A MOV A,R6 ADDC A,034H MOV R6,A MOV A,032H CLR C RRC A MOV R2,#000H ADD A,R7 MOV R7,A MOV A,R2 ADDC A,R6 MOV R6,A MOV A,R7 ADD A,ACC MOV R5,A MOV A,R6 RLC A MOV R4,A CLR C MOV A,R5 SUBB A,#0FFH MOV A,R4 XRL A,#080H SUBB A,#08FH JC L906C MOV R4,#00FH MOV R5,#0FFH ; L906C: MOV B,#002H MOV A,R1 MOV DPTR,#L3436 LCALL L1FF2 MOV A,R4 MOVX @DPTR,A INC DPTR MOV A,R5 MOVX @DPTR,A MOV R6,004H MOV R0,#004H ; L907F: XCH A,R6 MOV C,ACC.7 RRC A XCH A,R6 RRC A DJNZ R0,L907F MOV R7,A MOV 032H,A MOV A,#03CH ADD A,R1 MOV DPL,A CLR A ADDC A,#034H MOV DPH,A MOV A,R7 MOVX @DPTR,A MOV R7,005H MOV A,R7 SWAP A ANL A,#0F0H MOV R7,A MOV A,#03FH ADD A,R1 MOV DPL,A CLR A ADDC A,#034H MOV DPH,A MOV A,R7 MOVX @DPTR,A MOV A,#042H ADD A,R1 MOV DPL,A CLR A ADDC A,#034H MOV DPH,A MOVX A,@DPTR CJNE A,032H,L90BB MOV R7,#000H SJMP L90BD ; L90BB: MOV R7,#001H ; L90BD: RET ; ; L90BE: MOV DPTR,#L353F MOV A,R7 MOVX @DPTR,A INC DPTR MOV A,R5 MOVX @DPTR,A CLR A INC DPTR MOVX @DPTR,A MOV DPTR,#L57B0 MOVX A,@DPTR MOV R7,A LCALL L12A2 MOV DPTR,#L57AF MOVX A,@DPTR ANL A,#060H ORL A,#080H MOV R7,A LCALL L129C MOV DPTR,#L353F MOVX A,@DPTR MOV DPTR,#L860B MOVC A,@A+DPTR MOV R7,A MOV DPTR,#L7F01 MOVX A,@DPTR ANL A,#0E0H MOV R6,A MOV A,R7 ORL A,R6 MOVX @DPTR,A MOV DPTR,#L7F0D MOVX A,@DPTR ORL A,#001H MOVX @DPTR,A ; L90F7: MOV DPTR,#L7F0D MOVX A,@DPTR JB ACC.0,L90F7 LCALL LA527 ; L9101: MOV DPTR,#L3540 MOVX A,@DPTR MOV R7,A MOV DPTR,#L353F MOVX A,@DPTR CLR C SUBB A,R7 JNC L914F MOVX A,@DPTR MOV R7,A MOV DPTR,#L860C MOVC A,@A+DPTR MOV R6,A MOV DPTR,#L7F01 MOVX A,@DPTR ANL A,#0E0H MOV R5,A MOV A,R6 ORL A,R5 MOVX @DPTR,A MOV DPTR,#L7F0D MOVX A,@DPTR ORL A,#001H MOVX @DPTR,A MOV DPTR,#L3541 MOVX A,@DPTR MOV R6,A PUSH 006H INC DPTR MOVX A,@DPTR MOV R5,A INC DPTR MOVX A,@DPTR MOV R3,A LCALL L8FEF POP ACC ORL A,R7 MOV DPTR,#L3541 MOVX @DPTR,A MOV DPTR,#L353F MOVX A,@DPTR INC A MOVX @DPTR,A ; L9143: MOV DPTR,#L7F0D MOVX A,@DPTR JB ACC.0,L9143 LCALL LA527 SJMP L9101 ; L914F: MOV DPTR,#L3541 MOVX A,@DPTR MOV R6,A PUSH 006H MOV DPTR,#L353F MOVX A,@DPTR MOV R7,A MOV DPTR,#L3542 MOVX A,@DPTR MOV R5,A INC DPTR MOVX A,@DPTR MOV R3,A LCALL L8FEF POP ACC ORL A,R7 MOV DPTR,#L3541 MOVX @DPTR,A MOV DPTR,#L57AF MOVX A,@DPTR ANL A,#07FH MOV R7,A LCALL L129C MOV DPTR,#L3541 MOVX A,@DPTR MOV R7,A RET ; ; L917D: MOV R6,#034H MOV R7,#042H MOV R4,#034H MOV R5,#03CH MOV R3,#003H LJMP L7175 ; ; L918A: MOV DPTR,#L3544 MOV A,R5 MOVX @DPTR,A INC DPTR MOV A,R3 MOVX @DPTR,A MOV DPTR,#L3544 MOVX A,@DPTR MOV R3,A ADD A,#03CH LCALL L91B1 MOV DPTR,#L3544 MOVX A,@DPTR MOV R3,A ADD A,#042H MOV DPL,A CLR A ADDC A,#034H MOV R7,DPL MOV R6,A MOV A,#03CH ADD A,R3 LJMP L91B1 ; ; L91B1: MOV DPL,A CLR A ADDC A,#034H MOV R5,DPL MOV R4,A MOV DPTR,#L3545 MOVX A,@DPTR CLR C SUBB A,R3 INC A MOV R3,A LJMP L7175 ; ; L91C4: MOV DPTR,#L3546 MOV A,R7 MOVX @DPTR,A MOV DPTR,#L3458 MOVX A,@DPTR DEC A JZ L91F1 DEC A JZ L9218 ADD A,#002H JNZ L9222 MOV DPTR,#L3546 MOVX A,@DPTR JZ L9222 LCALL L741C MOV DPTR,#L3459 LCALL L1FB5 MOV DPTR,#L3458 MOV A,#001H MOVX @DPTR,A MOV DPTR,#L345D MOVX @DPTR,A RET ; ; L91F1: MOV DPTR,#L3546 MOVX A,@DPTR JZ L9218 MOV DPTR,#L3459 LCALL L1F9D LCALL L55B9 CLR A MOV R3,#040H MOV R2,#00BH MOV R1,A MOV R0,A SETB C LCALL L1EF4 JNC L9222 MOV DPTR,#L3458 MOV A,#002H MOVX @DPTR,A MOV DPTR,#L345D MOVX @DPTR,A RET ; ; L9218: MOV DPTR,#L3546 MOVX A,@DPTR JNZ L9222 MOV DPTR,#L3458 MOVX @DPTR,A ; L9222: RET ; ; L9223: LCALL L88CC MOV DPTR,#L3547 MOV A,R6 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A LCALL LA4ED JNC L923A CLR A MOV DPTR,#L3547 MOVX @DPTR,A INC DPTR MOVX @DPTR,A ; L923A: MOV DPTR,#L3547 MOVX A,@DPTR INC DPTR JNB ACC.5,L924C MOV DPTR,#L5631 MOVX A,@DPTR CJNE A,#008H,L924C LCALL LDA9C ; L924C: MOV DPTR,#L3547 MOVX A,@DPTR INC DPTR JNB ACC.7,L9258 MOV R7,#001H SJMP L925A ; L9258: MOV R7,#000H ; L925A: LCALL L91C4 MOV DPTR,#L3547 MOVX A,@DPTR INC DPTR JNB ACC.6,L9269 MOV R7,#001H SJMP L926B ; L9269: MOV R7,#000H ; L926B: LCALL LE8C8 MOV DPTR,#L5631 MOVX A,@DPTR MOV R7,A XRL A,#00AH JZ L927D MOV DPTR,#L44A9 MOVX A,@DPTR JNZ L9291 ; L927D: MOV DPTR,#L3547 MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A JNB ACC.0,L9291 JNB ACC.1,L9291 MOV DPTR,#L34A0 MOV A,#001H MOVX @DPTR,A ; L9291: MOV DPTR,#L3547 MOVX A,@DPTR ANL A,#01FH MOVX @DPTR,A INC DPTR MOVX A,@DPTR ANL A,#09FH MOVX @DPTR,A CLR A MOV R6,A MOV A,R7 CJNE A,#008H,L92BB MOV DPTR,#L3456 MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A MOV DPTR,#L3547 MOVX A,@DPTR XRL A,R4 JNZ L92B5 INC DPTR MOVX A,@DPTR XRL A,R5 ; L92B5: JZ L92D5 MOV R6,#001H SJMP L92D5 ; L92BB: MOV DPTR,#L3456 MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR CPL A MOV R5,A MOV A,R4 CPL A MOV R4,A MOV DPTR,#L3547 MOVX A,@DPTR ANL A,R4 MOV R4,A INC DPTR MOVX A,@DPTR ANL A,R5 ORL A,R4 JZ L92D5 MOV R6,#001H ; L92D5: MOV DPTR,#L3547 MOVX A,@DPTR MOV R5,A INC DPTR MOVX A,@DPTR MOV DPTR,#L3456 XCH A,R5 MOVX @DPTR,A INC DPTR MOV A,R5 MOVX @DPTR,A MOV R7,006H RET ; ; L92E7: CLR C MOV A,R6 SUBB A,#017H JNC L9306 MOV A,R5 SUBB A,#000H MOV A,R4 SUBB A,#017H JNC L9306 MOV A,R7 ADD A,R5 MOV R7,A MOV A,R6 ADDC A,R4 MOV R6,A SETB C MOV A,R7 SUBB A,#000H MOV A,R6 SUBB A,#017H JNC L9306 SJMP L9307 ; L9306: CLR C ; L9307: RET ; ; L9308: MOV DPTR,#L3549 MOV A,R6 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A MOV A,R5 ADD A,#070H MOV R7,A CLR A ADDC A,R4 MOV R6,A MOV R5,003H MOV R4,#000H MOV DPTR,#L3549 MOVX A,@DPTR MOV R2,A INC DPTR MOVX A,@DPTR MOV R3,A MOV DPTR,#L5B5D MOV A,#0A0H MOVX @DPTR,A LCALL L12D2 MOV A,R7 JNZ L9332 MOV R7,A SJMP L9334 ; L9332: MOV R7,#009H ; L9334: RET ; ; L9335: MOV A,R7 ADD A,#070H MOV R7,A CLR A ADDC A,R6 MOV R6,A MOV R4,#000H MOV R2,#034H MOV R3,#089H MOV DPTR,#L5C06 MOV A,#0A0H MOVX @DPTR,A LCALL L12CC MOV A,R7 JNZ L9351 MOV R7,A SJMP L9353 ; L9351: MOV R7,#009H ; L9353: RET ; ; L9354: MOV R4,005H MOV R5,003H MOV A,R4 MOV R3,A MOV R2,#000H MOV DPTR,#L352C MOV A,#001H MOVX @DPTR,A MOV DPTR,#L354F MOVX A,@DPTR MOV DPTR,#L352D MOVX @DPTR,A LCALL L8A75 CJNE R7,#001H,L9373 MOV R7,#000H RET ; ; L9373: MOV R7,#007H RET ; ; L9376: MOV DPTR,#L3550 LCALL LA4C0 MOV A,R3 MOVX @DPTR,A MOV R6,#035H MOV R7,#050H MOVX A,@DPTR MOV R3,A MOV R5,#001H LCALL L89F0 CJNE R7,#001H,L93A1 MOV R6,#034H MOV R7,#089H MOV DPTR,#L3551 MOVX A,@DPTR MOV R5,A INC DPTR MOVX A,@DPTR MOV R3,A LCALL L8BE2 CJNE R7,#001H,L93A1 MOV R7,#000H RET ; ; L93A1: MOV R7,#007H RET ; ; L93A4: MOV DPTR,#L3555 MOV A,R4 MOVX @DPTR,A INC DPTR MOV A,R5 MOVX @DPTR,A MOV R5,003H MOV DPTR,#L3555 MOVX A,@DPTR MOV R2,A INC DPTR MOVX A,@DPTR MOV R3,A MOV DPTR,#L352C MOV A,#002H MOVX @DPTR,A MOV DPTR,#L3558 MOVX A,@DPTR MOV DPTR,#L352D MOVX @DPTR,A LCALL L8A75 CJNE R7,#001H,L93CD MOV R7,#000H RET ; ; L93CD: MOV R7,#007H RET ; ; L93D0: MOV DPTR,#L3559 LCALL LA4BD MOV A,R3 MOVX @DPTR,A MOV R6,#035H MOV R7,#059H MOVX A,@DPTR MOV R3,A MOV R5,#002H LCALL L89F0 CJNE R7,#001H,L93FB MOV R6,#034H MOV R7,#089H MOV DPTR,#L355B MOVX A,@DPTR MOV R5,A INC DPTR MOVX A,@DPTR MOV R3,A LCALL L8BE2 CJNE R7,#001H,L93FB MOV R7,#000H RET ; ; L93FB: MOV R7,#007H RET ; ; L93FE: CLR A MOV R7,A LCALL L_EnableRumble CLR A MOV R7,A LCALL L8EEB LCALL L8EDC LJMP L_DisableSpeaker ; ; L940E: MOV R0,#0AAH MOV R4,#034H MOV R5,#001H MOV R3,#0FFH MOV R2,#086H MOV R1,#09FH MOV R6,#000H MOV R7,#04FH LJMP L21F1
; Initialize variables
; Initialize variables (notably request flags) ; 9421 L_InitVariables: LCALL L940E MOV DPTR,#L3471 MOV A,#030H MOVX @DPTR,A CLR A MOV DPTR,#L349C MOVX @DPTR,A MOV DPTR,#L3476 MOVX @DPTR,A MOV DPTR,#L3474 MOVX @DPTR,A MOV DPTR,#L347A MOVX @DPTR,A MOV DPTR,#L347C MOVX @DPTR,A MOV DPTR,#L3485 MOVX @DPTR,A INC DPTR MOVX @DPTR,A MOV DPTR,#L3499 MOVX @DPTR,A MOV DPTR,#L3453 MOVX @DPTR,A INC DPTR MOVX @DPTR,A MOV DPTR,#L344D MOVX @DPTR,A MOV DPTR,#L3510 MOVX @DPTR,A INC DPTR MOVX @DPTR,A MOV DPTR,#L349B MOVX @DPTR,A MOV DPTR,#L349A MOVX @DPTR,A MOV DPTR,#L34A8 MOVX @DPTR,A INC DPTR MOVX @DPTR,A RET ; ; L9468: MOV R3,#001H MOV R2,#034H MOV R1,#0A2H MOV DPTR,#L5C5C MOV A,#006H MOVX @DPTR,A INC DPTR MOVX @DPTR,A CLR 022H CLR A MOV R5,A LJMP L122A ; ; L947D: MOV R6,#034H MOV R7,#0A2H MOV R5,#006H LCALL L7B6A LJMP L9468 ; ; L9489: MOV R6,#038H MOV R7,#041H MOV R4,#034H MOV R5,#0A2H MOV R3,#006H LCALL L7195 MOV A,R7 JZ L949C MOV R7,#001H RET ; ; L949C: MOV R7,#000H RET ; ; L949F: LCALL LA5F8 MOV DPTR,#L7F74 MOV A,#0B7H MOVX @DPTR,A MOV DPTR,#L7E49 MOV A,#004H MOVX @DPTR,A MOV DPTR,#L7E45 MOV A,#0D0H MOVX @DPTR,A MOV DPTR,#L5895 MOV A,#001H MOVX @DPTR,A CLR A MOV DPTR,#L55A9 MOVX @DPTR,A MOV DPTR,#L5595 MOV A,#0FAH MOVX @DPTR,A MOV DPTR,#L5893 MOV A,#001H MOVX @DPTR,A MOV DPTR,#L349E MOVX A,@DPTR JZ L94D4 LJMP L9559 ; ; L94D4: LCALL LE459 MOV DPTR,#L7F48 MOV A,#001H MOVX @DPTR,A MOV DPTR,#L7F05 MOVX A,@DPTR ANL A,#0BFH MOVX @DPTR,A MOV R6,#034H MOV R7,#000H MOV R5,#019H LCALL L7B6A MOV R7,#001H LCALL L8C11 LCALL L889B LCALL L12AE MOV R2,006H MOV R1,007H MOV R3,#001H MOV R0,#02FH MOV R4,#034H MOV R5,#001H MOV R6,#000H MOV R7,#007H LCALL L21F1 MOV DPTR,#L34F9 MOVX A,@DPTR ANL A,#00FH ORL A,#0A0H MOVX @DPTR,A ANL A,#0F0H ORL A,#001H MOVX @DPTR,A MOV DPTR,#L345E MOV A,#037H MOVX @DPTR,A CLR A MOV DPTR,#L3403 LCALL L8E83 LCALL L8C5C LCALL L_InitVariables LCALL LA617 CLR A MOV DPTR,#L345D MOVX @DPTR,A MOV DPTR,#L349F MOVX @DPTR,A MOV DPTR,#L349E INC A LCALL LA57D INC DPTR MOVX @DPTR,A MOV R3,#001H MOV R2,#034H MOV R1,#0A2H MOV DPTR,#L5CDA MOV A,#006H MOVX @DPTR,A CLR A MOV R5,A LCALL L1224 JC L956A LCALL L947D SJMP L956A ; L9559: MOV R3,#001H MOV R2,#056H MOV R1,#05DH MOV DPTR,#L4064 LCALL L1F9D CLR 01CH LCALL L4280 ; L956A: SETB C RET ; ; 956C Jump 1 L_JumpTable1: LCALL L8FC9 LCALL L9223 MOV R7,#001H RET ; ; L9575: MOV DPTR,#L3485 MOVX A,@DPTR JZ L957E LJMP L9651 ; ; L957E: MOV DPTR,#L3481 MOVX A,@DPTR MOV R7,A INC DPTR MOVX A,@DPTR MOV DPTR,#L3487 XCH A,R7 MOVX @DPTR,A INC DPTR LCALL LA549 MOV R7,A JZ L9599 INC DPTR MOVX A,@DPTR ANL A,#0FEH MOV R6,A CJNE R6,#0A0H,L95B5 ; L9599: MOV A,R7 JZ L959F LJMP L963A ; ; L959F: MOV DPTR,#L3481 MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A INC DPTR MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A LCALL L92E7 JC L95B5 LJMP L963A ; ; L95B5: SETB C MOV DPTR,#L3484 MOVX A,@DPTR SUBB A,#010H MOV DPTR,#L3483 MOVX A,@DPTR SUBB A,#000H JC L95C8 MOV R7,#010H SJMP L95CD ; L95C8: MOV DPTR,#L3484 MOVX A,@DPTR MOV R7,A ; L95CD: MOV DPTR,#L3486 LCALL LA549 DEC A JZ L95EA DEC A JZ L95FF ADD A,#002H JNZ L9611 LCALL LA501 LCALL L9335 MOV DPTR,#L3499 MOV A,R7 MOVX @DPTR,A SJMP L9617 ; L95EA: MOV DPTR,#L3482 LCALL LA507 MOV DPTR,#L3480 MOVX A,@DPTR MOV R3,A LCALL L9376 MOV DPTR,#L3499 MOV A,R7 MOVX @DPTR,A SJMP L9617 ; L95FF: LCALL LA501 MOV DPTR,#L3480 MOVX A,@DPTR MOV R3,A LCALL L93D0 MOV DPTR,#L3499 MOV A,R7 MOVX @DPTR,A SJMP L9617 ; L9611: MOV DPTR,#L3499 MOV A,#006H MOVX @DPTR,A ; L9617: MOV DPTR,#L3486 MOVX A,@DPTR MOV R7,A MOV DPTR,#L3481 CLR A MOV B,R7 LCALL L1C56 MOV DPTR,#L3486 MOVX A,@DPTR MOV R7,A CLR C MOV DPTR,#L3484 MOVX A,@DPTR SUBB A,R7 MOVX @DPTR,A MOV DPTR,#L3483 MOVX A,@DPTR SUBB A,#000H MOVX @DPTR,A SJMP L9640 ; L963A: MOV DPTR,#L3499 MOV A,#008H MOVX @DPTR,A ; L9640: MOV DPTR,#L3485 MOV A,#001H MOVX @DPTR,A MOV DPTR,#L3499 MOVX A,@DPTR JZ L9651 CLR A MOV DPTR,#L3486 MOVX @DPTR,A ; L9651: LCALL L8FC9 LCALL L9223 MOV R7,#001H RET ; ; L965A: LCALL L8FC9 LCALL L9223 MOV R7,#001H RET ; ; L9663: LCALL L8FC9 MOV DPTR,#L355D MOV A,R7 MOVX @DPTR,A LCALL L9223 MOV DPTR,#L355D MOVX A,@DPTR ORL A,R7 MOV R7,A RET ; ; L9675: MOV R5,#002H CLR A MOV R7,A LCALL L90BE MOV DPTR,#L355E LCALL LA50F MOV DPTR,#L355E MOVX @DPTR,A LCALL L9223 MOV DPTR,#L355E MOVX A,@DPTR ORL A,R7 MOV R7,A RET ; ; L9690: MOV R7,#008H LCALL L8C7B MOV R7,#008H LCALL L8CB5 MOV DPTR,#L355F LCALL LA50F MOV DPTR,#L355F MOVX @DPTR,A LCALL L9223 MOV DPTR,#L355F MOVX A,@DPTR ORL A,R7 MOV R7,A RET ; ; L96AE: LCALL L8EFB MOV R5,#002H CLR A MOV R7,A LCALL L90BE LCALL L8F19 LCALL L8FC9 LCALL L9223 MOV R7,#001H RET ; ; L96C4: MOV R7,#013H LCALL L8C7B MOV R7,#013H LCALL L8CB5 MOV DPTR,#L3560 LCALL LA50F MOV DPTR,#L3560 MOVX @DPTR,A LCALL L9223 MOV DPTR,#L3560 MOVX A,@DPTR ORL A,R7 MOV R7,A RET ; ; L96E2: MOV R7,#010H LCALL L8C7B MOV R5,#002H CLR A MOV R7,A LCALL L90BE MOV DPTR,#L3561 MOV A,R7 MOVX @DPTR,A MOVX A,@DPTR MOV R6,A PUSH 006H MOV R7,#010H LCALL L8CB5 POP ACC ORL A,R7 MOV R7,A MOV DPTR,#L3561 LCALL LA510 MOV DPTR,#L3561 ; L9709: MOVX @DPTR,A LCALL L9223 MOV DPTR,#L3561 MOVX A,@DPTR ORL A,R7 MOV R7,A RET ; ; L9714: LCALL L8EFB LCALL L8F13 MOV R7,#009H LCALL L8C7B MOV R7,#009H LCALL L8CB5 LCALL L8FC9 LCALL L9223 MOV R7,#001H RET ; ; L972D: LCALL L8EFB MOV R5,#002H CLR A MOV R7,A LCALL L90BE LCALL L8F13 MOV R7,#006H LCALL L8C7B MOV R7,#006H LCALL L8CB5 LCALL L8FC9 LCALL L9223 MOV R7,#001H RET ; ; L974D: LCALL L9223 MOV R7,#015H LCALL L8C7B MOV R7,#015H LCALL L8CB5 RET ; ; L975B: LCALL L8EFB CLR A MOV R5,A MOV R7,A LCALL L90BE MOV R5,#002H MOV R7,#002H LCALL L90BE LCALL L8F1F LCALL L9223 MOV R7,#001H RET ; ; L9774: LCALL L8EF4 MOV R5,#001H MOV R7,#001H LCALL L90BE LCALL L8F1F LCALL L9223 MOV R7,#001H RET ; ; L9787: MOV DPTR,#L5631 MOVX A,@DPTR XRL A,#008H JZ L9792 MOV R7,#030H RET ; ; L9792: MOV DPTR,#L3477 MOVX A,@DPTR JZ L979B MOV R7,#022H RET ; ; L979B: MOV DPTR,#L347A MOVX A,@DPTR JNZ L97A7 MOV DPTR,#L3402 MOVX A,@DPTR JZ L97AA ; L97A7: MOV R7,#020H RET ; ; L97AA: MOV DPTR,#L347C MOVX A,@DPTR JZ L97B3 MOV R7,#021H RET ; ; L97B3: MOV DPTR,#L3471 MOVX A,@DPTR MOV R7,A RET ; ; L97B9: MOV A,R7 JZ L97C9 ADD A,#0E0H MOV R7,A LCALL L8774 MOV DPTR,#L347B MOV A,R7 MOVX @DPTR,A SJMP L97D1 ; L97C9: LCALL L9663 CLR A MOV DPTR,#L347B MOVX @DPTR,A ; L97D1: LCALL L8C1A MOV DPTR,#L347B MOVX A,@DPTR MOV R7,A RET ; ; L97DA: MOV DPTR,#L3472 MOVX A,@DPTR MOV R7,A CJNE A,#03EH,L97EA MOV DPTR,#L3471 MOV A,#03FH MOVX @DPTR,A SJMP L97F4 ; L97EA: MOV A,R7 CJNE A,#03FH,L97F4 MOV DPTR,#L3471 MOV A,#03EH MOVX @DPTR,A ; L97F4: MOV DPTR,#L3472 MOVX A,@DPTR MOV R7,A LCALL L97B9 RET
; Data Reports
; Report 30H
; ; 97FD Input Report Invalid L_InputReportInvalid: MOV DPTR,#L3453 MOVX A,@DPTR JZ L9809 MOV R4,#080H MOV R5,#000H SJMP L980D ; L9809: MOV R4,#000H MOV R5,#000H ; L980D: MOV DPTR,#L3456 MOVX A,@DPTR ORL A,R4 MOV DPTR,#L34FB MOVX @DPTR,A MOV DPTR,#L3457 MOVX A,@DPTR ORL A,R5 MOV DPTR,#L34FC MOVX @DPTR,A MOV A,R7 JZ L9828 MOV DPTR,#L3453 MOVX A,@DPTR INC DPTR MOVX @DPTR,A ; L9828: RET
; Report 31H
; 9829 Data Report 31H L_DataReport31H: MOV DPTR,#L3562 MOV A,R7 MOVX @DPTR,A MOV R6,#034H MOV R7,#0FDH MOV R3,#002H CLR A MOV R5,A LCALL L918A MOV DPTR,#L3562 MOVX A,@DPTR MOV R7,A LCALL L_InputReportInvalid MOV DPTR,#L34FB PUSH DPH PUSH DPL MOVX A,@DPTR MOV R7,A MOV DPTR,#L343F MOVX A,@DPTR ANL A,#0C0H MOV R6,A CLR C RRC A MOV R6,A MOV A,R7 ORL A,R6 POP DPL POP DPH MOVX @DPTR,A MOV DPTR,#L34FC PUSH DPH PUSH DPL MOVX A,@DPTR MOV R7,A MOV DPTR,#L3441 MOVX A,@DPTR ANL A,#080H MOV R6,A CLR C RRC A MOV R6,A MOV DPTR,#L3440 MOVX A,@DPTR ANL A,#080H MOV R5,A RRC A RRC A ANL A,#03FH ORL A,R6 MOV R6,A MOV A,R7 ORL A,R6 POP DPL POP DPH MOVX @DPTR,A RET
; Extension Bytes
; 9883 R7 Extension Bytes L_ExtensionBytes: MOV DPTR,#L3563 MOV A,R7 MOVX @DPTR,A MOV R3,005H MOV R6,#034H MOV R7,#0FDH MOV R4,#034H MOV R5,#01AH LCALL L7175 MOV DPTR,#L3563 MOVX A,@DPTR MOV R7,A LJMP L_InputReportInvalid
; Report 32H
; 989D Data Report 32H L_DataReport32H: MOV R5,#008H LJMP L_ExtensionBytes
; Report 33H
; 98A2 Data Report 33H L_DataReport33H: MOV DPTR,#L3564 LCALL LA5A6 MOV R3,#00CH LCALL L7175 MOV DPTR,#L3564 MOVX A,@DPTR MOV R7,A LJMP L_DataReport31H
; Report 34H
; ; 98B5 Data Report 34H L_DataReport34H: MOV R5,#013H LJMP L_ExtensionBytes
; Report 35H
; ; 98BA Data Report 35H L_DataReport35H: MOV DPTR,#L3565 MOV A,R7 MOVX @DPTR,A MOV R6,#035H MOV R7,#000H MOV R4,#034H MOV R5,#01AH MOV R3,#010H LCALL L7175 MOV DPTR,#L3565 MOVX A,@DPTR MOV R7,A LJMP L_DataReport31H
; Report 36H
; ; 98D4 Data Report 36H L_DataReport36H: MOV DPTR,#L3566 MOV A,R7 MOVX @DPTR,A MOV R6,#034H MOV R7,#0FDH MOV R4,#034H MOV R5,#05FH MOV R3,#00AH LCALL L7175 MOV R6,#035H MOV R7,#007H MOV R4,#034H MOV R5,#01AH MOV R3,#009H LCALL L7175 MOV DPTR,#L3566 MOVX A,@DPTR MOV R7,A LJMP L_InputReportInvalid
; Report 37H
; ; 98FB Data Report 37H L_DataReport37H: MOV DPTR,#L3567 LCALL LA5A6 MOV R3,#00AH LCALL L7175 MOV R6,#035H MOV R7,#00AH MOV R4,#034H MOV R5,#01AH MOV R3,#006H LCALL L7175 MOV DPTR,#L3567 MOVX A,@DPTR MOV R7,A LJMP L_DataReport31H
; Report 3DH
; ; 991B Data Report 3DH L_DataReport3DH: MOV R6,#034H MOV R7,#0FBH MOV R4,#034H MOV R5,#01AH MOV R3,#015H LJMP L7175
; Report 3EH
; ; 9928 Data Report 3EH L_DataReport3EH: LCALL LA5B1 LCALL L7175 MOV DPTR,#L343C LCALL LA4A3 MOV DPTR,#L34FB PUSH DPH PUSH DPL LCALL LA5D2 MOV DPTR,#L343F MOVX A,@DPTR ANL A,#080H ORL A,R5 MOV R5,A MOV A,R6 ORL A,R5 POP DPL POP DPH LCALL LA538 LJMP L917D
; Report 3FH
; ; 9952 Data Report 3FH L_DataReport3FH: LCALL LA5B1 LCALL L7175 MOV DPTR,#L343D LCALL LA4A3 SWAP A ANL A,#0F0H MOV R7,A MOV DPTR,#L34FB PUSH DPH PUSH DPL LCALL LA5D2 MOV DPTR,#L3440 MOVX A,@DPTR ANL A,#080H ORL A,R5 MOV R5,A MOV A,R6 ORL A,R5 POP DPL POP DPH LCALL LA538 LJMP L917D
; Report 20H
;9980 Bluetooth input report handler (ID 0x20) ; Status information message formatting ; Very interesting, contains a lot of hints on the usage of variables ; in the 34xx-35xx area L_InputReport20H: MOV R6,007H MOV DPTR,#L34FA MOV A,#020H MOVX @DPTR,A MOV DPTR,#L344B MOVX A,@DPTR JZ L9992 MOV R7,#001H SJMP L9994 ; L9992: MOV R7,#000H ; L9994: MOV A,R7 ANL A,#001H MOV R7,A MOV DPTR,#L34FD MOVX A,@DPTR ANL A,#0FEH ORL A,R7 MOVX @DPTR,A MOV DPTR,#L3400 MOVX A,@DPTR JZ L99AA MOV R7,#001H SJMP L99AC ; L99AA: MOV R7,#000H ; L99AC: MOV A,R7 ANL A,#001H MOV R7,A ADD A,ACC MOV R7,A MOV DPTR,#L34FD MOVX A,@DPTR ANL A,#0FDH ORL A,R7 MOVX @DPTR,A MOV DPTR,#L3452 MOVX A,@DPTR JZ L99C5 MOV R7,#001H SJMP L99C7 ; L99C5: MOV R7,#000H ; L99C7: MOV A,R7 ANL A,#001H MOV R7,A ADD A,ACC ADD A,ACC MOV R7,A MOV DPTR,#L34FD MOVX A,@DPTR ANL A,#0FBH ORL A,R7 MOVX @DPTR,A MOV DPTR,#L_GPIO_port MOVX A,@DPTR JB ACC.0,L99EA MOV DPTR,#L_SpeakerEnabled MOVX A,@DPTR JNB ACC.3,L99EA MOV R7,#001H SJMP L99EC ; L99EA: MOV R7,#000H ; L99EC: MOV A,R7 ANL A,#001H MOV R7,A RLC A RLC A RLC A ANL A,#0F8H MOV R7,A MOV DPTR,#L34FD MOVX A,@DPTR ANL A,#0F7H ORL A,R7 MOV R7,A MOVX @DPTR,A MOV DPTR,#L344C MOVX A,@DPTR ANL A,#00FH MOV R5,A SWAP A ANL A,#0F0H MOV R5,A MOV A,R7 ANL A,#00FH ORL A,R5 MOV DPTR,#L34FD MOVX @DPTR,A MOV DPTR,#L7F2F MOVX A,@DPTR MOV R7,A SWAP A ANL A,#00FH MOV DPTR,#L34FE MOVX @DPTR,A INC DPTR MOVX A,@DPTR ANL A,#0F0H MOVX @DPTR,A ANL A,#00FH MOVX @DPTR,A MOV DPTR,#L565B MOVX A,@DPTR MOV DPTR,#L3500 MOVX @DPTR,A MOV R7,006H LCALL L_InputReportInvalid MOV A,R7 JZ L9A3F CLR A MOV DPTR,#L3402 MOVX @DPTR,A MOV DPTR,#L347A MOVX @DPTR,A ; L9A3F: RET
; Report 21H
; ;9a40 Bluetooth input report handler (ID 0x21) L_InputReport21H: MOV DPTR,#L3568 MOV A,R7 MOVX @DPTR,A MOV DPTR,#L3487 MOVX A,@DPTR MOV R7,A INC DPTR MOVX A,@DPTR MOV DPTR,#L34FE XCH A,R7 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A MOV DPTR,#L3499 MOVX A,@DPTR ANL A,#00FH MOV R7,A MOV DPTR,#L34FD MOVX A,@DPTR ANL A,#0F0H ORL A,R7 MOV R7,A MOVX @DPTR,A MOV DPTR,#L3486 MOVX A,@DPTR DEC A ANL A,#00FH MOV R6,A SWAP A ANL A,#0F0H MOV R6,A MOV A,R7 ANL A,#00FH ORL A,R6 MOV DPTR,#L34FD MOVX @DPTR,A MOV R6,#035H MOV R7,#000H MOV R4,#034H MOV R5,#089H MOV DPTR,#L3486 MOVX A,@DPTR MOV R3,A LCALL L7175 MOV DPTR,#L3486 MOVX A,@DPTR MOV R5,A ADD A,#000H MOV DPL,A CLR A ADDC A,#035H MOV R7,DPL MOV R6,A CLR C MOV A,#010H SUBB A,R5 MOV R5,A LCALL L7B6A MOV DPTR,#L3568 MOVX A,@DPTR MOV R7,A LCALL L_InputReportInvalid MOV DPTR,#L3568 MOVX A,@DPTR JZ L9AC7 CLR A MOV DPTR,#L3485 MOVX @DPTR,A MOV DPTR,#L3483 MOVX A,@DPTR JNZ L9ABA INC DPTR MOVX A,@DPTR ; L9ABA: JZ L9AC2 MOV DPTR,#L3499 MOVX A,@DPTR JZ L9AC7 ; L9AC2: CLR A MOV DPTR,#L347C MOVX @DPTR,A ; L9AC7: RET
; Report 22H
; ; 9AC8: ?? Input Report 22H L_InputReport22H: MOV R6,007H MOV DPTR,#L3478 MOVX A,@DPTR MOV DPTR,#L34FD MOVX @DPTR,A MOV DPTR,#L3479 MOVX A,@DPTR MOV DPTR,#L34FE MOVX @DPTR,A LCALL L_InputReportInvalid MOV A,R7 JZ L9AE5 CLR A MOV DPTR,#L3477 MOVX @DPTR,A ; L9AE5: RET ; ; L9AE6: MOV DPTR,#L3569 MOV A,R7 MOVX @DPTR,A MOVX A,@DPTR MOV R6,A JZ L9B05 MOV R7,005H ADD A,#0E0H MOV R5,A LCALL L87E1 MOV DPTR,#L3569 MOVX A,@DPTR MOV DPTR,#L863E MOVC A,@A+DPTR MOV DPTR,#L356A MOVX @DPTR,A SJMP L9B0A ; L9B05: CLR A MOV DPTR,#L356A MOVX @DPTR,A ; L9B0A: MOV DPTR,#L3569 MOVX A,@DPTR MOV DPTR,#L34FA MOVX @DPTR,A MOV DPTR,#L356A MOVX A,@DPTR MOV R7,A RET ; ; L9B18: MOV R5,#001H LCALL L9AE6 MOV R5,007H MOV A,R5 JZ L9B29 MOV R6,#034H MOV R7,#0F9H LCALL L4FDF ; L9B29: RET ; ; L9B2A: MOV DPTR,#L345D MOVX A,@DPTR CJNE A,#002H,L9B48 MOV DPTR,#L34A8 MOVX A,@DPTR JZ L9B43 MOV R6,#056H MOV R7,#007H LCALL LD744 MOV R7,#016H LJMP LDC6E ; ; L9B43: MOV R7,#015H LJMP LDC6E ; ; L9B48: LCALL L7BAD MOV DPTR,#L3F28 MOVX A,@DPTR MOV R6,A MOV A,R7 CLR C SUBB A,R6 JNC L9B7D MOV DPTR,#L347B MOVX A,@DPTR XRL A,#001H JZ L9B67 MOV DPTR,#L3474 MOVX A,@DPTR JNZ L9B67 INC DPTR MOVX A,@DPTR JZ L9B7D ; L9B67: MOV DPTR,#L3472 MOVX A,@DPTR MOV R7,A LCALL L9B18 MOV DPTR,#L3472 MOVX A,@DPTR CLR C SUBB A,#030H JC L9B7D CLR A MOV DPTR,#L3475 MOVX @DPTR,A ; L9B7D: LCALL L7BAD MOV A,R7 JZ L9B87 MOV R7,#001H SJMP L9B89 ; L9B87: MOV R7,#000H ; L9B89: MOV DPTR,#L4FFE MOV A,R7 MOVX @DPTR,A RET ; ; L9B8F: LCALL L88CC MOV A,R6 ANL A,#01FH MOV DPTR,#L3456 MOVX @DPTR,A MOV A,R7 ANL A,#09FH INC DPTR MOVX @DPTR,A CLR A MOV DPTR,#L345D MOVX @DPTR,A MOV DPTR,#L3458 MOVX A,@DPTR CJNE A,#001H,L9BAD MOV A,#002H MOVX @DPTR,A ; L9BAD: RET ; ; L9BAE: CLR A MOV DPTR,#L356B MOVX @DPTR,A ; L9BB3: MOV DPTR,#L4068 MOVX A,@DPTR MOV R7,A MOV DPTR,#L356B MOVX A,@DPTR CLR C SUBB A,R7 JNC L9BCB LCALL LEB4C MOV DPTR,#L356B MOVX A,@DPTR INC A MOVX @DPTR,A SJMP L9BB3 ; L9BCB: LJMP LEBA1 ; ; L9BCE: CLR A MOV DPTR,#L34A1 MOVX @DPTR,A LCALL L8E87 MOV DPTR,#L349F MOVX A,@DPTR JZ L9BE5 LCALL L0FFC CLR A MOV DPTR,#L349F MOVX @DPTR,A RET ; ; L9BE5: MOV DPTR,#L34A0 MOVX A,@DPTR JZ L9BF4 LCALL LDBE6 MOV DPTR,#L34A1 LJMP LA57B ; ; L9BF4: LCALL L8935 JC L9C23 MOV DPTR,#L3458 MOVX A,@DPTR XRL A,#001H JZ L9C23 MOV DPTR,#L7EA0 MOVX A,@DPTR JNB ACC.0,L9C0D LCALL L1038 JNC L9C23 ; L9C0D: CLR A MOV R7,A LCALL L8C11 LCALL L8937 LCALL LE945 LCALL L8C5C MOV R7,#001H LCALL L8C11 LCALL L9BAE ; L9C23: RET ; ; L9C24: LCALL LE890 MOV DPTR,#L3476 MOVX A,@DPTR JNZ L9C33 MOV DPTR,#L3471 MOV A,#030H MOVX @DPTR,A ; L9C33: MOV DPTR,#L3475 LJMP LA57B ; ; L9C39: LCALL LE8A4 LCALL L_InitVariables MOV DPTR,#L5633 MOVX A,@DPTR JNZ L9C63 MOV DPTR,#L5631 MOVX A,@DPTR CJNE A,#00AH,L9C5C MOV DPTR,#L5604 MOVX A,@DPTR INC A MOV R7,A MOV DPTR,#L44A9 MOVX A,@DPTR MOV R6,A MOV A,R7 CLR C SUBB A,R6 JC L9C63 ; L9C5C: CLR A MOV DPTR,#L345D LCALL L8E83 ; L9C63: MOV R7,#0FAH LJMP L7963
; Output Reports
; Report 10H
; ; 9C68 Bluetooth output report handler (ID 0x10) L_OutputReport10H: LCALL L_Helper1 JNZ L_Report10Error INC DPTR INC DPTR MOVX A,@DPTR ANL A,#001H MOV R7,A MOV DPTR,#L34AC MOVX A,@DPTR ANL A,#0FEH ORL A,R7 MOVX @DPTR,A ANL A,#001H MOV R7,A LCALL L_EnableRumble MOV R7,#000H RET ; ; 9C84 error 3 L_Report10Error: MOV R7,#003H RET
; Report 11H
; ; 9C87 Output Report 11H L_OutputReport11H: LCALL L_Helper1 JNZ L9CA4 INC DPTR INC DPTR MOVX A,@DPTR MOV DPTR,#L34AF LCALL L_Store_A_at_DPTR MOV DPTR,#L34AF MOVX A,@DPTR MOV R7,A SWAP A ANL A,#00FH MOV R7,A LCALL L_EnableLEDs MOV R7,#000H RET ; ; L9CA4: MOV R7,#003H RET
; Report 12H
; ;9ca7 Output Report 12H (Set Channel) L_OutputReport12H: MOV R3,007H MOV R2,006H MOV A,R5 XRL A,#004H JNZ L9D02 LCALL LA560 INC DPTR MOVX A,@DPTR MOV R7,A CLR C SUBB A,#030H JC L9CC1 MOV A,R7 SETB C SUBB A,#037H JC L9CCD ; L9CC1: MOV A,R7 CLR C SUBB A,#03DH JC L9CFF MOV A,R7 SETB C SUBB A,#03FH JNC L9CFF ; L9CCD: MOV R6,#034H MOV R7,#0B2H MOV A,R3 ADD A,#002H MOV R5,A CLR A ADDC A,R2 MOV R4,A MOV R3,#002H LCALL L7175 MOV DPTR,#L34B2 LCALL L_LOAD_DPTR_TO_R7 MOV DPTR,#L34B3 MOVX A,@DPTR MOV DPTR,#L3471 MOVX @DPTR,A MOV DPTR,#L34B2 MOVX A,@DPTR MOV R7,A RRC A RRC A ANL A,#001H MOV DPTR,#L3474 MOVX @DPTR,A INC DPTR MOV A,#001H MOVX @DPTR,A MOV R7,#000H RET ; ; L9CFF: MOV R7,#005H RET ; ; L9D02: MOV R7,#003H RET
; Report 13H
; ; 9d05 Output Report 13H (??) L_OutputReport13H: LCALL L_Helper1 JNZ L9D27 INC DPTR INC DPTR MOVX A,@DPTR MOV DPTR,#L34B6 LCALL L_Store_A_at_DPTR MOV DPTR,#L34B6 LCALL L_Helper2 JNB ACC.0,L9D21 LCALL L8EC9 SJMP L9D24 ; L9D21: LCALL L8EDC ; L9D24: MOV R7,#000H RET ; ; L9D27: MOV R7,#003H RET
; Report 14H
; ; 9d2a Output Report 14H (??) L_OutputReport14H: LCALL L_Helper1 JNZ L9D4C INC DPTR INC DPTR MOVX A,@DPTR MOV DPTR,#L34B9 LCALL L_Store_A_at_DPTR MOV DPTR,#L34B9 LCALL L_Helper2 JNB ACC.0,L9D46 LCALL L_EnableSpeaker SJMP L9D49 ; L9D46: LCALL L_DisableSpeaker ; L9D49: MOV R7,#000H RET ; ; L9D4C: MOV R7,#003H RET
; Report 15H
; ; 9D4F output report 15H (Request Status Report) L_OutputReport15H: MOV DPL,R7 MOV DPH,R6 MOV A,R5 CJNE A,#003H,L9D69 INC DPTR INC DPTR MOVX A,@DPTR MOV DPTR,#L34BC LCALL L_Store_A_at_DPTR MOV DPTR,#L347A MOV A,#001H MOVX @DPTR,A MOV R7,#000H RET ; ; L9D69: MOV R7,#003H RET ; ; L9D6C: MOV DPTR,#L34BF LCALL LA54E DEC A JZ L9D89 DEC A JZ L9DA5 ADD A,#002H JNZ L9DBA LCALL LA4DB LCALL L9308 MOV DPTR,#L3479 MOV A,R7 MOVX @DPTR,A SJMP L9DC0 ; L9D89: MOV R6,#034H MOV R7,#0C4H MOV DPTR,#L34C2 LCALL LA4E5 MOV DPTR,#L34C0 MOVX A,@DPTR MOV DPTR,#L354F MOVX @DPTR,A LCALL L9354 MOV DPTR,#L3479 MOV A,R7 MOVX @DPTR,A SJMP L9DC0 ; L9DA5: LCALL LA4DB MOV DPTR,#L34C0 MOVX A,@DPTR MOV DPTR,#L3558 MOVX @DPTR,A LCALL L93A4 MOV DPTR,#L3479 MOV A,R7 MOVX @DPTR,A SJMP L9DC0 ; L9DBA: MOV DPTR,#L3479 MOV A,#006H MOVX @DPTR,A ; L9DC0: LCALL LA5DC INC DPTR MOV A,#016H MOVX @DPTR,A RET
; Report 16H
; ; 9dc8 Output report 16H (??) L_OutputReport16H: MOV R3,007H MOV R2,006H MOV A,R5 XRL A,#017H JNZ L9E27 LCALL LA555 ANL A,#01FH SETB C SUBB A,#010H JNC L9E27 LCALL LA560 LCALL L_LOAD_DPTR_TO_R7 LCALL LA560 MOVX A,@DPTR MOV R1,A RRC A RRC A ANL A,#003H MOV R7,A JZ L9DF8 LCALL LA560 INC DPTR MOVX A,@DPTR ANL A,#0FEH XRL A,#0A0H JNZ L9E12 ; L9DF8: MOV A,R7 JNZ L9E24 MOV A,R3 ADD A,#004H LCALL LA558 MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A LCALL LA555 ANL A,#01FH MOV R5,A MOV R4,#000H LCALL L92E7 JNC L9E24 ; L9E12: MOV DPTR,#L3511 MOVX A,@DPTR JZ L9E1B MOV R7,#004H RET ; ; L9E1B: MOV DPTR,#L3511 MOV A,#001H MOVX @DPTR,A MOV R7,#000H RET ; ; L9E24: MOV R7,#008H RET ; ; L9E27: MOV R7,#003H RET
; Report 17H
; ; 9e2a Output Report 17H L_OutputReport17H: MOV DPTR,#L356C MOV A,R6 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A MOV A,R5 XRL A,#008H JNZ L9EA2 MOV DPTR,#L356C MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A ADD A,#006H MOV DPL,A CLR A ADDC A,R6 MOV DPH,A MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR ORL A,R4 JZ L9EA2 MOV DPL,R7 MOV DPH,R6 INC DPTR INC DPTR LCALL L_LOAD_DPTR_TO_R7 MOV DPTR,#L347C MOVX A,@DPTR JNZ L9E9F MOV R6,#034H MOV R7,#0D6H MOV DPTR,#L356D MOVX A,@DPTR ADD A,#002H MOV R5,A MOV DPTR,#L356C MOVX A,@DPTR ADDC A,#000H MOV R4,A MOV R3,#006H LCALL L7175 CLR A MOV DPTR,#L3485 MOVX @DPTR,A MOV DPTR,#L356C MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R2,006H MOV R1,A MOV R3,#001H MOV R0,#07DH MOV R4,#034H MOV R5,#001H MOV R6,#000H MOV R7,#008H LCALL L21F1 MOV DPTR,#L347C MOV A,#001H MOVX @DPTR,A CLR A MOV DPTR,#L3499 MOVX @DPTR,A MOV R7,A RET ; ; L9E9F: MOV R7,#004H RET ; ; L9EA2: MOV R7,#003H RET
; Report 18H
; ; 9ea5 Output Report 18H (??) L_OutputReport18H: MOV A,R5 XRL A,#017H JNZ L9ED5 MOV DPL,R7 MOV DPH,R6 INC DPTR INC DPTR MOVX A,@DPTR MOV R5,A RRC A RRC A RRC A ANL A,#01FH SETB C SUBB A,#014H JNC L9ED5 MOV A,R5 ANL A,#001H MOV R7,A LCALL L_EnableRumble MOV DPTR,#L3510 MOVX A,@DPTR JZ L9ECC MOV R7,#004H RET ; ; L9ECC: MOV DPTR,#L3510 MOV A,#001H MOVX @DPTR,A MOV R7,#000H RET ; ; L9ED5: MOV R7,#003H RET
; Report 19H
; ; 9ed8 Output Report 19H L_OutputReport19H: LCALL L_Helper1 JNZ L9EFB INC DPTR INC DPTR MOVX A,@DPTR MOV DPTR,#L34F5 LCALL L_Store_A_at_DPTR MOV DPTR,#L34F5 LCALL L_Helper2 JNB ACC.0,L9EF3 MOV R7,#000H SJMP L9EF5 ; L9EF3: MOV R7,#008H ; L9EF5: LCALL L_UnMuteSpeaker MOV R7,#000H RET ; ; L9EFB: MOV R7,#003H RET
; Report 1AH
; ; 9efe Output Report 1AH (??) L_OutputReport1AH: LCALL L_Helper1 JNZ L9F21 INC DPTR INC DPTR MOVX A,@DPTR MOV DPTR,#L34F8 LCALL L_Store_A_at_DPTR MOV DPTR,#L34F8 LCALL L_Helper2 JNB ACC.0,L9F19 MOV R7,#000H SJMP L9F1B ; L9F19: MOV R7,#001H ; L9F1B: LCALL L8EEB MOV R7,#000H RET ; ; L9F21: MOV R7,#003H RET ; ; L9F24: LCALL LA56E MOVX A,@DPTR ANL A,#00FH XRL A,#002H JNZ L9F90 MOV R2,006H MOV R1,007H MOV R3,#001H MOV DPTR,#L0001 LCALL L1B36 MOV DPTR,#L356F MOVX @DPTR,A CLR C SUBB A,#010H JC L9F88 MOVX A,@DPTR MOV R4,A SETB C SUBB A,#01AH JNC L9F88 MOV DPTR,#L5824 MOVX A,@DPTR INC DPTR MOVX A,@DPTR INC DPTR MOVX A,@DPTR MOV R5,A MOV A,R4 ADD A,#0F0H MOV R3,A LCALL L880F MOV DPTR,#L356E MOV A,R7 MOVX @DPTR,A INC DPTR MOVX A,@DPTR LCALL LA584 MOV A,#001H MOVC A,@A+DPTR ADD A,#001H MOV R7,A CLR A MOVC A,@A+DPTR ADDC A,#000H MOV R6,A MOV DPTR,#L5825 MOVX A,@DPTR ADD A,#001H MOV R5,A MOV DPTR,#L5824 MOVX A,@DPTR ADDC A,#000H MOV R4,A MOV DPTR,#L5826 MOVX A,@DPTR DEC A MOV R3,A LCALL L7175 SJMP L9F96 ; L9F88: MOV DPTR,#L356E MOV A,#001H MOVX @DPTR,A SJMP L9F96 ; L9F90: MOV DPTR,#L356E MOV A,#002H MOVX @DPTR,A ; L9F96: MOV DPTR,#L356E MOVX A,@DPTR MOV R7,A RET ; ; L9F9C: LCALL L9F24 MOV A,R7 JNZ L9FB8 LCALL LA518 MOV DPTR,#L8684 MOVC A,@A+DPTR JZ L9FCC MOV DPL,R5 MOV DPH,R4 INC DPTR INC DPTR MOVX A,@DPTR MOV R6,A CLR C RRC A JNB ACC.0,L9FCC ; L9FB8: LCALL LA5DC MOV DPTR,#L5824 MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR LCALL LA520 MOV DPTR,#L3478 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A ; L9FCC: RET ; ; L9FCD: LCALL L9F24 MOV R6,007H MOV A,R6 JNZ L9FF5 LCALL LA518 MOV R7,A MOV DPTR,#L8684 MOVC A,@A+DPTR JZ L9FF5 MOV DPL,R5 MOV DPH,R4 INC DPTR INC DPTR MOVX A,@DPTR MOV R5,A CLR C RRC A JNB ACC.0,L9FF5 LCALL LA5DC INC DPTR MOV A,R7 MOVX @DPTR,A INC DPTR MOV A,R6 MOVX @DPTR,A ; L9FF5: MOV A,R6 CLR C SUBB A,#00AH JNC LA003 MOV A,R6 MOV DPTR,#L86EE MOVC A,@A+DPTR MOV R7,A SJMP LA005 ; LA003: MOV R7,#00EH ; LA005: MOV R6,007H MOV DPTR,#L5827 MOVX A,@DPTR MOV R7,A MOV R5,006H LJMP LE522 ; ; LA011: LCALL LA497 INC DPTR MOVX A,@DPTR MOV R7,A CLR C SUBB A,#020H JC LA022 MOV A,R7 SETB C SUBB A,#022H JC LA03A ; LA022: MOV A,R7 CLR C SUBB A,#030H JC LA02E MOV A,R7 SETB C SUBB A,#037H JC LA03A ; LA02E: MOV A,R7 CLR C SUBB A,#03DH JC LA0A4 MOV A,R7 SETB C SUBB A,#03FH JNC LA0A4 ; LA03A: CLR A MOV R5,A LCALL L9AE6 MOV DPTR,#L3570 MOV A,R7 MOVX @DPTR,A JZ LA0A4 LCALL LA497 MOVX A,@DPTR MOV R1,A RRC A RRC A RRC A ANL A,#01FH MOV R7,A JNB ACC.0,LA05C MOV DPTR,#L5826 MOVX A,@DPTR XRL A,#004H JZ LA068 ; LA05C: MOV A,R7 JB ACC.0,LA0A1 MOV DPTR,#L5826 MOVX A,@DPTR XRL A,#002H JNZ LA0A1 ; LA068: MOV A,R7 JNB ACC.0,LA089 LCALL LA497 INC DPTR INC DPTR MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A LCALL L7A76 MOV 034H,R6 MOV 035H,R7 MOV DPTR,#L3570 LCALL LA5BC JNC LA089 MOV A,035H INC A MOVX @DPTR,A ; LA089: MOV R6,#056H MOV R7,#0B6H MOV R4,#034H MOV R5,#0F9H MOV DPTR,#L3570 MOVX A,@DPTR MOV R3,A LCALL L7175 MOV DPTR,#L3570 MOVX A,@DPTR MOV R7,A LJMP LE502 ; ; LA0A1: LJMP LE54E ; ; LA0A4: LCALL LE562 RET ; ; LA0A8: LCALL LA56E INC DPTR MOVX A,@DPTR MOV R5,A CLR C SUBB A,#010H JNC LA0B6 LJMP LA13D ; ; LA0B6: MOV A,R5 SETB C SUBB A,#01AH JC LA0BF LJMP LA13D ; ; LA0BF: MOV A,R5 LCALL LA584 CLR A MOVC A,@A+DPTR MOV R3,A MOV A,#001H MOVC A,@A+DPTR MOV DPTR,#L3572 XCH A,R3 MOVX @DPTR,A INC DPTR MOV A,R3 MOVX @DPTR,A MOV A,R5 MOV DPTR,#L863E MOVC A,@A+DPTR MOV DPTR,#L3571 MOVX @DPTR,A MOV DPL,R7 MOV DPH,R6 MOVX A,@DPTR MOV R7,A RRC A RRC A RRC A ANL A,#01FH MOV R7,A JNB ACC.0,LA0F1 MOV DPTR,#L5826 MOVX A,@DPTR XRL A,#004H JZ LA0FD ; LA0F1: MOV A,R7 JB ACC.0,LA13A MOV DPTR,#L5826 MOVX A,@DPTR XRL A,#002H JNZ LA13A ; LA0FD: MOV A,R7 JNB ACC.0,LA11E LCALL LA497 INC DPTR INC DPTR MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A LCALL L7A76 MOV 034H,R6 MOV 035H,R7 MOV DPTR,#L3571 LCALL LA5BC JNC LA11E MOV A,035H INC A MOVX @DPTR,A ; LA11E: MOV R6,#056H MOV R7,#0B6H MOV DPTR,#L3572 MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A MOV DPTR,#L3571 MOVX A,@DPTR MOV R3,A LCALL L7175 MOV DPTR,#L3571 MOVX A,@DPTR MOV R7,A LJMP LE502 ; ; LA13A: LJMP LE54E ; ; LA13D: LCALL LE562 RET ; ; LA141: MOV DPTR,#L5826 MOVX A,@DPTR CLR C SUBB A,#002H JC LA15D LCALL LA497 MOVX A,@DPTR ANL A,#003H ADD A,#0FEH JZ LA15A INC A JNZ LA15D LJMP LA011 ; ; LA15A: LJMP LA0A8 ; ; LA15D: LCALL LE54E RET ; ; LA161: CLR A MOV R7,A LCALL LEC7A MOV DPTR,#L344B MOVX A,@DPTR JZ LA17F MOV DPTR,#L565B MOVX A,@DPTR CLR C SUBB A,#033H JC LA191 CLR A MOV DPTR,#L344B MOVX @DPTR,A LCALL L8D18 SJMP LA191 ; LA17F: MOV DPTR,#L565B MOVX A,@DPTR CLR C SUBB A,#033H JNC LA191 MOV DPTR,#L344B MOV A,#001H MOVX @DPTR,A LCALL L8D18 ; LA191: LCALL LA4ED JNC LA1C9 MOV DPTR,#L5631 MOVX A,@DPTR MOV R7,A XRL A,#008H JZ LA1A3 MOV A,R7 CJNE A,#005H,LA1A6 ; LA1A3: LJMP LDA9C ; ; LA1A6: MOV DPTR,#L5631 MOVX A,@DPTR CJNE A,#004H,LA1C9 LCALL LA5E3 LCALL L7ABD LCALL LA5E3 CLR 01CH MOV R7,#001H MOV R6,#000H MOV R5,#000H MOV R4,#000H LCALL L4280 MOV A,R7 JZ LA1C9 LCALL L7BD4 ; LA1C9: RET ; ; LA1CA: LCALL LD909 MOV R3,#001H MOV R2,#038H MOV R1,#041H MOV DPTR,#L3574 LCALL L201E MOV DPTR,#L5631 MOVX A,@DPTR MOV R7,A XRL A,#004H JZ LA1E6 MOV A,R7 CJNE A,#005H,LA1F8 ; LA1E6: MOV DPTR,#L34A1 MOVX A,@DPTR JZ LA1F8 MOV R3,#001H MOV R2,#036H MOV R1,#0C5H MOV DPTR,#L3574 LCALL L201E ; LA1F8: MOV DPTR,#L34A9 MOV A,#001H MOVX @DPTR,A MOV DPTR,#L3574 LCALL L1FFE MOV R7,#006H LJMP L564D ; ; LA209: MOV DPTR,#L3577 MOV A,R7 MOVX @DPTR,A MOVX A,@DPTR MOV R7,A LCALL LDBE0 MOV DPTR,#L3577 MOVX A,@DPTR XRL A,#002H JNZ LA258 MOV DPTR,#L349C MOVX A,@DPTR JZ LA258 MOV DPTR,#L345D MOVX A,@DPTR JZ LA253 LCALL L9489 MOV A,R7 JNZ LA232 MOV R7,#015H LJMP LDC6E ; ; LA232: MOV R6,#038H MOV R7,#041H LCALL LD744 MOV DPTR,#L5631 MOVX A,@DPTR CJNE A,#00AH,LA24E MOV DPTR,#L3F0C MOVX A,@DPTR MOV DPTR,#L5606 MOVX @DPTR,A MOV DPTR,#L5604 MOVX A,@DPTR DEC A MOVX @DPTR,A ; LA24E: MOV R7,#016H LJMP LD71D ; ; LA253: MOV R7,#016H LCALL LD71D ; LA258: RET ; ; LA259: MOV DPTR,#L349C MOV A,#001H MOVX @DPTR,A LJMP LD9B7 ; ; LA262: CLR A MOV DPTR,#L3578 MOVX @DPTR,A INC DPTR MOVX @DPTR,A INC DPTR MOVX @DPTR,A LCALL L9787 MOV DPTR,#L3472 MOV A,R7 MOVX @DPTR,A MOVX A,@DPTR MOV DPTR,#L860E MOVC A,@A+DPTR MOV DPTR,#L3473 MOVX @DPTR,A MOV DPTR,#L580F MOVX A,@DPTR JNZ LA285 LJMP LA31E ; ; LA285: MOV DPTR,#L38AF MOVX A,@DPTR XRL A,#00BH JNZ LA2F8 LCALL LA5C7 MOV DPTR,#L349B MOVX A,@DPTR JZ LA29D MOV A,032H SETB C SUBB A,#064H JC LA2A4 ; LA29D: LCALL LA5EA INC DPTR MOVX @DPTR,A SJMP LA2E2 ; LA2A4: MOV DPTR,#L3473 MOVX A,@DPTR MOV R7,A MOV A,032H SETB C SUBB A,R7 JC LA2DF MOV A,R7 ADD A,#002H MOV R7,A CLR A RLC A MOV R6,A SETB C MOV A,032H SUBB A,R7 MOV A,R6 XRL A,#080H MOV R0,A MOV A,#080H SUBB A,R0 JC LA2DA JNB 019H,LA2CB LCALL L1164 SJMP LA2DA ; LA2CB: MOV DPTR,#L357A MOVX A,@DPTR JNZ LA2DA LCALL LA161 MOV DPTR,#L357A MOV A,#001H MOVX @DPTR,A ; LA2DA: LCALL LA5C7 SJMP LA2A4 ; LA2DF: LCALL LA5EA ; LA2E2: MOV DPTR,#L349B MOVX A,@DPTR JZ LA31E MOV DPTR,#L3875 MOVX A,@DPTR MOV R7,A ADD A,ACC MOV R7,A MOV DPTR,#L349A MOVX A,@DPTR ADD A,R7 MOVX @DPTR,A SJMP LA31E ; LA2F8: CLR A MOV DPTR,#L349B MOVX @DPTR,A MOV DPTR,#L5816 LCALL L1F9D LCALL L55B9 CLR A MOV R3,#020H MOV R2,A MOV R1,A MOV R0,A SETB C LCALL L1EF4 JNC LA31E LCALL L741C MOV DPTR,#L5816 LCALL L1FB5 LCALL LA5EA ; LA31E: MOV DPTR,#L3578 MOVX A,@DPTR JZ LA398 MOV DPTR,#L5810 MOVX A,@DPTR JNZ LA360 MOV DPTR,#L3579 MOVX A,@DPTR JNZ LA333 LCALL L833E ; LA333: MOV DPTR,#L3510 MOVX A,@DPTR JZ LA352 MOV R6,#034H MOV R7,#0DFH MOV DPTR,#L34DE MOVX A,@DPTR MOV R5,A RRC A RRC A RRC A ANL A,#01FH MOV R5,A LCALL L8F65 CLR A MOV DPTR,#L3510 MOVX @DPTR,A SJMP LA360 ; LA352: MOV DPTR,#L3511 MOVX A,@DPTR JZ LA360 LCALL L9D6C CLR A MOV DPTR,#L3511 MOVX @DPTR,A ; LA360: MOV DPTR,#L345D MOVX A,@DPTR JZ LA369 LCALL LDBED ; LA369: MOV DPTR,#L3F35 MOVX A,@DPTR JNZ LA375 MOV DPTR,#L5C1E MOVX A,@DPTR JNZ LA378 ; LA375: LCALL LE103 ; LA378: LCALL L8E26 MOV DPTR,#L38AF MOVX A,@DPTR CJNE A,#00BH,LA395 MOV DPTR,#L3579 MOVX A,@DPTR JNZ LA398 MOV DPTR,#L55BE MOVX @DPTR,A INC DPTR MOVX @DPTR,A MOV DPTR,#L55BC MOVX @DPTR,A INC DPTR MOVX @DPTR,A RET ; ; LA395: LCALL LA161 ; LA398: RET ; ; LA399: MOV DPTR,#L589B MOVX A,@DPTR MOV DPTR,#L349A MOVX @DPTR,A INC DPTR MOV A,#001H MOVX @DPTR,A RET ; ; LA3A6: LCALL LA5F1 MOV R3,A MOV R2,#056H MOV R1,#033H LCALL L7ABD MOV DPTR,#L3F02 MOVX A,@DPTR MOV R7,A CLR A MOV R4,A MOV R5,A MOV R6,A MOV R3,#080H MOV R2,#00CH MOV R1,A MOV R0,A LCALL L1D99 CLR 01CH LCALL LA5E3 LCALL L4280 LJMP L8E12 ; ; LA3CE: CLR A MOV DPTR,#L34A0 MOVX @DPTR,A INC DPTR MOVX @DPTR,A RET ; ; LA3D6: LCALL LDCA7 MOV DPTR,#L5631 MOVX A,@DPTR CJNE A,#00AH,LA3E6 LCALL LA5F1 LCALL L8E12 ; LA3E6: RET ; ; LA3E7: MOV R6,#035H MOV R7,#012H RET ; ; LA3EC: LCALL LA5F1 LJMP LDC57 ; ; LA3F2: MOV DPTR,#L5631 MOVX A,@DPTR XRL A,#005H JNZ LA45E LCALL L1320 MOV A,R7 CPL A JZ LA423 LCALL L132C MOV DPTR,#L34A1 MOVX A,@DPTR JNZ LA456 MOV DPTR,#L34A9 MOVX A,@DPTR JZ LA456 MOV DPTR,#L5CB5 MOVX A,@DPTR XRL A,#004H JNZ LA456 LCALL L9489 MOV A,R7 JZ LA456 LCALL LA477 SJMP LA456 ; LA423: MOV DPTR,#L560D MOVX A,@DPTR JZ LA456 MOV R6,#038H MOV R7,#041H MOV R4,#056H MOV R5,#029H MOV R3,#006H LCALL L7195 MOV A,R7 JNZ LA456 MOV DPTR,#L34A1 MOVX A,@DPTR JZ LA448 MOV R6,#034H MOV R7,#0A2H LCALL L1326 SJMP LA44B ; LA448: LCALL LA477 ; LA44B: MOV R6,#056H MOV R7,#029H MOV R4,#056H MOV R5,#012H LCALL L1344 ; LA456: LCALL L9468 LCALL L10F8 SJMP LA461 ; LA45E: LCALL LD7B2 ; LA461: CLR A MOV DPTR,#L34A1 MOVX @DPTR,A LCALL L9489 MOV DPTR,#L34A8 MOV A,R7 MOVX @DPTR,A LCALL LDCD9 CLR A MOV DPTR,#L560E MOVX @DPTR,A RET ; ; LA477: MOV R6,#034H MOV R7,#0A2H LCALL L130E MOV R6,#034H MOV R7,#0A2H MOV R4,#038H MOV R5,#041H MOV R3,#006H LJMP L7175 ; ; LA48B: LCALL L9489 MOV A,R7 JNZ LA494 LCALL L947D ; LA494: LJMP LDC49 ; ; LA497: MOV DPTR,#L5824 MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV DPL,A MOV DPH,R6 RET ; ; LA4A3: MOVX A,@DPTR MOV DPTR,#L34FD MOVX @DPTR,A MOV DPTR,#L3456 MOVX A,@DPTR MOV R7,A INC DPTR MOVX A,@DPTR MOV DPTR,#L34FB XCH A,R7 MOVX @DPTR,A INC DPTR MOV A,R7 MOVX @DPTR,A MOV DPTR,#L343E MOVX A,@DPTR MOV R7,A RET ; ; LA4BD: MOV A,R6 MOVX @DPTR,A INC DPTR ; LA4C0: MOV A,R7 MOVX @DPTR,A INC DPTR MOV A,R5 MOVX @DPTR,A INC DPTR RET ; A4C7 Helper1 ; dptr = r6:r7, a = r5^3 L_Helper1: MOV DPL,R7 MOV DPH,R6 MOV A,R5 XRL A,#003H RET ; ; LA4CF: MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A CLR A MOV R4,A MOV R5,A CLR C LJMP L1EF4 ; ; LA4DB: MOV R6,#034H MOV R7,#0C4H MOV DPTR,#L34C1 MOVX A,@DPTR MOV R4,A INC DPTR ; LA4E5: MOVX A,@DPTR MOV R5,A INC DPTR MOVX A,@DPTR ANL A,#01FH MOV R3,A RET ; ; LA4ED: MOV DPTR,#L406D MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A SETB C MOV DPTR,#L565A MOVX A,@DPTR SUBB A,R7 MOV DPTR,#L5659 MOVX A,@DPTR SUBB A,R6 RET ; ; LA501: MOV DPTR,#L3481 MOVX A,@DPTR MOV R6,A INC DPTR ; LA507: MOVX A,@DPTR MOV R7,A MOV DPTR,#L3486 MOVX A,@DPTR MOV R5,A RET ; ; LA50F: MOV A,R7 ; LA510: MOVX @DPTR,A MOV R6,A LCALL L8FC9 MOV A,R6 ORL A,R7 RET ; ; LA518: MOV DPTR,#L5824 MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A ; LA520: MOV DPL,A MOV DPH,R4 INC DPTR MOVX A,@DPTR RET ; ; LA527: MOV DPTR,#L7F10 MOVX A,@DPTR MOV DPTR,#L3542 MOVX @DPTR,A MOV DPTR,#L7F0F MOVX A,@DPTR MOV DPTR,#L3543 MOVX @DPTR,A RET ; ; LA538: MOVX @DPTR,A MOV DPTR,#L34FC MOVX A,@DPTR MOV R6,A MOV A,R7 ANL A,#0C0H MOV R7,A CLR C RRC A MOV R7,A MOV A,R6 ORL A,R7 MOVX @DPTR,A RET ; ; LA549: MOV A,R7 MOVX @DPTR,A MOV DPTR,#L347F ; LA54E: MOVX A,@DPTR MOV R7,A RRC A RRC A ANL A,#003H RET ; ; LA555: MOV A,R3 ADD A,#006H ; LA558: MOV DPL,A CLR A ADDC A,R2 MOV DPH,A MOVX A,@DPTR RET ; ; LA560: MOV DPL,R3 MOV DPH,R2 INC DPTR INC DPTR RET ; a567 Helper 2 ; r7 = @dptr, a = (@dptr>>2) & 0x3f L_Helper2: MOVX A,@DPTR MOV R7,A RRC A RRC A ANL A,#03FH RET ; ; LA56E: MOV DPTR,#L5824 MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A MOV DPL,A MOV DPH,R6 RET ; ; LA57B: MOV A,#001H ; LA57D: MOVX @DPTR,A CLR A MOV DPTR,#L34A0 MOVX @DPTR,A RET ; ; LA584: ADD A,ACC ADD A,#05EH MOV DPL,A CLR A ADDC A,#086H MOV DPH,A RET ; ; LA590: MOV A,#043H ADD A,R6 MOV DPL,A CLR A ADDC A,#07FH MOV DPH,A RET ; ; LA59B: MOVX @DPTR,A MOV DPTR,#L7F47 MOVX A,@DPTR MOV R4,A MOV A,R6 ADD A,ACC MOV R3,A RET ; ; LA5A6: MOV A,R7 MOVX @DPTR,A MOV R6,#035H MOV R7,#000H MOV R4,#034H MOV R5,#05FH RET ; ; LA5B1: MOV R6,#034H MOV R7,#0FEH MOV R4,#034H MOV R5,#05FH MOV R3,#012H RET ; ; LA5BC: MOVX A,@DPTR MOV R7,A CLR C MOV A,035H SUBB A,R7 MOV A,034H SUBB A,#000H RET ; ; LA5C7: MOV DPTR,#L349A MOVX A,@DPTR MOV R7,A LCALL L893E MOV 032H,R7 RET ; ; LA5D2: MOVX A,@DPTR MOV R6,A MOV A,R7 ANL A,#030H MOV R5,A ADD A,ACC MOV R5,A RET ; ; LA5DC: MOV DPTR,#L3477 MOV A,#001H MOVX @DPTR,A RET ; ; LA5E3: MOV R3,#001H MOV R2,#056H MOV R1,#033H RET ; ; LA5EA: MOV DPTR,#L3578 MOV A,#001H MOVX @DPTR,A RET ; ; LA5F1: MOV DPTR,#L349F MOV A,#001H MOVX @DPTR,A RET ; ; LA5F8: MOV DPTR,#L37F1 CLR A MOVX @DPTR,A INC DPTR MOV A,#020H MOVX @DPTR,A MOV DPTR,#L_BluetoothClassID MOVX A,@DPTR ORL A,#040H MOVX @DPTR,A MOV DPTR,#L7F42 MOVX A,@DPTR ORL A,#040H MOVX @DPTR,A MOV DPTR,#L7ED0 MOVX A,@DPTR ORL A,#010H MOVX @DPTR,A RET ; ; LA617: MOV DPTR,#L406D MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR MOV R7,A SETB C MOV DPTR,#L565A MOVX A,@DPTR SUBB A,R7 MOV DPTR,#L5659 MOVX A,@DPTR SUBB A,R6 JNC LA62F LCALL L8380 ; LA62F: RET ; ; LA630: MOVX A,@DPTR MOV DPTR,#L35FB MOVX @DPTR,A CLR A MOV DPTR,#L35FA MOVX @DPTR,A RET ; ; LA63B: MOV DPTR,#L35F8 MOVX A,@DPTR ORL A,R6 MOV R2,A INC DPTR MOVX A,@DPTR ORL A,R7 MOV R3,A RET ; MOV DPTR,#L7EA0 MOVX A,@DPTR ANL A,#0FEH MOVX @DPTR,A RET ; NOP RLC A NOP NOP ACALL LA774 AJMP LA0F0 ; MOV DPTR,#L7F07 MOVX A,@DPTR ANL A,#0FDH MOVX @DPTR,A MOV DPTR,#L7F00 MOV A,#090H MOVX @DPTR,A INC DPTR MOV A,#010H MOVX @DPTR,A LCALL L127E MOV DPTR,#L7F01 CLR A MOVX @DPTR,A MOV DPTR,#LC75C LJMP L8580 ; MOV DPTR,#L7E00 MOV A,R2 MOVX @DPTR,A MOV 03BH,R2 MOV 038H,R2 MOV 039H,R1 MOV DPTR,#L7E78 MOVX A,@DPTR ANL A,#0FEH MOVX @DPTR,A POP B MOV A,#0EFH PUSH ACC MOV A,#0D2H PUSH ACC PUSH B POP 0FFH RET ; ANL PSW,#0E7H ORL PSW,#010H CLR 002H MOV DPTR,#L7E29 MOV A,#040H MOVX @DPTR,A MOV DPTR,#L7E28 MOVX A,@DPTR ANL A,#00FH XRL A,#001H JNZ LA6B7 MOV DPTR,#L7E78 MOVX A,@DPTR ORL A,#001H MOVX @DPTR,A SJMP LA6BE ; LA6B7: MOV DPTR,#L7E78 MOVX A,@DPTR ANL A,#0FEH MOVX @DPTR,A ; LA6BE: POP B MOV A,#030H PUSH ACC MOV A,#0D2H PUSH ACC PUSH B POP 0FFH RET ; MOV DPTR,#L7E28 MOVX A,@DPTR ANL A,#00FH CJNE A,#001H,LA708 MOV DPTR,#L4AD3 MOVX A,@DPTR ANL A,#008H JNZ LA708 MOV R7,#0DCH MOV DPTR,#L4AD4 MOVX A,@DPTR MOV R6,A XRL A,#006H JZ LA6F0 MOV A,R6 XRL A,#00EH JZ LA6F0 MOV R7,#096H ; LA6F0: MOV DPTR,#L7E1C CLR A MOVX @DPTR,A CLR C MOVX A,@DPTR SUBB A,R7 JNC LA702 MOV DPTR,#L7E1D MOVX A,@DPTR ANL A,#001H JZ LA6F0 ; LA702: MOV DPTR,#L7C7C MOV A,#0FFH MOVX @DPTR,A ; LA708: POP B MOV A,#0A1H PUSH ACC MOV A,#0C5H PUSH ACC PUSH B POP 0FFH RET ; MOV DPTR,#L7E00 MOVX A,@DPTR ANL A,#00FH MOV DPTR,#L7D2A CJNE A,#001H,LA727 MOV A,#064H SJMP LA729 ; LA727: MOV A,#016H ; LA729: MOVX @DPTR,A MOV DPTR,#L7C7C MOV A,#04BH MOVX @DPTR,A LJMP LB3B5 ; CLR A MOV DPTR,#L55BC MOVX @DPTR,A INC DPTR MOVX @DPTR,A INC DPTR MOVX @DPTR,A INC DPTR MOVX @DPTR,A MOV DPTR,#L4336 LJMP L8580
; Junk
; MOV R7,#000H RR A NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP ; LA774: NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP RR A NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP ;
; Unresolved Address Reference list
; ; L7F60: EQU 07F60H L7F69: EQU 07F69H L7F7F: EQU 07F7FH L8000: EQU 08000H L8004: EQU 08004H L8009: EQU 08009H L8020: EQU 08020H L8040: EQU 08040H L8078: EQU 08078H L80B6: EQU 080B6H L8101: EQU 08101H L822B: EQU 0822BH L8274: EQU 08274H L8277: EQU 08277H L82CD: EQU 082CDH L82FD: EQU 082FDH L8304: EQU 08304H L8310: EQU 08310H L8400: EQU 08400H L8580: EQU 08580H L86B3: EQU 086B3H L8751: EQU 08751H LA0F0: EQU 0A0F0H LA803: EQU 0A803H LB3B5: EQU 0B3B5H LC75C: EQU 0C75CH LD420: EQU 0D420H LD48F: EQU 0D48FH LD71D: EQU 0D71DH LD744: EQU 0D744H LD7B2: EQU 0D7B2H LD84E: EQU 0D84EH LD8AD: EQU 0D8ADH LD909: EQU 0D909H LD90F: EQU 0D90FH LD92D: EQU 0D92DH LD9B7: EQU 0D9B7H LDA2C: EQU 0DA2CH LDA45: EQU 0DA45H LDA9C: EQU 0DA9CH LDAA1: EQU 0DAA1H LDBA6: EQU 0DBA6H LDBC4: EQU 0DBC4H LDBE0: EQU 0DBE0H LDBE6: EQU 0DBE6H LDBED: EQU 0DBEDH LDBF4: EQU 0DBF4H LDC49: EQU 0DC49H LDC57: EQU 0DC57H LDC5E: EQU 0DC5EH LDC6E: EQU 0DC6EH LDC78: EQU 0DC78H LDCA7: EQU 0DCA7H LDCC0: EQU 0DCC0H LDCD9: EQU 0DCD9H LDD5D: EQU 0DD5DH LDD7C: EQU 0DD7CH LDD97: EQU 0DD97H LDDB6: EQU 0DDB6H LDE01: EQU 0DE01H LDE14: EQU 0DE14H LDE2A: EQU 0DE2AH LDE36: EQU 0DE36H LDE49: EQU 0DE49H LDE6F: EQU 0DE6FH LDEA4: EQU 0DEA4H LDEEB: EQU 0DEEBH LDFC3: EQU 0DFC3H LDFFA: EQU 0DFFAH LE02A: EQU 0E02AH LE072: EQU 0E072H LE0EB: EQU 0E0EBH LE0EE: EQU 0E0EEH LE0F7: EQU 0E0F7H LE103: EQU 0E103H LE459: EQU 0E459H LE502: EQU 0E502H LE522: EQU 0E522H LE54E: EQU 0E54EH LE558: EQU 0E558H LE562: EQU 0E562H LE78E: EQU 0E78EH LE793: EQU 0E793H LE823: EQU 0E823H LE890: EQU 0E890H LE8A4: EQU 0E8A4H LE8C8: EQU 0E8C8H LE945: EQU 0E945H LE99F: EQU 0E99FH LE9A6: EQU 0E9A6H LE9B0: EQU 0E9B0H LE9ED: EQU 0E9EDH LEAE7: EQU 0EAE7H LEB4C: EQU 0EB4CH LEBA1: EQU 0EBA1H LEC7A: EQU 0EC7AH LED61: EQU 0ED61H LF66D: EQU 0F66DH ; ; END