View previous topic :: View next topic |
Author |
Message |
kjeldsen58
Joined: 21 Sep 2012 Posts: 1 Location: Norway
|
Comment ending in question mark |
Posted: Fri Sep 21, 2012 4:02 am |
|
|
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); |
|
![](templates/subSilver/images/spacer.gif) |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Fri Sep 21, 2012 5:31 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Sep 21, 2012 1:32 pm |
|
|
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);
} |
|
|
![](templates/subSilver/images/spacer.gif) |
|