ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Вторник
26 ноября
76592 Топик полностью
Gamma SPb (25.12.2006 14:40, просмотров: 1) ответил =L.A.= на Пробовал поиграцца с оптимизацией
ИМХО асмовый листинг приведи, что получается. У меня все нормально <c> 8.05 PL2 --- D:\Project\_test\test_picc9.50\main.c ------------------------------------------------------1: 2: #include "pic.h"3: 4: #define Out RB05: #define PAUSE1(x) {NOP();}6: 7: typedef unsigned char uchar;8: 9: void SendData(uchar DataBuff);10: 11: uchar counter;12: 13: void main (void)14: {15: while (1)16: {17: for (counter = 10; counter < 0xFF; counter--) 7E5 300A MOVLW 0xa 7E6 1283 BCF 0x3, 0x5 7E7 1303 BCF 0x3, 0x6 7E8 00A0 MOVWF 0x20 7E9 2FED GOTO 0x7ed 7EC 03A0 DECF 0x20, F 7ED 0F20 INCFSZ 0x20, W 7EE 2FEA GOTO 0x7ea 7EF 2FE5 GOTO 0x7e518: {19: SendData(counter); 7EA 0820 MOVF 0x20, W20: }21: } 22: 23: }24: 25: 26: void SendData(uchar DataBuff)27: { 7F0 0183 CLRF 0x3 7F1 00A1 MOVWF 0x2128: if(DataBuff == 0) 7F2 08A1 MOVF 0x21, F 7F3 1D03 BTFSS 0x3, 0x2 7F4 2FF7 GOTO 0x7f729: DataBuff = 10; 7F5 300A MOVLW 0xa 7F6 00A1 MOVWF 0x2130: 31: Out = 1; 7F7 1406 BSF 0x6, 032: PAUSE1(1); 7F8 0000 NOP33: 34: do35: {36: Out = 1; 7F9 1406 BSF 0x6, 037: PAUSE1(4); 7FA 0000 NOP38: Out = 0; 7FB 1006 BCF 0x6, 039: PAUSE1(4); 7FC 0000 NOP40: } while(--DataBuff); 7FD 0BA1 DECFSZ 0x21, F 7FE 2FF9 GOTO 0x7f941: 42: return;43: } 7FF 0008 RETURN 9.50 PL2 --- D:\Project\_test\test_picc9.50\main.c ------------------------------------------------------1: 2: #include "pic.h"3: 4: #define Out RB05: #define PAUSE1(x) {NOP();}6: 7: typedef unsigned char uchar;8: 9: void SendData(uchar DataBuff);10: 11: uchar counter;12: 13: void main (void)14: {15: while (1)16: {17: for (counter = 10; counter < 0xFF; counter--) 7E5 300A MOVLW 0xa 7E6 1283 BCF 0x3, 0x5 7E7 1303 BCF 0x3, 0x6 7E8 00A0 MOVWF 0x20 7E9 2FED GOTO 0x7ed 7EC 03A0 DECF 0x20, F 7ED 0F20 INCFSZ 0x20, W 7EE 2FEA GOTO 0x7ea 7EF 2FE5 GOTO 0x7e5 7F0 0183 CLRF 0x3 7F1 00A1 MOVWF 0x2118: {19: SendData(counter); 7EA 0820 MOVF 0x20, W20: }21: } 22: 23: }24: 25: 26: void SendData(uchar DataBuff)27: {28: if(DataBuff == 0) 7F2 08A1 MOVF 0x21, F 7F3 1D03 BTFSS 0x3, 0x2 7F4 2FF7 GOTO 0x7f729: DataBuff = 10; 7F5 300A MOVLW 0xa 7F6 00A1 MOVWF 0x2130: 31: Out = 1; 7F7 1406 BSF 0x6, 032: PAUSE1(1); 7F8 0000 NOP33: 34: do35: {36: Out = 1; 7F9 1406 BSF 0x6, 037: PAUSE1(4); 7FA 0000 NOP38: Out = 0; 7FB 1006 BCF 0x6, 039: PAUSE1(4); 7FC 0000 NOP40: } while(--DataBuff); 7FD 0BA1 DECFSZ 0x21, F 7FE 2FF9 GOTO 0x7f941: 42: return;43: } 7FF 0008 RETURN </c>