home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / ZSUS / Z3HELP-6.LBR / ZA.LBR / ZDDTZ.HZP / ZDDTZ.HLP
Text File  |  2000-06-30  |  12KB  |  267 lines

  1. ;
  2.                                   ZDDTZ.COM                                   
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5.                8k (54)   2224  2.5        C. B. Falconer           Z3COM13
  6.  
  7.   1- Syntax  2- Command Summary  3- Differences from DDT.COM  4- Notes        
  8.  
  9.    ZDDTZ is DDTZ.COM  vs 2.5 patched  to permit response to  ZCPR3 DU/DIR file
  10. specifications.   DDTZ v2.5 is  a complete replacement for DDT,  DRI's  famous
  11. Dynamic Debugging Tool,  with improved functionality,  bug extermination,  and 
  12. full Z80 support.   In general,  DDTZ  is fully compatible  with  the original 
  13. utility,  but  it has extra and extended commands and many fewer quirks.   All 
  14. Z80-specific instructions  can  be (dis)assembled, though in Intel rather then 
  15. Zilog format.  Furthermore,  DDTZ will correctly trace  ('T' and 'U' commands) 
  16. both 8080 and Z80 instructions,  depending  on  which  CPU is  operating.   On 
  17. startup, the program announces which CPU it is running on.
  18. :1
  19.  
  20.  
  21.    Syntax:  ddtz<ret>
  22.  
  23.        or   ddtz [d:]filespec<ret>
  24.  
  25.    In the second form,  DDTZ will load the specified file into memory starting 
  26. at 0100H,  unless it's  a .HEX  file that sets its own load address.   Besides 
  27. reporting the  NEXT  free  address  and  the  PC  (program  counter)  after  a 
  28. successful load, DDTZ also shows the number of memory pages needed for a SAVE.
  29. Instead of having to write all this down, just use the 'Q' command at any time
  30. to redisplay these three values for the current application.
  31.  
  32. NOTE: loading more code above the NEXT pointer revises these values.
  33. :2
  34.  
  35.  
  36. Command Summary:
  37.  
  38.    DDTZ command                                          DDTZM command
  39.    ============                                          =============
  40.    @ (base)
  41.    A)ssemble first_address                                  A
  42.    B)egin {i.e., initialize stack and return}               B
  43.    C)ompare first_address,last_address,against_address      C
  44.    D)ump first_address[,last_address[,base]]                D
  45.    F)ill first_address,last_address,value                   F
  46.    G)o_to [address][,trap1[,trap2]]                         G
  47.    H)ex_arithmetic value1(,value2)                          H
  48.    I)nput FCBs_command_line                                 N)ame
  49.    K)eep [first_address,last_address]                       W)rite
  50.    L)ist_code first_address[,last_address]                  U)nassemble
  51.  
  52.  
  53.  
  54. Command Summary (continued):
  55.  
  56.    DDTZ command                                          DDTZM command
  57.    ============                                          =============
  58.  
  59.    M)ove first_address,last_address,destination             M
  60.    Q)uery {i.e. display memory parameters for application}  X)amine
  61.    R)ead_file (offset)                                      L)oad
  62.    S)ubstitute_in_memory first_address[,base]               E)nter
  63.    T)race_execution [count]                                 T
  64.    U)ntrace_execution [count] (i.e. do count instr)     (NOT AVAILABLE)
  65.    W)here_is first_address,last_address,word                S)earch
  66.    X)amine/change [register|flag]                           R)egister
  67.    Y)our_option BC:=parm1,DE:=parm2,call_address            Y
  68.    Z)80_register_display                                    Z
  69.                                ( on DDTZM only --> )        Q)uit
  70. :3
  71.  
  72.  
  73. Differences from DDT:
  74.  
  75.    As in DDT,  when a program is loaded above the area holding the 'A' and 'L'
  76. (and now 'K') command code,  these commands are disabled, and the extra memory
  77. is released to the user.   Thus,  DDTZ can occupy as little as 3K total memory 
  78. space.  Unlike DDT,  however,  DDTZ will not overwrite itself or the system on 
  79. program loads (except .HEX files).
  80.  
  81.    At initialization, the stack pointer (SP) points to a return to DDTZ,  just
  82. like for the CCP.   Thus,  programs that normally return  to  the CCP will  be 
  83. returned to DDTZ.  The 'B' command reinitializes this condition.
  84.  
  85.    The  intercept vector copies the BDOS version number,  etc.,  so  an object 
  86. program does not know that DDTZ is running (except for BIOS-BDOS vector size).
  87. Thus,  programs that check the version number should  execute correctly  under 
  88. DDTZ.
  89.  
  90.  
  91. Differences from DDT (continued):
  92.  
  93.    All input parameters can now be entered in any of three formats:
  94.  
  95.        (1) hexadecimal (as in DDT),
  96.        (2) decimal, by adding a leading '#' character,
  97.        (3) ASCII, by enclosing between either single or double quotes;
  98.            either one or two characters are allowed.
  99.  
  100.    Leading blanks in command lines and parameters are absorbed. Either a comma
  101. or a (single) space is a valid delimiter.  Either uppercase or lowercase input
  102. is accepted.
  103.  
  104.    The default command (for anything not otherwise recognizable) is 'H'.  This
  105. allows convenient calculation,  along with the other features described below.
  106. So, to convert a number, just enter it!
  107.  
  108.    As in DDT,  the prompt character is '-',  and the only error message is the
  109. query ('?'), which generally kicks you back to command mode.
  110.  
  111.  
  112. New Commands (Over DDT):
  113. =======================
  114.  
  115. NOTE: letters in parenthesis, e.g. "(U)", show the equivalent command
  116.       for DDTZM version (compatible with MSDOS debug).
  117.  
  118.    @   Sets or shows (with no parameter)  the internally stored "base"
  119.        value.  Also used with the 'S' and 'D' commands  as an optional
  120.        parameter  (though without the '@')  to display memory  from an
  121.        arbitrary base marker (offset). When set to zero (the default),
  122.        it does not affect any screen displays.
  123.  
  124.    B   B)egin:   resets  the USER stack pointer  to its initial value,
  125.        such that any program that exits by an RET will return to DDTZ.
  126.        DDTZ provides  a default stack space  of approximately 24 bytes
  127.        for user programs.
  128.  
  129.  
  130.    C   C)ompare first_address,last_address,against_address:  shows all
  131.        the byte differences between two memory areas, in the format
  132.  
  133.        XXXX aa YYYY bb
  134.  
  135.        where  XXXX and YYYY  are the comparative memory addresses, and
  136.        aa  and  bb  are the corresponding byte values.  Can be used to
  137.        verify  the identity  of two files  by first loading them  into
  138.        different memory areas with the 'R' command (see below).
  139.  
  140.    K   K)eep:  stores the modified memory area to disk under the file-
  141.   (W)  name  specified by  the 'I' command,  overwriting  the original
  142.        file from which it was loaded (the user is queried before doing
  143.        so).   By default,  the image of memory from 0100H  through the
  144.        "NEXT" value -1 is saved.  "K first_address,last_address" over-
  145.        rides this and allows writing ANY memory area to a file. Almost
  146.        a necessity for CPM 3.0 (no SAVE!).
  147.        W)rite on DDTZM
  148.  
  149.  
  150.    Q   Q)uery:  redisplays the "NEXT PC SAVE" report at any time.
  151.   (X)  eX)amine size on DDTZM.
  152.  
  153.    W   W)here first_address,last_address,value: searches the specified
  154.   (S)  memory area for the value (a 16-bit word, not a byte) and shows
  155.        the locations of all such.  Very useful for finding  CALL's  or
  156.        JMP's to a particular address, etc.
  157.        S)earch on DDTZM
  158.  
  159.    Y   Y)our_option parm1,parm2,address: executes an arbitrary routine
  160.        at the specified address,  with the BC and DE registers  set to
  161.        parm1 and parm2, respectively.
  162.  
  163.    Z   Displays (but does not alter) the Z80's alternate register set,
  164.        including the index registers (disabled if running on an 8080).
  165.        On Z80's,  automatically included  as the last part of the dis-
  166.        play by the 'X' command.
  167.  
  168.  
  169. Based (Offset) Displays:
  170. =======================
  171.  
  172.    The 'D' and 'S' commands can use  a stored  base value (offset),  as set by
  173. the '@' command.  The current @ value may be overridden for a single execution
  174. of  these commands  by adding the base  as  an extra parameter in  the command 
  175. line.  The effect is  to add this value to the first/last address and  display
  176. accordingly.  The address listing on the left becomes XXXX:YYYY, where XXXX is
  177. the offset address and YYYY is the actual memory address being displayed.  For
  178. example,  if you have  a data area located  at 42B7H and wish to preserve easy
  179. access, just enter "@42b7".  Now, "d0,3f" will dump memory starting at 4237H.
  180.  
  181.  
  182. Further Changes from DDT:
  183. ========================
  184.  
  185.    A   A)ssemble now accepts  the full Z80 as well as 8080 instruction
  186.        set, although it expects them in Intel rather than Zilog format
  187.        (see notes below  under  the 'L' command).   When in doubt, try
  188.        poking in the hexcode (with the 'S' command) and then  L)isting
  189.        to see what the (dis)assembler recognizes.
  190.  
  191.    D   D)isplay or D)ump  will accept  an optional third parameter  to
  192.        set the base value for a single execution only. Format has been
  193.        cleaned up.
  194.  
  195.    H   H)ex_arithmetic  on two values  also shows  their difference in
  196.        decimal. With only one value, converts to hexadecimal, decimal,
  197.        and ASCII (low-order byte only).
  198.  
  199.  
  200.    I   I)nput now allows drive specification  (d:...)  and sets up the
  201.   (N)  complete command line, including both FCB's (at addresses 005CH
  202.        and 006CH).  The tail (stored at 0081H up) is NOT upshifted.
  203.        N)ame on DDTZM
  204.  
  205.    L   L)ist now displays the raw hexcode, especially handy when exam-
  206.   (U)  ining non-code areas. Intel (8080 style) mnemonics are used, so
  207.        some disassembled instructions may look a little strange. E.g.,
  208.        the Z80's 'IN B,(C)' and 'OUT (C),B'  become  'INP B' and 'OUTP
  209.        B', respectively;  'LD (nnnn),BC' becomes 'SBCD nnnn', 'ADD IX,
  210.        BC' becomes 'DADX B', and 'JP (IX)' becomes 'PCIX'.
  211.        U)nassemble on DDTZM
  212.  
  213.  
  214.    R   R)ead  now permits  loading a file into memory  with an offset,
  215.   (L)  which  is added  to  the default load address  of 0100H.   When
  216.        reading in  a .HEX file  with  a preset bias,  the  'R' command
  217.        will not transfer control to an invalid execution point.   Ano-
  218.        ther execution of the  'R' command  will reread the input file,
  219.        e.g.:
  220.  
  221.          i blah<ret>
  222.          r<ret>
  223.          ...modify the code and generally mess about...
  224.          r<ret>
  225.  
  226.        The original file  is reloaded,  and the modifications  are re-
  227.        moved.
  228.        L)oad on DDTZM.
  229.  
  230.  
  231.    S   S)ubstitute  or S)et,  like D)isplay,  now accepts  an optional
  232.   (E)  second parameter  to set the base value  for a single execution
  233.        only.
  234.        E)nter on DDTZM
  235.  
  236.    T   T)rap/trace  on termination  now shows  the complete CPU state.
  237.        Traps and traces no longer lock up  when  a user RST 7 instruc-
  238.        tion is executed.  Tracing of BDOS/BIOS calls  is heavily trun-
  239.        cated, avoiding clutter and preventing system crashes.
  240.  
  241. NOTE:  The UNDOCUMENTED Z80 op-codes are not handled.  Can crash.
  242.  
  243.    X   eX)amine also shows  what two-byte values  the HL and SP regis-
  244.   (R)  ters are actually pointing to. On Z80's, displays the alternate
  245.        register set.
  246.        R)egisters on DDTZM.
  247.  
  248. NOTE:  Any use of the 'K' or 'R' command  resets the system DMA trans-
  249.        fer address to the standard default value of 0080H.
  250. :4
  251.  
  252.  
  253. ZDDTZ Notes:
  254.  
  255.    a. DDTZ was patched using ZDDTZ.ZEX by Fred Haines (4/87).   The routine 
  256.       used was adapted from the more general one,  applicable to many non-Z 
  257.       programs, written and published by Bruce Morgen in the The One-Eighty 
  258.       File, vol. 1, no. 11, 11/87.
  259.  
  260.    b. DDTZM contains commands compatible with  the Microsoft PC/MSDOS DEBUG
  261.       program.  The  only  differences  between DDTZ and DDTZM  are  in the 
  262.       command transfer table and sign-on message.
  263.  
  264.    c. DDTY is an assembly time option  for DDTZ,  which  eliminates the Z80
  265.       opcodes  on  the  A  and L commands.  It will  still  trace  Z80 code 
  266.       correctly.  Useful where disk space is short.
  267.