DOCUMENTATION FOR TD.COM (November 16, 1985 verson) TD.COM is a Dynamic Debugging Tool like DDT that uses TDL/CDL type mnemonics for the Z-80. Most of the commands are identical or at least very similar to those of DDT and can be found in the documentation that comes with CP/M, by Digital Research. A short list of the documented and un-documented DDT commands are included here along with the new commands of TD. Command: Action: A Enter assembly language mnemonics and operands B n/a C n/a D Display memory in Hexidecimal and ASCII E End/Close file F Fill memory with constant G Begin execution with optional breakpoints H Hex math functions I Setup standard input file control block J n/a K n/a L List memory using assembler mnemonics M Move a block of memory from source to destination N n/a O Open a file P Parse for matching hex word Q n/a R Read program for testing S Substitute memory values T Trace program execution U Un-trace program execution V Verify identical memory blocks W Write to file X eXamine CPU registers or flags Y n/a Z n/a EXAMPLES: (Note: user supplied carriage return shown as [RETURN] cursor shown as '#', addresses are shown between parenthisis) A Enter assembly language mnemonics and operands GENERAL FORM: A(start) -A100 [RETURN] 0100 LXI H,0 [RETURN] 0103 DAD SP [RETURN] 0104 LXI SP,1400 [RETURN] 0107 SHLD 13D0 [RETURN] 010A [RETURN] - B n/a C n/a D Display memory in Hexidecimal and ASCII GENERAL FORM: D(start),(finish) If the finish is not supplied 12 line will be displayed. If the start is not displayed, the address after the previous 'D' command ended will be used, or failing that 0100h. -D100 [RETURN] 0100 21 00 00 39 31 0C 07 E5 21 5C 00 11 C2 02 7E 12 !..91...!\.... . 0110 23 13 7E FE 20 CA 28 01 0E 08 CD 96 02 21 65 00 #. . .<.).....e. ... ... 01B0 01 FE 3F CA 65 01 23 7E FE 21 DA 65 01 2A 0E 07 ..?.e.# ~.!.e*.. -# E End/Close file GENERAL FORM: E(optional run address) [RETURN] F Fill memory with constant GENERAL FORMS: F(start),(finish),constant [RETURN] F(address),byte [RETURN] F(address) [RETURN] -F100,100,21 [RETURN] Fill 0100 with 21H -F101,102,0 [RETURN] Fill 0101 thru 0102 with zeros -FC500,FFFF,0 [RETURN] This will usually wipe out CP/M -F100,C3 Fill address 100H with 0C3H -F100 Same as S option below G Begin execution with optional breakpoints GENERAL FORM: G(start),(finish) [RETURN] -G100,112 [RETURN] Executes code starting at 0100h and keeps -# executing code until the program counter is 0112H H Hex math functons GENERAL FORM: H(number),(number) -H100,200 [RETURN] + = 0300 Sum of two numbers - = FF00 First number minus second number * = 0000 First number times second number / = 0000 First number divide by second number MOD = 0100 Remainder from dividing first number by second AND = 0000 Bit by bit AND First number with second number OR = 0300 Bit by bit OR'd XOR = 0300 Bit by bit Exclusive OR'd -# I Setup standard input file control block GENERAL FORM: Ifilename.typ [RETURN] J n/a K n/a L List memory using assembler mnemonics GENERAL FORM: L(start),(finish) Works similar to 'D' command above -L100 0100 LXI H,0000 0103 DAD SP 0104 LXI SP,070C 0107 PUSH H -# M Move a block of memory from source to destination GENERAL FORM: M(start),(finish),(destination) [RETURN] -MC500,FF00,900 [RETURN] Copies memory starting at 0C500H thru -# 0FF00H to 0900H N n/a O Open a file GENERAL FORM: Ofilename.typ [RETURN] P Parse for matching hex word P(start),(finish),(word) -P100,200,0A0D Search from 0100h thru 0200 for occurrance of 0A0D 0103 Two occurrences were found, one beginning at 0103h 013A and one beginning at 013Ah -# NOTE: The two bytes are searched in reverse order in this case the debugger is actually looking for a carriage return and line feed (0DH 0AH) Q n/a R Read program for testing GENERAL FORM: R(optional bias) [RETURN] -R8000 [RETURN] reads a file into memory 8000h bytes higher -# than actual load address S Substitute memory values GENERAL FORM: S(start) [RETURN] -S100 0100 01-21 [RETURN] 01H changed to 21H 0101 BC-0 [RETURN] BCH changed to 00H 0102 00-00 [RETURN] 0FH changed to 00H 0103 C3-=[RETURN] NOTE: No change in memory 0104 3D . NOTE: The dot ends the sequence as will carriage return alone -# T Trace program execution GENERAL FORM: T(number of lines of code) -T3 [RETURN] C0Z0M0E0I0 A=00 B=0000 D=0000 H=0000 S=0100 P=0100 LXI H,0000 C0Z0M0E0I0 A=00 B=0000 D=0000 H=0000 S=0100 P=0100 DAD SP C0Z0M0E0I0 A=00 B=0000 D=0000 H=0100 S=0100 P=0100 LXI SP,070C -# U Un-trace program execution Works like 'T' command except nothing is displayed V Verify identical memory blocks GENERAL FORM: V(start),(finish),(target) [RETURN] -V100,500,700 [RETURN] 0105 25 0705 85 In this example, three bytes were found 01F0 25 07F0 85 to be different 0485 75 0A85 32 -# W Write to file GENERAL FORM: W(start),(finish) [RETURN] X eXamine CPU registers or flags GENERAL FORM: X(register or flag) [RETURN] -XA A=00 01 [RETURN] 'A' register changed from zero to one -# -XZ Z0 [RETURN] 'Z' flag left unchanged -# Y n/a Z n/a