In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Johnson Rod wrote: HTH, you're my savior, that algoritm is sweet. i'll have to read up on log algorithms bc that seems to be some powerful juju. this is my revised procedure. Gray_To_Binary_Log: cx = __PARAM1 'REG = (REG) XOR (REG >> 4) (>> means right shift, shifting zeros into the left side) 'REG = (REG) XOR (REG >> 2) 'REG = (REG) XOR (REG >> 1) ASM mov ax, cx clc rr cx clc rr cx clc rr cx clc rr cx xor ax, cx mov cx, ax clc rr cx clc rr cx xor ax, cx mov cx, ax clc rr cx xor ax, cx ENDASM RETURN ax ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=146196#m146367 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)