Hi Raphael,
> What's PENABLE? How is cmd_or_data defined? And how is DATA?
> Assuming
> #define PENABLE TRISB=0x00
> enum { CMD=0, DATA };
> unsigned char cmd_or_data;
> and using SDCC 2.6.4, r4616, the resulting code looks beautiful.
> However, this might be due to
> (1) the improved PIC code generator in the newer SDCC, or
> (2) the assumptions above `spoiling' your bug, or
> (3) the #include files not shown in your snippet.
>
> I suggest you first upgrade your SDCC installation (ideally via svn, a
> more recent nightly build (probably 31-12-2006) from
> http://sdcc.sf.net/snap.php will do), try again and report your bug
> again with complete, compiling source code so that I can reproduce the
> error.
>
Following your advice I fetched the latest sources from the SVN
repository and compiled them; the problem has now disappeared.
Fantastic!
The definitions are (for the sake of completeness :-) )
#define DATA 1
#define CMD 0
static unsigned char cmd_or_data = DATA;
#define PENABLE RA0=1; DELAY; RA0=0
#define DELAY _asm NOP _endasm;_asm NOP _endasm;_asm NOP _endasm;_asm
NOP _endasm;_asm NOP _endasm;
(In the 2.6.0 sources I had added the bit field definitions for PORTA
and PORTB in the pic library - perhaps this caused the problem?)
Thanks & best regards
Dietmar
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user