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: > http://dl.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 mailto:sales@picnpoke.com