#include <reg51.h> #define u_char unsigned char #define u_int unsigned int #define StringWidth 4 sbit P2_7=P2^7; sbit P2_6=P2^6; sbit P2_5=P2^5; sbit P2_4=P2^4; sbit P2_2=P2^2; sbit P2_1=P2^1; sbit P2_0=P2^0; sbit P3_6=P3^6; sbit P3_5=P3^5; sbit P3_4=P3^4; u_char temp; u_int ui; u_char data SendCharString[StringWidth]={0x5e,0x03,0x00,0x04}; u_char data yangan[17]={0x5e,0x11,0x00,0x11,0x99,0x99,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; u_char data fanyangan[17]={0x5e,0x12,0x00,0x11,0x99,0x99,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; u_char data hongwai[4]={0x5e,0x13,0x00,0x04}; u_char data fanhongwai[4]={0x5e,0x14,0x00,0x04}; u_char data CheckSum[StringWidth]; u_char data RecCharString[8]; u_char data DString[9]={0x5e,0x80,0x00,0x09,0x51,0x52,0x53,0x54,0x55}; u_char data k,ro,d,f,flag=0,count=0,wanglo=0,Xintiao=0; u_char data kaiguan0=1,kaiguan1=1; u_char data fankaiguan0=1,fankaiguan1=1; u_char data xintiaozhi[11]={0x5e,0x10,0x00,0x0b,0x99,0x99,0x99,0x00,0x00,0x00,0x00};
void delay1ms(void) { u_char data i; for(i=0;i<=250;i++) {;;} }
void delay10ms(void) { u_char data j; for(j=0;j<=10;j++) {delay1ms();} } void send_char(u_char ch) { EA=0; SBUF=ch; while(TI==0); TI=0; EA=1; } void send_string(u_char *str, u_char strlen) { u_int k; for(k=0;k<strlen;k++) send_char(*(str + k)) ; }
void JSCheckSum(u_char *str, u_char strlen) { u_char i; u_int chushu=0,chushu1=0,chushu2=0,chushu3=0, sum=0; for(i=0;i<strlen;i++) sum=sum+str; CheckSum[StringWidth-1]=sum%0x100; chushu=sum/0x100; CheckSum[StringWidth-2]=chushu%0x100; chushu1=chushu/0x100; CheckSum[StringWidth-3]=chushu1%0x100; chushu2=chushu1/0x100; CheckSum[StringWidth-4]=chushu2%0x100; chushu3=chushu2/0x100; } void getchar() interrupt 4 using 3 {
EA=0; while (RI==0); RecCharString[count]=SBUF; RI=0; count++;
if(count==8) { if( RecCharString[0]==0x5e) { if( RecCharString[1]==0xb0) { if( RecCharString[2]==0x00) { if(RecCharString[3]==0x04) { if(RecCharString[4]==0x00) { if(RecCharString[5]==0x00) { if(RecCharString[6]==0x01) { if(RecCharString[7]==0x12) { Xintiao=1;count=0; } } } } } } } } }
if(count==8) { if( RecCharString[0]==0x5e) { if( RecCharString[1]==0x00) { if ( RecCharString[2]==0x03) { if( RecCharString[3]==0x91) { count=0; flag=1;wanglo=1; } else { count=0; flag=0;wanglo=0; } }
} } }
EA=1; } void sendxintiao() { if (Xintiao==1) { send_string(xintiaozhi,11); JSCheckSum(xintiaozhi,11); send_string(CheckSum,StringWidth); Xintiao=0; } }
void monikaiguan0() { P2_4=1;P2_5=0;P2_6=0; delay10ms(); if((P2_0==0)&&(P2_1==1)) { if(kaiguan0==1) { send_string(hongwai,4); JSCheckSum(hongwai,4); send_string(CheckSum,StringWidth); kaiguan0=0; fankaiguan0=1; } } if((P2_0==1)&&(P2_1==0)) { if(fankaiguan0==1) { send_string(fanhongwai,4); JSCheckSum(fanhongwai,4); send_string(CheckSum,StringWidth); kaiguan0=1; fankaiguan0=0; } } }
void monikaiguan1() { P2_4=0;P2_5=0;P2_6=0; delay10ms(); if((P2_0==1)&&(P2_1==0)) { if(kaiguan1==1) { send_string(yangan,17); JSCheckSum(yangan,17); send_string(CheckSum,StringWidth); kaiguan1=0; fankaiguan1=1; } } if((P2_0==0)&&(P2_1==1)) { if(fankaiguan1==1) { send_string(fanyangan,17); JSCheckSum(fanyangan,17); send_string(CheckSum,StringWidth); kaiguan1=1; fankaiguan1=0; } } }
void init_serialcomm() { SCON=0x50; PCON=0x80; TMOD=0x20; TH1=0xF3; TL1=0xF3; IE=0x90; TR1=1; }
void sendwanglo() { if(wanglo==0) { send_string(SendCharString,StringWidth); JSCheckSum(SendCharString,StringWidth); send_string(CheckSum,StringWidth); wanglo=1; P3_5=0; } }
void sendshuju() { if(flag==1) { send_string(DString,9); JSCheckSum(DString,9); send_string(CheckSum,StringWidth); flag=0; P3_6=0; } } void main() { P3_4=0; init_serialcomm(); while(1) { sendwanglo(); sendshuju(); sendxintiao(); monikaiguan1(); delay10ms(); monikaiguan0(); delay10ms(); }; } 完整
程序
有人指出原因不 0000H 020026 LJMP 0026H 0003H C2B4 CLR P3.4 0005H 120391 LCALL 0391H 0008H 120323 LCALL 0323H 000BH 12034B LCALL 034BH 000EH 12036F LCALL 036FH 0011H 120263 LCALL 0263H 0014H 1203BC LCALL 03BCH 0017H 120201 LCALL 0201H 001AH 1203BC LCALL 03BCH 001DH 80E9 SJMP 0008H 001FH 03 RR A 0020H 5F ANL A, R7 0021H 80E5 SJMP 0008H 0023H 0200B2 LJMP 00B2H 0026H 787F MOV R0, #7FH 0028H E4 CLR A 0029H F6 MOV @R0, A 002AH D8FD DJNZ R0, 0029H 002CH 75817C MOV SP, #7CH 002FH 02006D LJMP 006DH 0032H 020003 LJMP 0003H 0035H E4 CLR A 0036H 93 MOVC A, @A+DPTR 0037H A3 INC DPTR 0038H F8 MOV R0, A 0039H E4 CLR A 003AH 93 MOVC A, @A+DPTR 003BH A3 INC DPTR 003CH 4003 JC 0041H 003EH F6 MOV @R0, A 003FH 8001 SJMP 0042H 0041H F2 MOVX @R0, A 0042H 08 INC R0 0043H DFF4 DJNZ R7, 0039H 0045H 8029 SJMP 0070H 0047H E4 CLR A 0048H 93 MOVC A, @A+DPTR 0049H A3 INC DPTR 004AH F8 MOV R0, A 004BH 5407 ANL A, #07H 004DH 240C ADD A, #0CH 004FH C8 XCH A, R0 0050H C3 CLR C 0051H 33 RLC A 0052H C4 SWAP A 0053H 540F ANL A, #0FH 0055H 4420 ORL A, #20H 0057H C8 XCH A, R0 0058H 83 MOVC A, @A+PC 0059H 4004 JC 005FH 005BH F4 CPL A 005CH 56 ANL A, @R0 005DH 8001 SJMP 0060H 005FH 46 ORL A, @R0 0060H F6 MOV @R0, A 0061H DFE4 DJNZ R7, 0047H 0063H 800B SJMP 0070H 0065H 0102 AJMP 0002H 0067H 04 INC A 0068H 08 INC R0 0069H 102040 JBC 20H, 00ACH 006CH 8090 SJMP FFFEH 006EH 0130 AJMP 0030H 0070H E4 CLR A 0071H 7E01 MOV R6, #01H 0073H 93 MOVC A, @A+DPTR 0074H 60BC JZ 0032H 0076H A3 INC DPTR 0077H FF MOV R7, A 0078H 543F ANL A, #3FH 007AH 30E509 JNB ACC.5, 0086H 007DH 541F ANL A, #1FH 007FH FE MOV R6, A 0080H E4 CLR A 0081H 93 MOVC A, @A+DPTR 0082H A3 INC DPTR 0083H 6001 JZ 0086H 0085H 0E INC R6 0086H CF XCH A, R7 0087H 54C0 ANL A, #C0H 0089H 25E0 ADD A, ACC 008BH 60A8 JZ 0035H 008DH 40B8 JC 0047H 008FH E4 CLR A 0090H 93 MOVC A, @A+DPTR 0091H A3 INC DPTR 0092H FA MOV R2, A 0093H E4 CLR A 0094H 93 MOVC A, @A+DPTR 0095H A3 INC DPTR 0096H F8 MOV R0, A 0097H E4 CLR A 0098H 93 MOVC A, @A+DPTR 0099H A3 INC DPTR 009AH C8 XCH A, R0 009BH C582 XCH A, DPL 009DH C8 XCH A, R0 009EH CA XCH A, R2 009FH C583 XCH A, DPH 00A1H CA XCH A, R2 00A2H F0 MOVX @DPTR, A 00A3H A3 INC DPTR 00A4H C8 XCH A, R0 00A5H C582 XCH A, DPL 00A7H C8 XCH A, R0 00A8H CA XCH A, R2 00A9H C583 XCH A, DPH 00ABH CA XCH A, R2 00ACH DFE9 DJNZ R7, 0097H 00AEH DEE7 DJNZ R6, 0097H 00B0H 80BE SJMP 0070H 00B2H C0E0 PUSH ACC 00B4H C0D0 PUSH PSW 00B6H 75D018 MOV PSW, #18H 00B9H C2AF CLR EA 00BBH 3098FD JNB RI, 00BBH 00BEH 7438 MOV A, #38H 00C0H 2549 ADD A, 49H 00C2H F8 MOV R0, A 00C3H A699 MOV @R0, SBUF 00C5H C298 CLR RI 00C7H 0549 INC 49H 00C9H E549 MOV A, 49H 00CBH 6408 XRL A, #08H 00CDH 702D JNZ 00FCH 00CFH E538 MOV A, 38H 00D1H 645E XRL A, #5EH 00D3H 7027 JNZ 00FCH 00D5H E539 MOV A, 39H 00D7H 64B0 XRL A, #B0H 00D9H 7021 JNZ 00FCH 00DBH E53A MOV A, 3AH 00DDH 701D JNZ 00FCH 00DFH E53B MOV A, 3BH 00E1H B40418 CJNE A, #04H, 00FCH 00E4H E53C MOV A, 3CH 00E6H 7014 JNZ 00FCH 00E8H E53D MOV A, 3DH 00EAH 7010 JNZ 00FCH 00ECH E53E MOV A, 3EH 00EEH B4010B CJNE A, #01H, 00FCH 00F1H E53F MOV A, 3FH 00F3H B41206 CJNE A, #12H, 00FCH 00F6H 757401 MOV 74H, #01H 00F9H 754900 MOV 49H, #00H 00FCH E549 MOV A, 49H 00FEH 6408 XRL A, #08H 0100H 7027 JNZ 0129H 0102H E538 MOV A, 38H 0104H B45E22 CJNE A, #5EH, 0129H 0107H E539 MOV A, 39H 0109H 701E JNZ 0129H 010BH E53A MOV A, 3AH 010DH B40319 CJNE A, #03H, 0129H 0110H E53B MOV A, 3BH 0112H B4910B CJNE A, #91H, 0120H 0115H 754900 MOV 49H, #00H 0118H 754401 MOV 44H, #01H 011BH 753501 MOV 35H, #01H 011EH 8009 SJMP 0129H 0120H 754900 MOV 49H, #00H 0123H 754400 MOV 44H, #00H 0126H 753500 MOV 35H, #00H 0129H D2AF SETB EA 012BH D0D0 POP PSW 012DH D0E0 POP ACC 012FH 32 RETI 0130H 04 INC A 0131H 315E ACALL 015EH 0133H 03 RR A 0134H 00 NOP 0135H 04 INC A 0136H 1120 ACALL 0020H 0138H 5E ANL A, R6 0139H 1100 ACALL 0000H 013BH 1199 ACALL 0099H 013DH 99 SUBB A, R1 013EH 99 SUBB A, R1 013FH 00 NOP 0140H 00 NOP 0141H 00 NOP 0142H 00 NOP 0143H 00 NOP 0144H 00 NOP 0145H 00 NOP 0146H 00 NOP 0147H 00 NOP 0148H 00 NOP 0149H 114B ACALL 004BH 014BH 5E ANL A, R6 014CH 120011 LCALL 0011H 014FH 99 SUBB A, R1 0150H 99 SUBB A, R1 0151H 99 SUBB A, R1 0152H 00 NOP 0153H 00 NOP 0154H 00 NOP 0155H 00 NOP 0156H 00 NOP 0157H 00 NOP 0158H 00 NOP 0159H 00 NOP 015AH 00 NOP 015BH 00 NOP 015CH 04 INC A 015DH 795E MOV R1, #5EH 015FH 13 RRC A 0160H 00 NOP 0161H 04 INC A 0162H 04 INC A 0163H 455E ORL A, 5EH 0165H 14 DEC A 0166H 00 NOP 0167H 04 INC A 0168H 09 INC R1 0169H 5C ANL A, R4 016AH 5E ANL A, R6 016BH 8000 SJMP 016DH 016DH 09 INC R1 016EH 5152 ACALL 0252H 0170H 535455 ANL 54H, #55H 0173H 0144 AJMP 0044H 0175H 00 NOP 0176H 0149 AJMP 0049H 0178H 00 NOP 0179H 0135 AJMP 0035H 017BH 00 NOP 017CH 0174 AJMP 0074H 017EH 00 NOP 017FH 0136 AJMP 0036H 0181H 0101 AJMP 0001H 0183H 37 ADDC A, @R1 0184H 0101 AJMP 0001H 0186H 6501 XRL A, 01H 0188H 0166 AJMP 0066H 018AH 010B AJMP 000BH 018CH 67 XRL A, @R1 018DH 5E ANL A, R6 018EH 10000B JBC 00H, 019CH 0191H 99 SUBB A, R1 0192H 99 SUBB A, R1 0193H 99 SUBB A, R1 0194H 00 NOP 0195H 00 NOP 0196H 00 NOP 0197H 00 NOP 0198H 00 NOP 0199H 7B00 MOV R3, #00H 019BH 7D04 MOV R5, #04H 019DH 8B08 MOV 08H, R3 019FH 8A09 MOV 09H, R2 01A1H 890A MOV 0AH, R1 01A3H E4 CLR A 01A4H F50B MOV 0BH, A 01A6H F50C MOV 0CH, A 01A8H F50D MOV 0DH, A 01AAH F50E MOV 0EH, A 01ACH F50F MOV 0FH, A 01AEH F510 MOV 10H, A 01B0H F511 MOV 11H, A 01B2H F512 MOV 12H, A 01B4H F513 MOV 13H, A 01B6H F514 MOV 14H, A 01B8H FF MOV R7, A 01B9H EF MOV A, R7 01BAH C3 CLR C 01BBH 9D SUBB A, R5 01BCH 501A JNC 01D8H 01BEH AB08 MOV R3, 08H 01C0H AA09 MOV R2, 09H 01C2H A90A MOV R1, 0AH 01C4H 8F82 MOV DPL, R7 01C6H 758300 MOV DPH, #00H 01C9H 1202F6 LCALL 02F6H 01CCH 2514 ADD A, 14H 01CEH F514 MOV 14H, A 01D0H E4 CLR A 01D1H 3513 ADDC A, 13H 01D3H F513 MOV 13H, A 01D5H 0F INC R7 01D6H 80E1 SJMP 01B9H 01D8H 851443 MOV 43H, 14H 01DBH E513 MOV A, 13H 01DDH F50C MOV 0CH, A 01DFH 750B00 MOV 0BH, #00H 01E2H 850C42 MOV 42H, 0CH 01E5H E50B MOV A, 0BH 01E7H F50E MOV 0EH, A 01E9H 750D00 MOV 0DH, #00H 01ECH 850E41 MOV 41H, 0EH 01EFH E50D MOV A, 0DH 01F1H F510 MOV 10H, A 01F3H 750F00 MOV 0FH, #00H 01F6H 851040 MOV 40H, 10H 01F9H E50F MOV A, 0FH 01FBH F512 MOV 12H, A 01FDH 751100 MOV 11H, #00H 0200H 22 RET 0201H D2A4 SETB P2.4 0203H C2A5 CLR P2.5 0205H C2A6 CLR P2.6 0207H 1203BC LCALL 03BCH 020AH 20A029 JB P2.0, 0236H 020DH 30A126 JNB P2.1, 0236H 0210H E536 MOV A, 36H 0212H 6401 XRL A, #01H 0214H 7020 JNZ 0236H 0216H FB MOV R3, A 0217H 7A00 MOV R2, #00H 0219H 7979 MOV R1, #79H 021BH 7D04 MOV R5, #04H 021DH 1202C9 LCALL 02C9H 0220H 7A00 MOV R2, #00H 0222H 7979 MOV R1, #79H 0224H 120199 LCALL 0199H 0227H 7B00 MOV R3, #00H 0229H 7A00 MOV R2, #00H 022BH 7940 MOV R1, #40H 022DH 1202C9 LCALL 02C9H 0230H E4 CLR A 0231H F536 MOV 36H, A 0233H 756501 MOV 65H, #01H 0236H 30A029 JNB P2.0, 0262H 0239H 20A126 JB P2.1, 0262H 023CH E565 MOV A, 65H 023EH 6401 XRL A, #01H 0240H 7020 JNZ 0262H 0242H FB MOV R3, A 0243H 7A00 MOV R2, #00H 0245H 7945 MOV R1, #45H 0247H 7D04 MOV R5, #04H 0249H 1202C9 LCALL 02C9H 024CH 7A00 MOV R2, #00H 024EH 7945 MOV R1, #45H 0250H 120199 LCALL 0199H 0253H 7B00 MOV R3, #00H 0255H 7A00 MOV R2, #00H 0257H 7940 MOV R1, #40H 0259H 1202C9 LCALL 02C9H 025CH 753601 MOV 36H, #01H 025FH E4 CLR A 0260H F565 MOV 65H, A 0262H 22 RET 0263H C2A4 CLR P2.4 0265H C2A5 CLR P2.5 0267H C2A6 CLR P2.6 0269H 1203BC LCALL 03BCH 026CH 30A027 JNB P2.0, 0296H 026FH 20A124 JB P2.1, 0296H 0272H E537 MOV A, 37H 0274H 6401 XRL A, #01H 0276H 701E JNZ 0296H 0278H FB MOV R3, A 0279H 7A00 MOV R2, #00H 027BH 7920 MOV R1, #20H 027DH 7D11 MOV R5, #11H 027FH 1202C9 LCALL 02C9H 0282H 7B00 MOV R3, #00H 0284H 7A00 MOV R2, #00H 0286H 7920 MOV R1, #20H 0288H 7D11 MOV R5, #11H 028AH 12019D LCALL 019DH 028DH 1202C1 LCALL 02C1H 0290H E4 CLR A 0291H F537 MOV 37H, A 0293H 756601 MOV 66H, #01H 0296H 20A027 JB P2.0, 02C0H 0299H 30A124 JNB P2.1, 02C0H 029CH E566 MOV A, 66H 029EH 6401 XRL A, #01H 02A0H 701E JNZ 02C0H 02A2H FB MOV R3, A 02A3H 7A00 MOV R2, #00H 02A5H 794B MOV R1, #4BH 02A7H 7D11 MOV R5, #11H 02A9H 1202C9 LCALL 02C9H 02ACH 7B00 MOV R3, #00H 02AEH 7A00 MOV R2, #00H 02B0H 794B MOV R1, #4BH 02B2H 7D11 MOV R5, #11H 02B4H 12019D LCALL 019DH 02B7H 1202C1 LCALL 02C1H 02BAH 753701 MOV 37H, #01H 02BDH E4 CLR A 02BEH F566 MOV 66H, A 02C0H 22 RET 02C1H 7B00 MOV R3, #00H 02C3H 7A00 MOV R2, #00H 02C5H 7940 MOV R1, #40H 02C7H 7D04 MOV R5, #04H 02C9H 8B08 MOV 08H, R3 02CBH 8A09 MOV 09H, R2 02CDH 890A MOV 0AH, R1 02CFH 8D0B MOV 0BH, R5 02D1H E4 CLR A 02D2H FD MOV R5, A 02D3H FC MOV R4, A 02D4H C3 CLR C 02D5H ED MOV A, R5 02D6H 950B SUBB A, 0BH 02D8H EC MOV A, R4 02D9H 9400 SUBB A, #00H 02DBH 5018 JNC 02F5H 02DDH AB08 MOV R3, 08H 02DFH AA09 MOV R2, 09H 02E1H A90A MOV R1, 0AH 02E3H 8D82 MOV DPL, R5 02E5H 8C83 MOV DPH, R4 02E7H 1202F6 LCALL 02F6H 02EAH FF MOV R7, A 02EBH 1203A6 LCALL 03A6H 02EEH 0D INC R5 02EFH BD0001 CJNE R5, #00H, 02F3H 02F2H 0C INC R4 02F3H 80DF SJMP 02D4H 02F5H 22 RET 02F6H BB010C CJNE R3, #01H, 0305H 02F9H E582 MOV A, DPL 02FBH 29 ADD A, R1 02FCH F582 MOV DPL, A 02FEH E583 MOV A, DPH 0300H 3A ADDC A, R2 0301H F583 MOV DPH, A 0303H E0 MOVX A, @DPTR 0304H 22 RET 0305H 5006 JNC 030DH 0307H E9 MOV A, R1 0308H 2582 ADD A, DPL 030AH F8 MOV R0, A 030BH E6 MOV A, @R0 030CH 22 RET 030DH BBFE06 CJNE R3, #FEH, 0316H 0310H E9 MOV A, R1 0311H 2582 ADD A, DPL 0313H F8 MOV R0, A 0314H E2 MOVX A, @R0 0315H 22 RET 0316H E582 MOV A, DPL 0318H 29 ADD A, R1 0319H F582 MOV DPL, A 031BH E583 MOV A, DPH 031DH 3A ADDC A, R2 031EH F583 MOV DPH, A 0320H E4 CLR A 0321H 93 MOVC A, @A+DPTR 0322H 22 RET 0323H E535 MOV A, 35H 0325H 7023 JNZ 034AH 0327H FB MOV R3, A 0328H 7A00 MOV R2, #00H 032AH 7931 MOV R1, #31H 032CH 7D04 MOV R5, #04H 032EH 1202C9 LCALL 02C9H 0331H 7B00 MOV R3, #00H 0333H 7A00 MOV R2, #00H 0335H 7931 MOV R1, #31H 0337H 7D04 MOV R5, #04H 0339H 12019D LCALL 019DH 033CH 7B00 MOV R3, #00H 033EH 7A00 MOV R2, #00H 0340H 7940 MOV R1, #40H 0342H 1202C9 LCALL 02C9H 0345H 753501 MOV 35H, #01H 0348H C2B5 CLR P3.5 034AH 22 RET 034BH E544 MOV A, 44H 034DH 6401 XRL A, #01H 034FH 701D JNZ 036EH 0351H FB MOV R3, A 0352H 7A00 MOV R2, #00H 0354H 795C MOV R1, #5CH 0356H 7D09 MOV R5, #09H 0358H 1202C9 LCALL 02C9H 035BH 7B00 MOV R3, #00H 035DH 7A00 MOV R2, #00H 035FH 795C MOV R1, #5CH 0361H 7D09 MOV R5, #09H 0363H 12019D LCALL 019DH 0366H 1202C1 LCALL 02C1H 0369H E4 CLR A 036AH F544 MOV 44H, A 036CH C2B6 CLR P3.6 036EH 22 RET 036FH E574 MOV A, 74H 0371H B4011C CJNE A, #01H, 0390H 0374H 7B00 MOV R3, #00H 0376H 7A00 MOV R2, #00H 0378H 7967 MOV R1, #67H 037AH 7D0B MOV R5, #0BH 037CH 1202C9 LCALL 02C9H 037FH 7B00 MOV R3, #00H 0381H 7A00 MOV R2, #00H 0383H 7967 MOV R1, #67H 0385H 7D0B MOV R5, #0BH 0387H 12019D LCALL 019DH 038AH 1202C1 LCALL 02C1H 038DH E4 CLR A 038EH F574 MOV 74H, A 0390H 22 RET 0391H 759850 MOV SCON, #50H 0394H 758780 MOV PCON, #80H 0397H 758920 MOV TMOD, #20H 039AH 758DF3 MOV TH1, #F3H 039DH 758BF3 MOV TL1, #F3H 03A0H 75A890 MOV IE, #90H 03A3H D28E SETB TR1 03A5H 22 RET 03A6H C2AF CLR EA 03A8H 8F99 MOV SBUF, R7 03AAH 3099FD JNB TI, 03AAH 03ADH C299 CLR TI 03AFH D2AF SETB EA 03B1H 22 RET 03B2H E4 CLR A 03B3H FF MOV R7, A 03B4H 0F INC R7 03B5H EF MOV A, R7 03B6H D3 SETB C 03B7H 94FA SUBB A, #FAH 03B9H 40F9 JC 03B4H 03BBH 22 RET 03BCH E4 CLR A 03BDH FE MOV R6, A 03BEH 1203B2 LCALL 03B2H 03C1H 0E INC R6 03C2H BE0BF9 CJNE R6, #0BH, 03BEH 03C5H 22 RET 03C6H 99 SUBB A, R1
反汇编 程序
|