thanks, Dave, yes I get data in on one pin and need to verify validity and then compare with stored data to find out what actions to do. receiving and verifying of the incomming data works fine. It is just the addressing of RAM, which I think I am on the right track now. thanks Lembit ----- Original Message ----- From: "Dave Wheeler" To: "Microcontroller discussion list - Public." Sent: Tuesday, September 05, 2006 4:07 PM Subject: Re: [PIC] MPASM - table write problem 18F4520 >I think I know hat the OP wants. Please note the following instructions > are 14 bit core and are almost certainly different. > > 1 Assume registers have already been reserved and are called B1, B2 etc > 2 I want to put the value of 73 into register B2 > > movlw 0x49 ; move literal value of 0x49 (73 decimal) into W reg > movwf B1 ; move contents of W reg into register called B1 > > The problem I have is not actually knowing what the OP is trying to > achieve. If for arguments sake he said he has data coming in through the > serial port which wants to be put in a buffer, then there is something > to work with. > > Regards > > Dave > > Jan-Erik Soderholm wrote: >> Lembit Soobik wrote : >> >> >>> Lets say I have 8 variables, each one Byte, named >>> B1, B2, ... B8 >>> and I want to write them into the first GPR >>> >> >> Why do you want to write them into the *same* >> (what you call the "first") GPR ? >> >> And where are B1-B8 stored if not in a 8 GPR's ? >> >> What is it that you call "variables" ?? >> >> >>> howdo I address the GPR and >>> which instruction do I use to write (or read) >>> >> >> As I said, any (almost) instruction can address the >> GPR's. Some (like movf) reads and some (like movwf) >> writes... >> >> You absolutely *HAVE* to study the data sheet again! >> >> In particular the part with the instruction set... >> >> Regards, >> Jan-Erik. >> >> >> >> > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.405 / Virus Database: 268.11.7/437 - Release Date: 04.09.2006 > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist