Ruben- Your IDE is probably just fine. Take a closer look at the cross-page calling techniques. Try the following change for starters: ... loop mov w,ROM_H mov m,w mov w,ROM_L call @_iread_ ; was _iread_ test w ... A simple call to _iread_ does not push any page info, so the retp is going to give unsatisfactory results. Also note the m register gets clobbered is setting up the IREAD, so you may not be accessing the port registers in the manner you intend subsequently. Be sure to reset m (MODE instruction or whatever) as needed after an iread. Regards, Steve -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics