In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter wrote: [PSXM/GD = Programming the SX Microcontroller, by Gunther Daubach] Regarding Pg. 21(bot)-22(top) on adding NOP instructions to slow down the looping: I notice in the Program section of the Registers debug window that the debugger "steps" differently from what I would have expected. It steps from clrb to the first nop, then directly to the jmp. Loop clrb rc.7 nop nop nop setb rc.7 jmp Loop The setb instruction does get executed; it's just that the debugger steps into the first nop, stepping "over" all the other nops and beyond the setb instruction to the subsequent jmp. The intended effect of the 3 nops --to delay the looping at that precise point-- also works, so the nops are getting executed (i.e., taking up one cycle each doing nothing) and the setb is causing the LED to change state so it too is obviously being executed. I'm curious about why the debugger is designed to step in this way, rather than stepping into each nop and into the setb instructions? (E.g., are the 3 nops and the setb somehow bundled into a single 4-cycle-long version of setb that gets executed at the point the first nop is reached?) PAR ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=103075 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)