Hello Harold, > Below is some working code. Note that the branch instruction is two > bytes long, but the goto is four, thus some of the problem. yes, this was the problem. >Also, you > need to use the rlncf so you don't accidentally end up on an odd address > (though that might be thrown out when it gets loaded into the pc). The rlncf is a bit strange for me, as it makes "0b10110000" into "0b01100001" (the eighth bit turns first), so you have to be sure about the state of this bit. Not a problem in this code anyway. Maybe I'll use it. Your code is smart. Just don't know how to port it to CCS... oh boy! Thank you, Brusque ----------------------------------------------------------------- Edson Brusque C.I.Tronics Lighting Designers Ltda Research and Development Blumenau - SC - Brazil Say NO to HTML mail www.citronics.com.br ----------------------------------------------------------------- -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body