This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

skipping lines when compiling

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 */
}
And here is the output:
; 			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

I can't see any problems with the syntax. This is not the only section where this is happening. It seems to be treating the lines as comments. I can't figure out what I'm doing wrong.

Parents
  • Try creating a preprocessor listing file to see what the compiler is actually compiling.

    Since you didn't post the entire source, it's hard for anyone to try to compile it. It's possible that the problem is found in code your didn't post.

    Jon

Reply
  • Try creating a preprocessor listing file to see what the compiler is actually compiling.

    Since you didn't post the entire source, it's hard for anyone to try to compile it. It's possible that the problem is found in code your didn't post.

    Jon

Children
No data