Searching \ for 'XORWF & XORLW' 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=xorwf+xorlw
Search entire site for: 'XORWF & XORLW'.

Truncated match.
PICList Thread
'XORWF & XORLW'
2000\03\03@163751 by Andrew T Kelley

picon face
Hi,

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.

Thanks,
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:
dl.http://www.juno.com/get/tagj.

2000\03\03@174655 by Dmitry Kiryashov

flavicon
face
Hi Andrew.

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.

WBR Dmitry.


T Kelley wrote:
{Quote hidden}

2000\03\05@170118 by Tony Nixon

flavicon
picon face
Andrew T Kelley wrote:
>
> Hi,
>
> 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.
>
> Thanks,
> 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:
> dl.http://www.juno.com/get/tagj.

XORLW instruction

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

etc.


XORWF instruction

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







--
Best regards

Tony

http://www.picnpoke.com
spam_OUTsalesTakeThisOuTspampicnpoke.com

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