const vs #define
const = constant
#define = macro
When you use const, it will be stored as like as variable. The only difference between the const and variable, const cannot be on the left side - cannot change its value.
When you use #define, the precompiler will replace all LPT1 to 0x378.
In this case the function(LPT1); is in the source, then the precompiler will replace it to function(0x378) , so the compiler will get a numeric value(literal), not a variable.