---------- > From: Alboni Giorgio > To: PICLIST@MITVMA.MIT.EDU > Subject: C compiler in java > Date: Thursday, January 29, 1998 6:46 AM > > Can someone send me a C program for PIC? > I'd like to extend my C compiler to a standard PIC C so I need some example > for implement all the grammar production. > For example: wich is the instruction for bit manipolation? EX. PORTA[2]=1; > for implement: bsf PORTA,2 all of the following will do a bsf PORTA.2 in MPC #pragma portrw PORTA @ 1; PORTA.2 = 1; // This will set bit 2 PORTA = PORTA | 4; // This will set bit 2 struct { int bit0 : 1; int bit1 : 1; int bit2 : 1; int bit3 : 1; int bit4 : 1; int bit5 : 1; int bit6 : 1; int bit7 : 1; } porta @ &PORTA; porta.bit2 = 1; // This will set bit 2 bit porta2 = &PORTA,2; porta2 = 1; // This will set bit 2 Walter Banks