In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: It would be easier to just create a jumptable that directly jumps to the appropiate code. For example: mov w,opcode add pc,w jmp code_opcode0 jmp code_opcode1 etc. All main entries must then be in the lower half of a single page. If one page is not enough (most likely) then just do for somee opcodes code_opcode0: jmp @code_opcode0_entry to jump to another page. Return from each code with a retp You could also double the opcode at the start like this: mov w,opcode add w,opcode add pc,w jmp @code_opcode0 jmp @code_opcode1 etc. but I expect this takes more codespace. regards peter ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=125768#m125772 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)