[fa.info-cpm] DDT bug

C70:info-cpm (05/29/82)

>From mknox@Utexas-11 Fri May 28 23:08:13 1982

Its known.  I reported it to both Digital Research and Pickles-and-Trout
(We buy so many of their systems that I thought they might have better
luck with DR than I was).  That was back in late '79 or early '80.  DR
said they knew about it, but had no plans to fix it.  As far as I can
tell, its still in the most recent copies we've received.

Haven't seen a fix for it, but would like to very much.  Nowdays I just
DDT.  It is 'Jxx  $' that seems to really get to it.

automatically make my conditional jumps go to addresses that don't confuse
-------

C70:info-cpm (05/29/82)

>From RGF@Mit-Mc Sat May 29 01:20:19 1982
Aha!  It is indeed the JNZ $  that confuses DDT.  The reason (and  the
reason for DRs reluctance to fix it) is the way that DDT (and DCON, by
the way) does tracing: immediately before control is passed to the
instruction @PC, a breakpoint is set at the location immediately after
that instruction and, if the instruction is such that the program
counter may change (jump, call or return - conditional) a second breakpoint
is set at the second possible location.  Now in the case of JXX $, both
locations are "$", and the PC stays where it is, regardless of the
result of the Z flag.  

I've tried other combinations of conditional jump (JZ and JNZ) and could
find no bug -- look in the file MC:CPM;JNZTES ASM -- therefore, I must
now assume that the only case this bug occurs in is "JXX $".  Why would
anyone ever code "JXX $"? (unless you want your program to die if the
condition is true...)

At any rate, the only possible fix would be for DDT and DCON to fully
simulate conditional jumps, rather than run in real-time as is
done now.  This would be a major change to make for such an obscure bug,
and who could question DR (or the author of DCON) for being reluctant
to waste that much effort?

			--Ron Fowler

C70:info-cpm (06/03/82)

>From ucivax!csuf!bruce@Ucb-C70 Thu Jun  3 03:30:53 1982
I assure you that I am NOT doing a JNZ $ or JZ $.  I have further discovered
that the bug only appears with the JZ instruction, and what is more, ALL of the
status flags are garbled after the jump.  It does sound somewhat like a bad
memory location, and I will research this further.  I tend not to suspect DDT,
because I have been using it for over three years, and I think I would have
noticed a bug of this type before!

						Bruce

C70:info-cpm (06/03/82)

>From ucivax!csuf!bruce@Ucb-C70 Thu Jun  3 03:42:40 1982
Well, it's not a memory problem.  No matter where I had DCON relocate itself,
the problem showed up.  Just to clarify things, with the following program:

start:
	xra	a		; set A to zero, and the Z flag to 1 (see, Ron,
				; I DO know what I'm doing!)
	jz	label		; this will NOT jump when single-stepped with
				; DDT or DCON.
	nop
	nop
label:	nop

Well folks? Any other ideas?

						Bruce

C70:info-cpm (06/03/82)

>From ucivax!csuf!bruce@Ucb-C70 Thu Jun  3 03:54:58 1982
In my several years of programming experience, I think I know how the Z flag
works on the Z-80.  I also think I know which way a JNZ instruction is supposed
to jump.  Anyhow, if no one else can find the bug, I guess I have to assy
that I have a garbled copy of DDT AND DCON.  How they both got to be garbled
in the same manner is beyond me...  It seems more likely that something in my
system is causing DDT to malfunction - something in the BIOS, or possibly a bad
memory chip.

							Bruce