![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/6/a5/6a551846-516d-437a-becb-4dd2012a64bf/6a551846-516d-437a-becb-4dd2012a64bf-bgfb.png)
PHYSICAL DESIGN AND DEBUGGING
This program can be written in ASM86 assembly language. Because the primary purpose
of this program
is to exercise the system hardware quickly, the InteI386 DX micropro-
cessor
is
not tested extensively, and Protected Mode
is
not enabled.
The diagnostic software verifies the ability of the system to perform bus cycles. The
.
InteI386 DX microprocessor fetches code from the EPROMs, implying that EPROM
read cycles function correctly, Instructions in the program explicitly generate bus cycles
to write and read RAM. The data value read back from RAM
is
checked for correctness,
then a byte (AAH if the data
is
correct, 55H if it
is
not)
is
output to the 8-bit output
latch. The program then loops back to its beginning and starts over.
After the source code
is
assembled, the resulting object code should be
as
shown in
Figure
11-30.
11.8.6 Debugging Hints
The debugging approach described in this section
is
incremental; it lets the programmer
debug the system piece
by
piece.
If
even the simple 4-byte program does not run, a logic
analyzer can be used to determine where the problem
is.
At
the
very
least, the
Intel386
DX microprocessor should be initiating a code fetch cycle to EPROM.
The InteI386 DX microprocessor stops running only for one of three reasons:
• The READY # signal
is
never asserted to terminate the bus cycle.
• The HALT instruction
is
encountered, so the InteI386 DX microprocessor enters a
HALT state.
• The InteI386 DX microprocessor encountets a shutdown condition.
In
Real Mode
operation (as in the simple diagnostic program), a shutdown usually indicates that the
Intel386
DX microprocessor
is
reading garbage on the data bus.
If
the Intel386 DX microprocessor stops running, the cause can be determined easily if
the system contains simple hardware decoders with associated LEDs to visually indicate
halt and shutdown conditions. The InteI386
DX microprocessor emits specific codes on
its
WIR#,
D/C#,
M/IO#, and address outputs to indicate halt or shutdown. A circuit to
decode these signals can be tested
by
executing a HLT instruction (F4H) to see if the
halt LED
is
turned on. The shutdown LED cannot be tested in the same
way,
but its
decoder
is
so
similar to the halt decoder that if the halt decoder works, the shutdown
decoder should also work.
If
the shutdown LED comes on and the Intel386 DX microprocessor stops running, the
data being read in during code fetch cycles
is
garbled. The programmer should check the
EPROM contents, the wiring of the address path and data path, and the data transceiv-
ers. The 4-byte diagnostic program should be used to investigate the system. This pro-
gram should work before more complex software
is
used.
If
neither the halt LED nor the shutdown LED
is
on when the Intel386 DX micropro-
cessor stops running,
theREADY#
generation circuit has not activated
READY#
to
comple~e
the bus cycle. The Intel386 DX microprocessor
is
adding wait states to the
11-39