PDA

View Full Version : Register Settings



Archangel
- 26th September 2007, 01:23
Hi Everyone,
Newbie type question: Yeah I know I should already know this, do the following code snippets have the same meaning?
intcon.7 = 1
intcon = %10000000
intcon = 128
I think so but I am unsure of the 1st snippet.
Thank You
JS

mister_e
- 26th September 2007, 01:27
Yes and no,
the last 2 yes do the same thing but the first one ONLY affect bit 7 and don't care about the other ones. Depending what you REALLY need to do, the first may have it's own advantage.

Same thing when you compare

PORTB=128
PORTB=$80
PORTB.7=1
HIGH PORTB.1

Archangel
- 26th September 2007, 01:28
Yes and no,
the last 2 yes do the same thing but the first one ONLY affect bit 7 and don't care about the other ones. Depending what you REALLY need to do, the first may have it's own advantage.
Thank You mister_e,
I thought that was how it worked but wanted to make sure.
Thanks again
JS