System information

In particular, the BDOS address at location 6H (address field of the JMP instruction at location
5H) is modified by DDT to address the base location of the DDT nucleus, which, in turn,
contains a JMP instruction to the BDOS. Thus, programs that use this address field to size
memory see the logical end of memory at the base of the DDT nucleus rather than the base of the
BDOS.
The assembler/disassembler module resides directly below the DDT nucleus in the transient
program area. If the A, L, T, or X commands are used during the debugging process, the DDT
program again alters the address field at 6H to include this module, further reducing the logical
end of memory. If a program loads beyond the beginning of the assembler/disassembler module,
the A and L commands are lost (their use produces a ? in response) and the trace and display (T
and X) commands list the inst field of the display in hexadecimal, rather than as a decoded
instruction.
4.4 A Sample Program
The following example silows an edit, assemble, and debug for a simple program that reads a set
of data values and determines the largest value in the set. The largest value is taken from the
vector and stored into LARGE at the termination of the program.
A>ED SCAN.ASM
*I
ORG 1-00H ;START OF TRANSIENT
;AREA
MVI B, LEN ;LENGTH OF VECTOR TO SCAN
MVI C, O ;LARGER_RST VALUE SO FAR
LOOP LXI H, VECT ;BASE OF VECTOR
LOOP: MOV A, M ;GET VALUE
SUB C ;LARGER VALUE IN C?
JNC NFOUND ;JUMP IF LARGER VALUE NOT
;FOUND
; NEW LARGEST VALUE, STORE IT TO C
MOV C, A
NFOUND INX H ;TO NEXT ELEMENT
DCR B ;MORE TO SCAN?
JNZ LOOP ;FOR ANOTHER
;
; END OF SCAN, STORE C
4.2 DDT Commands CP/M Operating System Manual
4-12