I just use table reads on the 18F series - you can get two bytes of data in the same space as a RETLW instruction and using the TABLTRU/H/L registers makes it nice and easy to read long strings. I don't think I'd go back to the RETLW method after setting up my routines for the table reads. Dom ----- Original Message ----- From: "Jinx" To: "pic microcontroller discussion list" Sent: Friday, June 20, 2008 4:21 AM Subject: [PIC] String retrieval macro > Does anyone have such a thing for the 18F ? I've got a bunch > of retlw messages for an LCD, of the type > > addwf pcl > dt "message1" > > in lower memory, 0x100 - 0x580, and some cross boundaries, > which means updating PCLATH. Normally I don't have such a > large number of messages, and would arrange it so that page > straddling is avoided > > Options for me are > > 1) re-write them as tables. Not so bad but that seems defeatist > 2) possibly re-invent the wheel by writing my own macro > > Ideally I'd want a macro that's self-modifying, perhaps using > something like > > get message1 > > which would find PCLATH (ie high(message1)) then correct > PCLATH if ADDWF PCL goes over a boundary > > Any offerings or thoughts ? > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -------------------------------------------------------------------------------- Internal Virus Database is out of date. Checked by AVG. Version: 8.0.100 / Virus Database: 270.3.0/1503 - Release Date: 14/06/2008 18:02 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist