In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Coriolis wrote: John, I think I see your problem. The instruction following snc is a compound statement (is compiled into multiple instructions), you cant follow a conditional skip with a compound instruction. Also there is some inefficiency in your code. Try the following: [code] (replace this text with your code) ;Initialization code mov mptrlo, #tmsg & 255 ;seed memory pointer to begining of text mov mptrhi, #(tmsg >> 8) :DO mov m, mptrhi ;move top 4 bits into the M register mov w, mptrlo ;move bottom 8 bits into W IREAD ;reads the char and pos w+m into W mov char, W ;moves the char at w into char CJE char,#0,@scroll ;done with the top line, do the bottom line now call @LCD_OUT INC mptrlo ;update memory pointer SNC INC mptrhi JMP @:DO [/code]But I notice you are not using the top 4 bits stored at the memory location. When you only need 8 bits of data from the program memory area, don't use IREAD, use a jump table as such: [code];define this so that the first instruction is in the first half of a memory page tmsg jmp pc+w retw 'H' retw 'e' retw 'l' retw 'l' retw 'o' retw 0 ;then in your code Initialization mov idx, #1 ;then in your program body :DO mov w, idx ;load index into w call @tmsg ;get idx'th character mov char, w ;store character jz :endoftext ;end of text call @LCD_OUT inc idx JMP @:DO :endoftext [/code] this method is much faster and can handle strings upto 254 characters. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=84844#m84891 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)