Errorneous Assignment pointer


I’m trying to use the serial port C whitout the driver. I’m using this code:

char * pu8DataReg;

pu8DataReg = SBDR;

*pu8DataReg = 0xDA; // this line fails. Dynamic C generate me a msg: Run time error: Errorneous assignment pointer.

What is the problem?



SBDR is a register address, not a memory address. Use WrPortI() to write to it.