> Hello, I just found that direct TRISB6 = 0; works properly. Even if I > would like TRISBbits.TRISB6 = 0; as it is done for PIC16 port. Is there > any plans to synchronize it ?
You can use #define NO_BIT_DEFINES 1 #include <pic14regs.h> to disable bit defines, see the header files. NO_BIT_DEFINES must be defined *before* including the device header! > I have another question. In SDCC manual I did not find it but maybe > somebody can help me. I currently initialize strings like that: > main() { > __data unsigned char buf[10]; > > buf[0] = 'H', buf[1] = 'e'; buf[2] = 'l', buf[3] = 'l', buf[4] = 'o'; > buf[5] = 0x0d; buf[6] = 0x00; > SendString( buf); > } > > Is there any more clever way how to initialize buffer with "Hello\n" in > data memory ? But I do not want to have string in program memory and use > GPTRGET. Or the way I did it is the only possible way ? Why not use void main (void) { __data unsigned char str[] = "Hello"; } This works well, and generates the same code as your manual assignments given a local variable 'str'. This fails utterly for globals, though (a bug that I need to fix some day)... Regards, Raphael ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user