In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rodneymc wrote: Bean, could you look at this? From the help file: idx = 3 [b]LOOKUP[/b] idx, $00, $01, $02, $04, $08, $10, $20, $40, $80, LEDs has LEDs = 40 after completion instead of $04 Here's the compiled source code: Shouldn't the Skips be Jumps? 215 0052 0C03 MOV idx,#3 ; idx = 3 0053 0034 216 217 0054 0294 MOV W,++idx ; LOOKUP idx, $00, $01, $02, $04, $08, $10, $20, $40, $80, LEDs 218 0055 0028 MOV __PARAM1,W 219 0056 0215 MOV W,leds 220 0057 02E8 DECSZ __PARAM1 221 0058 0702 SKIP 222 0059 0C00 MOV W,#$00 223 005A 02E8 DECSZ __PARAM1 224 005B 0602 SKIP 225 005C 0C01 MOV W,#$01 226 005D 02E8 DECSZ __PARAM1 227 005E 0702 SKIP 228 005F 0C02 MOV W,#$02 229 0060 02E8 DECSZ __PARAM1 230 0061 0602 SKIP 231 0062 0C04 MOV W,#$04 232 0063 02E8 DECSZ __PARAM1 233 0064 0702 SKIP 234 0065 0C08 MOV W,#$08 235 0066 02E8 DECSZ __PARAM1 236 0067 0602 SKIP 237 0068 0C10 MOV W,#$10 238 0069 02E8 DECSZ __PARAM1 239 006A 0702 SKIP 240 006B 0C20 MOV W,#$20 241 006C 02E8 DECSZ __PARAM1 242 006D 0602 SKIP 243 006E 0C40 MOV W,#$40 244 006F 02E8 DECSZ __PARAM1 245 0070 0702 SKIP 246 0071 0C80 MOV W,#$80 247 0072 0035 MOV leds,W ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=451838 Need assistance? Send an email to the Forum Administrator at sysadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2010 (http://www.dotNetBB.com)