CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Comment ending in question mark

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kjeldsen58



Joined: 21 Sep 2012
Posts: 1
Location: Norway

View user's profile Send private message MSN Messenger

Comment ending in question mark
PostPosted: Fri Sep 21, 2012 4:02 am     Reply with quote

I discovered a problem when I put a '?' as last character in comment.
The code is compiled ok but is hard to debug because the
c-source and binary get offset.

Compiler: PCM version 4.136
Compile without question mark at the end of comment:

02441 ....................
02442 .................... T1CON=T1CON_INI; //Timer1 counting seconds with 32khz clock-source
044D 300F 02443 MOVLW 0F
044E 0090 02444 MOVWF 10
02445 .................... delay_ms(1);
044F 3001 02446 MOVLW 01
0450 00D7 02447 MOVWF 57
0451 204E 02448 CALL 04E
02449 .................... bit_set(TMR1H,7);
0452 178F 02450 BSF 0F.7


Compile with question mark at the end of comment:

02441 ....................
02442 .................... T1CON=T1CON_INI; //Timer1 counting seconds with 32khz clock-source?
044D 300F 02443 MOVLW 0F
044E 0090 02444 MOVWF 10
044F 3001 02445 MOVLW 01
0450 00D7 02446 MOVWF 57
0451 204E 02447 CALL 04E
02448 .................... delay_ms(1);
0452 178F 02449 BSF 0F.7
02450 .................... bit_set(TMR1H,7);
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Sep 21, 2012 5:31 am     Reply with quote

Sounds like a real bug, not something we can help you with on this users forum. Nobody of CCS is monitoring the forum on a regular basis. See right top corner of this web page for how to send bug reports.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Sep 21, 2012 1:32 pm     Reply with quote

Post a test program. I made one, based on your snippet and I compiled
it with vs. 4.136 and there's no error.
Quote:

CCS PCM C Compiler, Version 4.136, ----- 21-Sep-12 12:28

Build Successful.
Loaded C:\Program Files\PICC\Projects\PCM_Test\pcm_test.cof.
BUILD SUCCEEDED: Fri Sep 21 12:28:40 2012

Test program:
Code:

#include <16F887.H>
#fuses INTRC_IO, NOWDT,BROWNOUT, PUT
#use delay(clock=4M)

#byte T1CON = getenv("SFR:T1CON")
#byte TMR1H = getenv("SFR:TMR1H")

#define T1CON_INI 0x0F

//======================================
void main(void)
{

T1CON=T1CON_INI; //Timer1 counting seconds with 32khz clock-source?
delay_ms(1);
bit_set(TMR1H,7);


while(1);

}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group