Thanks, Tamas, almost, except I dont want to modify it. I have a set of constants (defined with DATA) now I am reading data from an external source and want to put that into RAM, and then I want to compare that with the constants. and yes, I did study the datasheet sections 5.3, 5.4, and I have worked with the instructions and written some program to read the data from the external bus and process it and so on. I just have a hard time to get from the multi page description to a simple code. >From the discussion here I understand you use instructions like movff, but how do I name (address) the RAM? and are the GPRs all 8 bit registers? thank you Lembit ----- Original Message ----- From: "Tamas Rudnai" To: "Microcontroller discussion list - Public." Sent: Tuesday, September 05, 2006 3:06 PM Subject: Re: [PIC] MPASM - table write problem 18F4520 >I think I have got it: He would like to modify the table declared with >DATA. > > If that's true, you can't do that. With DATA you create a contant that > sits > in the program memory (Flash ROM), so that you have to move it first into > the RAM (does not matter if it's static or dynamic, it's the only RAM you > have inside the PIC). So if you need to modify the text you have to move > it > into a temporary space. If you need it for permanent basis, so that you > need > that modified data after you switch off your device, you have to put it to > the EEPROM. > > Tamas > > > > On 05/09/06, Jan-Erik Soderholm wrote: >> >> Lembit Soobik wrote : >> >> > I want to read/write the SRAM, not the EEPROM >> > and not the Flash Memory... >> > >> > Lembit >> >> >> Close to *all* instructions can do that. >> It's not clear what your problem is. >> Could you be more specific ? >> >> 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 >> > > > > -- > unPIC -- The PIC Disassembler > http://unpic.sourceforge.net > -- > 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