Renaming a I/O port

Thread Starter

Eric007

Joined Aug 5, 2011
1,158
Hi All

Is it legal to give a I/O port 2 names?

For example:

LEDPORT equ PORTA
SWPORT equ PORTA

The reason I'm asking this is that I have defined some pins as input and some other pins as output in the same PORTA

Any comments would be appreciated

Eric007
 

ErnieM

Joined Apr 24, 2011
8,377
Nope, that is not a problem at all for the assembler.

If it makes more sense for the person writing the software then by all means do so. Symbol names are much better then magic numbers as they are self-documenting.
 
Top