Single-stepping in MAC/65 assembler-editor

 

This single-step routine works with the version of DDT (Dunion’s Debugging Tool) built into
the MAC/65 assembler-editor from Optimized Systems Software. Our technical staff was unable
to fully test the technique prior to deadline:

Let’s say you’re using the [OPTION] key to single-step through a program that you’re
revising, and you reach a code block that includes a tight loop which is executed many
times. For example:

LDX #117
LP LDA BUF,X
STA OUT,X
DEX
RPL LP
JSR SOMEPLACE

Now, you know that loop will work okay, but using [OPTION] to go through it will take forever.
So Instead, use the [OPTION] key to single-step down to the first occurrence of the BPL (or
any similar branch instruction). Then press [N]–the loop will execute and the program will
stop on the next instruction, ready for an [OPTION].

Normally, N means to skip the Next instruction. DDT executes it by placing a temporary
break-point on the instruction past the next one and then doing a GO (or START). So with a
branch instruction, N puts the break right after the branch. Only when the branch is not
taken is the break activated.

Caution: Don’t use this technique on a branch that might never „fall through.“ Since DDT
does a GO, your program may run away too quickly to recover.