Jamie Lawson (jlawson@evbhort.uoguelph.ca) wrote: >My question has to do with accessing registers in different pages, >for example; > >To access PORTA you must set the page bits to point to >page 0 and refer to this register as loaction 0x05. >To access TRISA you must set the page bits to point to >page 1 and refer to this register as location 0x85. > >Just out of curiosity, why is it necessary to change pages AND refer >to a different location? Why do you not simply change page registers >and reference the same relative register. In the above example TRISA >would be on page 1 but be register 0x05? Jamie: It's not necessary to do both. In fact, if you look at the opcode generated by a "MOVWF 0x85", you'll see that it's identical to the opcode for "MOVWF 0x05"... That's why the page-select bits are required in the first place. The Microchip assembler will even give you a warning when it assembles your source code, telling you that it's truncating the register address. -Andy -- Andrew Warren - fastfwd@ix.netcom.com Fast Forward Engineering, Vista, California