gnupic: CCS C Compiler
Subject:
RE: CCS C Compiler
From:
"SU,MENGJIN (A-Oregon,ex1)" ####@####.####
Date:
13 Mar 2002 16:33:39 -0000
Message-Id: <9F8400020EC5D311AF62009027C3961603226BA3@axcs09.cos.agilent.com>
But I got a different impression. Look the following code I
got:
0000 01681 .................... COM2_Send (ret);
[ 1]03B5 0855 01682 MOVF 55,W
[ 2]03B6 00DE 01683 MOVWF 5E
[ 3]03B7 080B 01684 MOVF 0B,W
[ 4]03B8 050B 01685 ANDWF 0B,W
[ 5]03B9 138B 01686 BCF 0B.7
[ 6]03BA 1683 01687 BSF 03.5
[ 7]03BB 0080 01688 MOVWF 00
[ 8]03BC 1283 01689 BCF 03.5
[ 9]03BD 20D8 01690 CALL 0D8
[10]03BE 1683 01691 BSF 03.5
[11]03BF 1F80 01692 BTFSS 00.7
[12]03C0 2BC4 01693 GOTO 3C4
[13]03C1 1283 01694 BCF 03.5
[14]03C2 178B 01695 BSF 0B.7
[15]03C3 1683 01696 BSF 03.5
[16]03C4 1283 01697 BCF 03.5
00
This is a simple function call with one parameter. I used a PIC16C63
for the project. I really don't know what line[4] intends to do.
Line[6] is redundant (since INDF has been mapped to both bank0 and
bank1). Line[7] seems wrong since FSR hasn't been assigned a value.
Overall, the whole segment of this code seems way too bulky.
- Mengjin -
-----Original Message-----
From: Ross Mitchell ####@####.####
Sent: Tuesday, March 12, 2002 7:43 PM
To: Jason Howard; ####@####.####
Subject: Re: CCS C Compiler
Hello Jason,
>I know it is not exactly GNU, but I was wondering if anyone has had
>good/bad experiences with the CCS C compiler for the PIC (14bit).
I have used it on a few projects. It works OK. Depending upon
how one does code, the code
quality varies from boring and mechanical to excellent. It really depends
upon using the most suitable
C description which matches the pic capabilities.
For instance:
**** Example 1
int flag, value;
if( flag & 8 )
value |= 8;
this will generate correct code but a bit on the bulky side.
**** Example 2
However If I code the same problem like this:
int flag, value;
#bit SWITCHs = flag.3
#bit SCTRL = value.3
then
if( SWITCHs )
SCTRL = 1;
will compile into two lines, (provided things are in the correct bank).
******
On the other hand the package does have the odd annoying point,
like that
when I compile a file it opens the source for write and updates it. Since
I use
a separate editor (not theirs) this means that I open the project for each
compile.
Still All in all it strikes me as reasonably good value.
Ross
---------------------------------------------------------------------
To unsubscribe, e-mail: ####@####.####
For additional commands, e-mail: ####@####.####