In SX Microcontrollers, SX/B Compiler and SX-Key Tool, InSilico wrote: the fastest method I know for looking up 10 numbers is using a table, for example in SX Assembly for the IEC 60063 E12 numbers: [code] E12Table jmp pc+w retw 10 ;0 retw 12 ;1 retw 15 ;2 retw 18 ;3 retw 22 ;4 retw 27 ;5 retw 33 ;6 retw 39 ;7 retw 47 ;8 retw 56 ;9 retw 68 ;10 retw 82 ;11 [/code] you load the index into w before calling this subroutine to get the indexed value: [code] mov w, #8 call Table ; w register now contains '47' [/code] hope this helps! ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=328749#m328753 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)