DDTF5.DOC 2/22/88 DDTF5 Documentation (C) Copyright 1981, 1985, 1986, 1988 by LOGIC ASSOCIATES, Chicago A "find-string" function for use during DDT, SID, etc. Permission is hereby granted only for non-commercial copying and distribution of DDTF5.COM, DDTF5.ASM, and DDTF5.DOC. >>>>> Essential: Read "ASSEMBLY INSTRUCTIONS" near the end of <<<<< >>>>> this document before attempting to assemble DDTF5.ASM. <<<<< ---------------- VERSION HISTORY Version 5 has a stronger self-protection algorithm, to protect against removal by other utilities that may already be resident below the CCP. (Some such utilities would remove DDTF between the time it invoked the debugger and the time the debugger was loaded.) Version 4 has been given a more flexible procedure for finding the ccp, in order to be compatible with more systems. Version 3 introduced "wild-card" searches. Unlike version 1, versions 2 and later use no restart locations. INSTRUCTIONS This program searches main memory (RAM) for all occurrences of any string. DDTF5 is invoked in the same fashion that DDT, SID, or any other debugger is invoked. You can type "DDTF5 PROGNAME.COM" to load a program called PROGNAME.COM into memory under your debugger and DDTF5. Or you can simply type "DDTF5" to load your debugger and DDTF5 by themselves. Once DDTF5 and your debugger have been loaded, you may set up any desired search-string. Insert it into memory starting at location 5dh. [] The string may be installed via the I, A, and/or S commands of your debugger. [] The string should start and end with the same character, one not used elsewhere in the string. Example: "/find this/". [] A "wild card" position in the string is represented by a "?" (3fh). For instance, "/r??t/" will be matched by "root", "rant", or "r @t". (This holds true even when searching for a string of machine code.) A listing of all occurrences of the desired string can now be found and displayed by typing control-F. To repeat the search, type control-F again, as many times as desired. Each occurrence is represented by a one-line, ddt-style dump. The sought-for string will appear in the middle of the line. Notes: [] A summary of the above instructions will be displayed by DDTF5 anytime you type control-A (for "Assistance"). [] If the search turns up negative, check your model for-- 1) A missing prefix or suffix: (E.g., "/find this".) 2) A suffix or prefix that also appears inside the string. (E.g., "/find/this/".) EXAMPLES Example 1: Find all instances of "disk". Procedure: -i/disk/ where "" is the RETURN key. -^f Example 2: Find all copies of "JMP CDAB". Procedure: -a5d 005D nop 005E jmp cdab 0061 nop 0062 -^f Example 3: Find all instances of hex 005638. Procedure: -s5d 005D ff 005E 00 005F 56 0060 38 0061 ff 0062 . -^f Example 4: Print a fascinating display. (Be sure to try this.) Procedure: -i// -^f INTERFACING AND CUSTOMIZING [] This module relocates itself under the ccp, prints a signon message, then invokes your debugger. After loading, this module occupies .5K, but since it protects both itself and the CCP, this module entails a total overhead of 2.5K. [] If you are debugging a program under DDTF5, DDTF5 will not disturb your program's registers. But DDTF5 does use about five levels of your program's stack, so be sure there is enough stack space. [] Several variables in the source code can be changed if need be: Variable Default value Meaning -------- ------------- ------- BDOS7 11h Value of the byte at BDOS+7 in your system. (Standard is 11h). DBG "DDT " Name of your debugger. (Must be exactly 8 characters long.) SRCHSTR 0 Start of block to be searched. SRCHLEN 0ffffh Length of block to be searched. BOOT 0 Warmboot entry point in your system. LINELEN 16 Number of chars displayed in hex and ascii per line. (16 fits an 80-column display.) IMPORTANT: ASSEMBLY INSTRUCTIONS Note: As distributed, this source code can be assembled only by LASM.COM or LINKASM.COM, Ward Christensen's public domain assemblers. LINKASM is available as CPMUG 36.11 and 36.12; LASM.COM is available on many RCPM downloading systems. (LASM is LINKASM enhanced to display the name of each source file as it is being assembled.) LASM's special feature is allowing separate source files to treated as one file, if each previous file chains in the next via a LINK statement (eg., "LINK NEXT.ASM"). If linked to itself, a file can simulate two source copies of itself (or of some of its routines). This provides a convenient method for creating a relocatable program without using a relocating assembler. DDTF5.ASM uses this technique. 1) If LASM is available, DDTF5.ASM will assemble without modification. However, there is one proviso: if you change the name of the source file from DDTF5.ASM to something else, you must also change the "LINK DDTF5.ASM" instruction at the end of the source file to reflect the new name. 2) If LASM is not available, the following "double up" procedure will allow you to use DDTF5.ASM with any assembler. a) PIP DF.ASM=DDTF5.ASM b) Using any editor, erase these lines from the end of the new DF.ASM: IF NOT COPY1 LINK DDTF5 ENDIF c) PIP DF.ASM=DF.ASM,DF.ASM d) Use ASM.COM to assemble DF.ASM instead of DDTF5.ASM. e) Use LOAD.COM to convert DF.HEX into DF.COM. The resulting DF.COM is equivalent to DDTF5.COM. 4/15/86 Dear Colleague, Using DDTF5 has saved us much time and frustration, and we're sure it will do the same for you. We have designed it to be both useful and easy to use--as well as free. If you are also looking for commercial software, we invite you to write us for our catalog and copies of published reviews. Our software packages include-- [] DISKGUISE, a utility that reassigns disk drive names, converts user areas into "disk drives", supports 255 user areas, autosearches .OVR files, and more. [] VERSBASE, a real-time manager of version numbers in filenames. [] MEGABACK, a crash-proof utility for backing up hard disks. [] TUTORI/O, a single-key, software probe for exploring BDOS file operations. ("Breathtaking", DDJ, October, 1983, p. 112.) [] SUPERMIT, a BASIC-like language for creating batch jobs. (Also available free of charge on many RCP/Ms.) Thank you for your interest, and we hope you enjoy DDTF5. Sincerely, Roy J. Lipscomb LOGIC ASSOCIATES, 1433 W. Thome, Chicago, IL 60660, (312) 274-0531 (end of documentation)