Anual1Y Writing To An Output Port; Using The Break-Point Register For Debug; Using The E And R Commands For Debugging - Hal Communications MCEM-8080 Technical Manual

Microcomputer system
Table of Contents

Advertisement

5.5
Manually Writing to an Output Port
At times it is desirable to be able to manually write data into an
output port.
This can be accomplished by:
(1)
Follow steps a. through h. of the previous two examples
using the output port address instead of the memory address.
Remember that I/O addresses are copied twice, once as the
high order address and once as the low order address.
For
instance, Output Port 23 H is represented on the address bus
(and break-point register) as 2323 H.
(2)
Press and release the OUTPUT WRITE switch.
(3)
Go to the desired address to proceed with program execution.
5.6
Using the Break-point Register for Debugging
The break-point
~egister
provides a mechanism for selectively stopping
the 8080A.
During the course of debugging a program, it may be desirable
to determine when and if a particular string of instructions is executed.
Setting the break-point register to this address (or I/O port) will
pro~ide
this information.
Another use of the break-point register allows use of the
STEP switch as a IIloop execute
l l
switch.
If the software being debugged
contains a loop, the break-point register can be set to an address within
the loop and the RUN / STOP switch set to RUN.
At this point, the 808oA
will stop each time it passes through the loop and will continue each
time the STEP is pressed and released.
5.7
Using the E and R Commands for Debugging
The software monitor provides two very powerful commands to aid in
debugging programs.
The E (EXIT) command is a mechanism for saving
complete context at any point in a user program and entering into the
monitor.
The R (RETURN) command allows return to the user program after
restoring the complete context previously saved by the E command.
The
E command is invoked by executing RST
7.
For example:
5.7.1
Manual EXIT Command
When a program is being debugged by manually stepping through the
program steps
(u~ing
the STEP switch), it is sometimes
d~sirable
to
examine the contents of some ·of the internal registers of the 8080A ·(for
instance the B, A, or PSW registers).
However, since these registers
are internal to the 8080A, they can not be directly examined on the console.
The following procedure can be used to examine these internal registers:
a.
Set RUN / STOP switch to STOP.
(If the STEP switch is being used for debugging, the RUN /
STOP switch is probably already set to STOP.)
b.
Press and release the STEP switch as many times as necessary
to brihg the execution to the first byte of an instruction.
5-4

Advertisement

Table of Contents
loading

Table of Contents