C能弄出来,但傻得多
1: 0000 3000 MOVLW 0 0001 008A MOVWF 0xa 0002 2804 GOTO 0x4 0003 0000 NOP 2: 3: #if defined(__PCB__) 4: #include <16C56.h> 5: #fuses HS,NOWDT,NOPROTECT 6: #use delay(clock=20000000) 7: #use rs232(baud=9600, xmit=PIN_A3, rcv=PIN_A2) 8: 9: #elif defined(__PCM__) 10: 11: #include <16F877.h> 12: #device *=16 13: #fuses HS,NOWDT,NOPROTECT,NOLVP 14: #use delay(clock=20000000) 15: 16: #elif defined(__PCH__) 17: #include <18F452.h> 18: #fuses HS,NOWDT,NOPROTECT,NOLVP 19: #use delay(clock=20000000) 20: #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7) 21: #endif 22: 23: 24: 25: 26: //#include <string.h> 27: int8 A[64]; 28: #locate A = 0x020 29: int8 B[64]; 30: #locate B = 0x0A0 31: 32: int8 C[64]; 33: #locate C = 0x120 34: int8 D[64]; 35: #locate D = 0x1A0 36: 37: int8 i; 38: void main() { 0004 0184 CLRF 0x4 0005 1383 BCF 0x3, 0x7 0006 301F MOVLW 0x1f 0007 0583 ANDWF 0x3, F 0008 1683 BSF 0x3, 0x5 0009 141F BSF 0x1f, 0 000A 149F BSF 0x1f, 0x1 000B 151F BSF 0x1f, 0x2 000C 119F BCF 0x1f, 0x3 39: 40: 41: while(1){ 42: 43: for(i=0;i<64;i++) 000D 1283 BCF 0x3, 0x5 000E 01E0 CLRF 0x60 000F 0860 MOVF 0x60, W 0010 3C3F SUBLW 0x3f 0011 1C03 BTFSS 0x3, 0 0012 282C GOTO 0x2c 44: { 45: A=i; 0013 3020 MOVLW 0x20 0014 0760 ADDWF 0x60, W 0015 0084 MOVWF 0x4 0016 1383 BCF 0x3, 0x7 0017 0860 MOVF 0x60, W 0018 0080 MOVWF 0 46: B=i+64; 0019 30A0 MOVLW 0xa0 001A 0760 ADDWF 0x60, W 001B 0084 MOVWF 0x4 001C 1383 BCF 0x3, 0x7 001D 3040 MOVLW 0x40 001E 0760 ADDWF 0x60, W 001F 0080 MOVWF 0 47: C=0; 0020 3020 MOVLW 0x20 0021 0760 ADDWF 0x60, W 0022 0084 MOVWF 0x4 0023 1783 BSF 0x3, 0x7 0024 0180 CLRF 0 48: D=0; 0025 30A0 MOVLW 0xa0 0026 0760 ADDWF 0x60, W 0027 0084 MOVWF 0x4 0028 1783 BSF 0x3, 0x7 0029 0180 CLRF 0 49: } 002A 0AE0 INCF 0x60, F 002B 280F GOTO 0xf 50: 51: 52: 53: #asm nop #endasm 002C 0000 NOP 54: 55: MEMCPY( &C[0],&A[0], 64); 002D 3001 MOVLW 0x1 002E 00E2 MOVWF 0x62 002F 3020 MOVLW 0x20 0030 00E1 MOVWF 0x61 0031 01E4 CLRF 0x64 0032 00E3 MOVWF 0x63 0033 3040 MOVLW 0x40 0034 00F8 MOVWF 0x78 0035 0863 MOVF 0x63, W 0036 0084 MOVWF 0x4 0037 1383 BCF 0x3, 0x7 0038 1864 BTFSC 0x64, 0 0039 1783 BSF 0x3, 0x7 003A 0800 MOVF 0, W 003B 00F7 MOVWF 0x77 003C 0861 MOVF 0x61, W 003D 0084 MOVWF 0x4 003E 1383 BCF 0x3, 0x7 003F 1862 BTFSC 0x62, 0 0040 1783 BSF 0x3, 0x7 0041 0877 MOVF 0x77, W 0042 0080 MOVWF 0 0043 0AE1 INCF 0x61, F 0044 1903 BTFSC 0x3, 0x2 0045 0AE2 INCF 0x62, F 0046 0AE3 INCF 0x63, F 0047 1903 BTFSC 0x3, 0x2 0048 0AE4 INCF 0x64, F 0049 0BF8 DECFSZ 0x78, F 004A 2835 GOTO 0x35 56: MEMCPY( &D[0],&B[0], 64); 004B 3001 MOVLW 0x1 004C 00E2 MOVWF 0x62 004D 30A0 MOVLW 0xa0 004E 00E1 MOVWF 0x61 004F 01E4 CLRF 0x64 0050 00E3 MOVWF 0x63 0051 3040 MOVLW 0x40 0052 00F8 MOVWF 0x78 0053 0863 MOVF 0x63, W 0054 0084 MOVWF 0x4 0055 1383 BCF 0x3, 0x7 0056 1864 BTFSC 0x64, 0 0057 1783 BSF 0x3, 0x7 0058 0800 MOVF 0, W 0059 00F7 MOVWF 0x77 005A 0861 MOVF 0x61, W 005B 0084 MOVWF 0x4 005C 1383 BCF 0x3, 0x7 005D 1862 BTFSC 0x62, 0 005E 1783 BSF 0x3, 0x7 005F 0877 MOVF 0x77, W 0060 0080 MOVWF 0 0061 0AE1 INCF 0x61, F 0062 1903 BTFSC 0x3, 0x2 0063 0AE2 INCF 0x62, F 0064 0AE3 INCF 0x63, F 0065 1903 BTFSC 0x3, 0x2 0066 0AE4 INCF 0x64, F 0067 0BF8 DECFSZ 0x78, F 0068 2853 GOTO 0x53 57: 58: #asm nop #endasm 0069 0000 NOP 59: // memmove(&A, &B ,5); 60: } 006A 1683 BSF 0x3, 0x5 006B 280D GOTO 0xd 61: 006C 0063 SLEEP |
|