Accessing PRT0DR or Other Registers in Compiler?

Question: When I write reg[PRT0DR] I get the error message: Undefined symbol PRT0DR.

 

Answer:

Add the include statement to include m8c.inc file in your code.

#include "m8c.inc"

This will let the compiler see the register name definitions in the M8c.inc file.