> Kevin Rhoades wrote: > > > In the include files (MPASM) for the '84 it lists: > > > > TRISA EQU H'0085' > > > > My question is this, why does the file assign the value of 85 to be > > used when addressing the TRISA register if the msb is not even used? > > Would not a value of 05 give the same result? > > Kevin: > > Yes. In fact, if you use the include file and write: > > MOVWF TRISA > > MPASM will generate code that's equivalent to "MOVWF 005H". On top > of that, it'll give you a warning that the operand was truncated. > > Given this, it seems silly to use the "085H" definition. Using that > definition, however, > > 1. more accurately depicts what your code's doing, making it > more self-documenting, > 2. allows simulators and emulators to track the TRISA > register, and > 3. builds character. > > -Andy > and... 4. you can write: MOVLW TRISA MOVWF FSR to access the register indirectly. ___Bob