In SX Microcontrollers, SX/B Compiler and SX-Key Tool, p.realacci wrote: Thank you Bean for your suggestion. I've changed the code with SUB/FUNC - ENDSUB/ENDFUNC and the program has started to work fine. BUT: I've looked at the list and I've found that the new address of the subroutine MoveToPosition_Y was 80C, while in the previous version of the program the subroutine was located at address 808. I've then removed a couple of instructions at the beginning of the program in order to have this subroutine located at the same address of the previous not-working version. I've tested this new version and... it didn't work! The problem is still the same: the PAGE instruction does not seem to correctly set the page bits in the status register before jumping to the Move_V subroutine. Note that Move_V works fine when called from subroutins others than MoveToPosition_Y. I've attached this new version of the program. Thank you. Paolo ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=257881#m257915 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)