С compiler for PIC16 microcontrollers

Some time ago I developed a simple C compiler for Microchip PIC16 microcontrollers.

The package contains:

Simplified language

The language is very simplified.

1) No structs, unions and typedefs. No float point.

2) Functions may have not more that two arguments. The total size of arguments cannot exceed 4 bytes.

3) Size of long is 4 bytes, short - 2 bytes, char and int - 1 byte. The simple pointer has the size of 1 byte, far pointer - 2 bytes.

4) The type of pointer to pointer is equivalent to (char*) for simple pointers, and (short*) for far pointers.

5) All functions must be declared before use. The argument lists in function declarations are not supported.

6) Bit operations are supported, for example:

if (a.1)
	b.4 = 1;

The only operations for bits are:

7) Direct placement of data and functions is supported, for example:

short PROD @ 0x18;
void startup () @ 0
{ ... }

The startup() function will be placed in command memory at address 0, the variable PROD references the data memory at address 18h.