In SX Microcontrollers, SX/B Compiler and SX-Key Tool, dog8spam wrote: device sx52,oschs1 device turbo,stackx,optionx IRC_CAL IRC_SLOW reset RSPO freq 50_000_000 org8 fsrcounter ds 1 rcounter ds 1 loop1var ds 1 drag ds 1 dloop1var ds 1 dloop2var ds 1 dloop3var ds 1 dloop4var ds 1 ;-------RESET POINT ONLY--------- RSPO mov !ra,#0 mov !re,#0 ;--------------IDLE---------------- mov $30,#%10000000 mov $31,#%01000000 mov $32,#%00100000 mov $33,#%00010000 IdleLoop mov loop1var,#4 ;right here the program goes back to RSPO and just loops clr rcounter mov FSR,#$2F loop1 call xaxis inc FSR mov re,IND call delay clr re djnz loop1var,loop1 jmp IdleLoop xaxis call xtable mov ra,w ret xtable mov w,rcounter jmp pc+w retw %01110111 retw %10111011 retw %11011101 retw %11101110 retw 0 retw 0 delay ret Right at mov loop1var,#4 the program goes back to the reset point. I can't figure it out. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=88818 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)