Searching \ for ''84 registers' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=registers
Search entire site for: ''84 registers'.

Truncated match.
PICList Thread
''84 registers'
1995\04\01@225351 by Andrew Warren

face
flavicon
face
Jamie Lawson (spam_OUTjlawsonTakeThisOuTspamevbhort.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 - .....fastfwdKILLspamspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California

More... (looser matching)
- Last day of these posts
- In 1995 , 1996 only
- Today
- New search...