|
17: void main(void){
18: char i = 0;
C:0x0800 E4 CLR A
C:0x0801 FC MOV R4,A
19: P3 = 0xff;
C:0x0802 75B0FF MOV P3(0xB0),#0xFF
20: while(1){
21: if(btn1==0){
C:0x0805 20B013 JB btn1(0xB0.0),C:081B
22: delay(2);
C:0x0808 7F02 MOV R7,#0x02
C:0x080A 120838 LCALL delay(C:0838)
23: LEDs1 = 0xfe;
C:0x080D 7590FE MOV P1(0x90),#0xFE
24: for(i=0;i<8;i++){
C:0x0810 E4 CLR A
C:0x0811 FC MOV R4,A
25: LEDs1 >> 1;
26: delay(10);
C:0x0812 7F0A MOV R7,#0x0A
C:0x0814 120838 LCALL delay(C:0838)
27: }
C:0x0817 0C INC R4
C:0x0818 BC08F7 CJNE R4,#0x08,C:0812
28: }
29:
30: if(btn2==0){
C:0x081B 20B1E7 JB btn2(0xB0.1),C:0805
31: delay(2);
C:0x081E 7F02 MOV R7,#0x02
C:0x0820 120838 LCALL delay(C:0838)
32: LEDs2 = 0xfe;
C:0x0823 75A0FE MOV PPAGE_SFR(0xA0),#0xFE
33: for(i=0;i<8;i++){
C:0x0826 E4 CLR A
C:0x0827 FC MOV R4,A
C:0x0828 C3 CLR C
C:0x0829 EC MOV A,R4
C:0x082A 6480 XRL A,#P0(0x80)
C:0x082C 9488 SUBB A,#TCON(0x88)
C:0x082E 50D5 JNC C:0805
34: LEDs2 >> 1;
35: delay(10);
C:0x0830 7F0A MOV R7,#0x0A
C:0x0832 120838 LCALL delay(C:0838)
36: }
C:0x0835 0C INC R4
C:0x0836 80F0 SJMP C:0828
9: delay(char t)
10: {
11: char i,j;
12: for(i=0;i
C:0x0838 E4 CLR A
C:0x0839 FE MOV R6,A
C:0x083A C3 CLR C
C:0x083B EF MOV A,R7
C:0x083C 6480 XRL A,#P0(0x80)
C:0x083E F8 MOV R0,A
C:0x083F EE MOV A,R6
C:0x0840 6480 XRL A,#P0(0x80)
C:0x0842 98 SUBB A,R0
C:0x0843 5009 JNC C:084E
13: for(j=0;j<100;j++);
C:0x0845 E4 CLR A
C:0x0846 FD MOV R5,A
C:0x0847 0D INC R5
C:0x0848 BD64FC CJNE R5,#0x64,C:0847
14: }
C:0x084B 0E INC R6
C:0x084C 80EC SJMP C:083A
15: }
C:0x084E 22 RET
133: MOV R0,#IDATALEN - 1
C:0x084F 787F MOV R0,#0x7F
134: CLR A
C:0x0851 E4 CLR A
135: IDATALOOP: MOV @R0,A
C:0x0852 F6 MOV @R0,A
136: DJNZ R0,IDATALOOP
C:0x0853 D8FD DJNZ R0,IDATALOOP(C:0852)
185: MOV SP,#?STACK-1
186:
187: ; This code is required if you use L51_BANK.A51 with Banking Mode 4
188: ; Code Banking
189: ; Select Bank 0 for L51_BANK.A51 Mode 4
190: #if 0
191: ; Initialize bank mechanism to code bank 0 when using L51_BANK.A51 with Banking Mode 4.
192: EXTRN CODE (?B_SWITCH0)
193: CALL ?B_SWITCH0 ; init bank mechanism to code bank 0
194: #endif
195: ;
C:0x0855 758107 MOV SP(0x81),#0x07
196: LJMP ?C_START
C:0x0858 020800 LJMP main(C:0800)
C:0x085B 00 NOP
C:0x085C 00 NOP
C:0x085D 00 NOP
C:0x085E 00 NOP |
|