I having problems with the C51 v6.2 not compiling certain lines of codes. I tried doing a search on previous posts but didn't see anything related. here are the C statements:
if (msg_inbuf!=0) // check if message waiting */ { ack_flag=1; // next received character should be ack*/ Write_S(); // Send to tx buffer */ }
; if (msg_inbuf!=0) // check if message waiting */ ; SOURCE LINE # 1562 MOV DPTR,#msg_inbuf MOVX A,@DPTR JNZ ?C0363 INC DPTR MOVX A,@DPTR ?C0363: JZ ?C0242 ; { ; SOURCE LINE # 1563 ; ack_flag=1; // next received character should be ack*/ ; SOURCE LINE # 1564 ; Write_S(); // Send to tx buffer */ ; SOURCE LINE # 1565 ; } ; SOURCE LINE # 1566
Hello, maybe there is something that will be optimized to nothing? May be the well known hint "did you keep in mind the 'volatile'?", which helps in about 50 % of all strange behaviour phenomena in situations with interrupts and hardware variables? Is Write_S() existent? Or does it write to a variable that is never read again by software (I mean a hardware register) and therefore optimized to nothing?