[fpc-devel] Freepascal in microcontrollers
mschnell at lumino.de
Wed Feb 27 09:44:26 CET 2008
You can avoid cryptic language constructs in the main source code.
I did not yet use the preprocessor in Pascal but a standard way to
access memory mapped ports in C is something like this (from the top of
#define _port = 0x87
#define ByteIO(p) *(((volatile unsigned char)*)(p))
now in the main code you go
x = ByteIO(_port);
x = port;
ByteIO(_port) = 0x55;
may look queer to some watchers, but
port = 0x55;
should be nice.
More information about the fpc-devel