| ??? 10/27/02 05:55 Read: times |
#31495 - [C51] is bug in keil c51 7.01 ? |
i think this is compiler bug in keil c51 i cheak this code in compiler 6.20
it work good but in c51 ver 7.01 have bug ! compiler and linker directive : ROM(COMPACT) OPTIMIZE (7,SPEED) REGFILE (.polaro01.ORC) BROWSE NOINTPROMOTE DEBUG OBJECTEXTEND TABS (2) TO "polaro01" REGFILE (.polaro01.ORC) RAMSIZE(256) DISABLEWARNING (15,16) static void serial () small interrupt SIO_VECTOR using 2 { register char buf; if (RI0 != 0){ RI0 = 0; buf = SBUF0 ; if (buf == 0x12){ //some code return; <---error line code ! } if (inpack){ //some code return; } if (buf == ESC) { //some code return; } //some code return; }//end inpack if (!StartSPack && !InSPack) return; //some code jamp to ersp } else if (buf != *(SDPointer -1)) goto ERSP; if (buf == 0x66){ //some code return; //end of good send; } if (!*SDPointer){ outchar(0x14); return; } outchar(*SDPointer); SDPointer++; return; //--------------- send ERROR Routine ERSP: outchar(ESC); InSPack = 0; StartSPack = 0; return; //------------------ti } if (TI0 != 0){ TI0 = 0 ; TI_E = 0; } } very nice bug in on return line jamp to ersp to end of interrupt ! you can see this src in keil ; PackState = 1; //inpack = 1; ; SOURCE LINE # 61 MOV PackState,#01H ; SOURCE LINE # 63 ; StartSPack = 0; ; SOURCE LINE # 64 AJMP ?C0028 ; // the address of ?C0028 : ?C0028: CLR InSPack ; StartSPack = 0; ; SOURCE LINE # 112 CLR StartSPack SJMP ?C0008 ; return; this is not end or exit point of my code this is one jmp in middle of my code ! the address of exit of my code is SJMP ?C0008 ?C0008: POP PSW POP DPL POP DPH POP B POP ACC RETI ; END OF serial i try this code compile in ver 6.21 6.20c and some other ver good but in 7.01 :-( |
| Topic | Author | Date |
| [C51] is bug in keil c51 7.01 ? | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? -zbi | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? -zbi | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? -zbi | 01/01/70 00:00 | |
| RE: Please re-post the code! | 01/01/70 00:00 | |
| RE: parentheses, braces, brackets | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 - jon | 01/01/70 00:00 | |
| RE: [C51] is bug in keil c51 7.01 ? | 01/01/70 00:00 | |
| RE: [C51] No bug! | 01/01/70 00:00 | |
| RE: [C51] No bug! | 01/01/70 00:00 | |
RE: [C51] is bug in keil c51 7.01 ? | 01/01/70 00:00 |



