'XORWF & XORLW'
Andrew T Kelley
I would like to know why xorlw has 255 for a limit while xorwf only has a
127 for a limit.
Please tell me why.
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
Please read carefully PIC datasheet for your chip.
Xorlw is performed with W and constant and result
is stored back in W.
Xorwf is performed with W and register in memory
addressed by parameter and result is stored either
in W or in register depends from second parameter.
T Kelley wrote:
|Andrew T Kelley wrote:
> I would like to know why xorlw has 255 for a limit while xorwf only has a
> 127 for a limit.
> Please tell me why.
> Andrew K.
> YOU'RE PAYING TOO MUCH FOR THE INTERNET!
> Juno now offers FREE Internet Access!
> Try it today - there's no risk! For your FREE software, visit:
11 1010 kkkk kkkk
kkkk kkkk = 8 bits of literal data
Therefore the literal data can be 0 - 255 (8 bits)
xorlw 0xFF 11 1010 1111 1111
xorlw 0x09 11 1010 0000 1001
00 0110 dfff ffff
d = destination bit
0 = result to W Reg
1 = result back to file register specified in the instruction
fff ffff = 7 bits of RAM address data
Therefore the address data can be 0 - 127 (7 bits)
xorwf 0x0C 00 0110 1000 1100
xorwf 0x8C 00 0110 1000 1100 bit 8 is truncated
xorwf 0xFF,w 00 0110 0111 1111 bit 8 is truncated
More... (looser matching)
- Last day of these posts
- In 2000
, 2001 only
- New search...