I am working on a project where I am receiving strings of data via RS-232. The data is NMEA sentences, of which I do not need all data from every sentence. Therefore I am parsing the data as it is received and writing the data into a buffer of on board RAM (16F873). Once the entire sentence is received, I am copying data from the buffer and placing it in different locations from where it will be displayed. Some of the sentences have a "data valid" flag, that often is not the first byte of data, so I need to place the data in temp storage until I am sure the data is valid. The problem I am currently addressing is copying string data from one location to another - in assembler. Using direct addressing would make the program way to large for the amount of program memory on the 16F873. There are 35 pieces of data (from 1 byte to 10 bytes in length) in 24 sentences that can be up to 80 bytes long. Therefore I am using indirect addressing. The problem with indirect addressing is that, as I understand it, you can only be indirectly addressing one place at the time. The method for handling this that I have come up with is to: 1 set up the FSR for the byte to be read 2 read the byte using INDF and store in a temp location - check for end of string - exit if EOS 3 inc the FSR and save into another temp location (FSR_READ) 4 load FSR with the register to write to (stored in FSR_WRITE) 5 read the byte from its temp location 6 write the byte using INDF 7 inc FSR and save FSR in FSR_WRITE 8 load FSR with the register to read from (FSR_READ) 9 loop back to #2 Any one have a better idea, or has anyone done string copying in assembler before? I searched the archives and did not find anything. I want to use assembler - not C, and I wish to stay with the 16F87x series. Thanks, David David V. Fansler DFansler@MindSpring.com www.DV-Fansler.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body