movwf TRISA^0x80, can anyone explain?

Status
Not open for further replies.

skyrock

New Member
I came accross this command but cannot understand what this means. Can anyone explain?

movwf TRISA^0x80

what is the function of having "^0x80" at the end?
 
Last edited:
If you didn't have the ^0x80 then the assembler would give the following warning,
"Message[302] : Register in operand not in bank 0. Ensure that bank bits are correct."
This is because TRISA has the value 0x85 (bank 1) and the largest allowable value if 0x7f. The ^0x80 converts 0x84 into 0x04 - another way to do this is &0x7F.

As long as you set/clr the bank select bits properly you can ignore this message. Another way to get rid of this annoying message is to do "errorlevel -302".

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…