Micro Vibe

My Micro Hobby Projects

  • Increase font size
  • Default font size
  • Decrease font size
Home CPM 80 Using CPM DDT Utility

DDT Utility

Print

The DDT.COM utility program is used to replace the normal CPM shell with an Intel 8080 CPU debugger shell. When the debugger is loaded the DDT program code moves the program to the top of the transient program area overwriting the CPP. The address in low storage that points to the end of the transient program memory address is altered to protect the debugger. The DDT.COM utility takes one parameter, the name of a file to load into memory. The file name must not contain any wild-card characters and must have a file extension of ".HEX" or ".COM". A ".COM" file is always loaded at address 100h in memory. A ".HEX" file will be loaded at its specified origin address. Once the DDT.COM utility is loaded and DDT has loaded any specified program file a hyphen prompt is displayed. At this point the DDT program is ready to accept commands. If DDT reads a Ctrl-C character at the prompt DDT will perform a warm boot of CPM and the normal CPM shell prompt will appear. All numeric values entered for a command must be in hex format.

Command Descriptions
A start The "A" command starts assembly into memory at the memory location start. The start parameter is in hex format. The DDT program prompts for input by displaying the next memory address in hex format. 8080 CPU mnemonics are entered one per line. CPU register names and hex formatted values can be used as operands. To exit assemble mode enter a blank line (CR).
D [start][,end] The "D" command displays the memory in hex format and as ASCII characters, 16 bytes per line. If the start parameter is provided the display starts at the specified address. If the start parameter is not provided the last address displayed by the "D" command is used or the last value of the HL CPU register displayed by a "T", trace command. If the parameter for end is provided the value will be used as the last address to display. If no end parameter is provided twelve lines will be displayed.
F start,end,value The "F" command is use to fill a region of memory with a specified value. All three parameters are required. The memory starting a the value of the start parameter to the memory location in the end parameter are filled with the byte in the value parameter. DDT will overwrite any memory address including memory used by CPM and even DDT itself.
G [start][,break1][,break2] The "G" command instructs DDT to run the code at the memory address provided by the start parameter. If no parameters are provided the start address will be the current PC CPU register value of the program being debugged. If one or both of the optional break-point parameters are provided the memory address(es) will be updated with "RST 7" 8080 CPU instruction codes to return control to DDT when the address is executed by DDT. The original byte values are restored to the break-point memory address(es) when DDT regains control of the program.
H value1,value2 The "H" command performs addition and subtraction for the values specified in the value1 and value2 parameters. The first displayed value is the sum of the two parameters. The second displayed value is the subtraction of the two parameters.
I filename The "I" command is used to prepare a file FCB for use. The default FCB at memory address 5Ch is used. The filename parameter can not contain any wild-card characters and any disk identifier will be ignored. This command is primarily used to setup the default FCB for use with the "R" command. However the command can also be used to setup an FCB for the program under test
L [start][,end] The "L" command displays the memory as 8080 CPU instructions in assembler format. If the start parameter is provided the display starts at the specified address. If the start parameter is not provided the last address displayed by the "L" command is used or the last value of the HL CPU register displayed by a "T", trace command. If the parameter for end is provided the value will be used as the last address to display. If no end parameter is provided eleven lines will be displayed.
M start,end,to The "M" command is used to copy a region of memory from one location to another. The "M" command takes three parameters. The start parameter specifies the first address to copy. The end parameter specifies the last address to copy. The to parameter indicateds where the memory is to be copied. DDT will overwrite any memory address including memory used by CPM and even DDT itself.
R offset The "R" command is used to read a file whose file name is set with the "I" command into memory. A file extension of ".HEX" or ".COM" is required. A ".COM" file is always loaded at address 100h plus the value of the parameter offset in memory. A ".HEX" file will be loaded at its specified origin address for each line plus the value in the parameter offset. The command will report the highest load address when it completes.
S start The "S" command is used to change the contents of memory byte by byte. The "S" command displays the memory address of the first byte to be changed and the byte's value. Enter a two digit hex byte value and press enter (CR) to change the value. The command will display the address of the next byte and its value ready to change the next value. Press enter (CR) with a blank value to end the "S" command.
T count The "T" command is used to trace the program being debugged one CPU instruction at a time. The "T" command will trace the number of CPU instructions specified in the parameter count. If the count parameter is not provided a value of one is assumed. The last debugged program PC register value is used as the start address. For each CPU instruction the "T" command displays; the CPU flag values, all register values, the next CPU instruction and the address of the next instruction.
U count The "U" command is used to trace the program being debugged one CPU instruction at a time just like the "T" command. The "U" command does not display any output until it completes all the instructions specified by the count parameter.
X register The "X" command is used to view and set the debugged program's CPU register values. When the "X" command is invoked with no parameter the current CPU flag values and all CPU register values are displayed. To alter a CPU flag or register value pass the name of the flag or register as a parameter to the "X" command. DDT will display the register name and its current value and wait for you to enter a new value. For flag names (C, Z, M. E, I) a value of "0" clears the flag and a value of "1" sets the flag. Except for the "A" CPU register all other registers (B, D, H, S, P) are treated as 16 bit registers. The "S" register is the stack pointer, the "P" register is the program counter.
Last Updated on Saturday, 26 June 2010 09:14