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
/
MBUG
/
MBUG037.ARC
/
DDTF.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
6KB
|
171 lines
* ddtf.doc
* Documentation for ddtf.asm, a string-find function for ddt.
* version 1 october 27, 1981
*
* (C) 1981, by Roy Lipscomb, Logic Associates, Chicago
* Copying or distributing permitted only if non-profit.
* Home system: HP/RCPM, (312) 955-4493
*
* This module relocates itself under the ccp, prints a signon
* message, then invokes ddt. Loaded, this module takes about
* .5K by both itself; but since it protects itself and the CCP,
* it entails 2.5K overhead.
*
* To have ddt automatically load filename.com, type
* "ddtf filename.com".
*
* This module uses two consecutive rst locations. These
* may be changed, but must not include rst 0 or rst 7.
*
*
* >>>>> Essential: Read the note at the end of this document
* before attempting to assemble DDTF.ASM.
*
*********************************************************************
* Instructions
*
* The following instructions are available in condensed form
* within the program itself, and may be displayed at run time.
* (The program sign-on message will tell how.)
*
* This program allows finding all occurences of any string of
* indefinite length. Install a model of the string at 5dh,
* including a prefix and suffix of a single character not
* used in the model itself. (For example, "/find this/".)
* You may do this with the I, A, and/or S commands of ddt.
*
* A listing of all occurrences of the desired string can now
* be displayed by typing GB (in the assembly version given).
* Additional searches can be conducted by simply typing G.
*
* Each occurence will be represented by a one-line, ddt-style
* dump. The string itself will begin in the middle of the line.
* (The width of the line can be set at assembly time.)
*
* All registers except the program counter are saved before
* the search and restored after the search.
*
* Note: If the search does not perform properly, check for
* 1) Missing prefix or suffix.
* 2) Using a suffix/prefix that also appears in the string.
*..................................................................
* Examples
*..................................................................
*
* Example: Find all instances of "disk".
*
* Procedure: -i/disk/
* -gb
*
*..................................................................
*
* Example: Find all copies of "JMP CDAB".
*
* Procedure: -a5d
* 005D nop
* 005E jmp cdab
* 0061 nop
* 0062 <cr>
* -gb
*
*..................................................................
*
* Example: Find all instances of hex 005638.
*
* Procedure: -s5d
* 005D ff
* 005E 00
* 005F 56
* 0060 38
* 0061 ff
* 0062 .
* -gb
*
*..................................................................
*
* Example: Print an interesting display
*
* Procedure: -i//
* -gb
*
*********************************************************************
*
* Advanced explanations and instructions.
* (For software hackers)
*
* Assume we are using the RST 1, 2 locations. Listing RST 1
* we see--
*
* 0008 CALL 0038
* 000B JMP nnnn
* 000E JPO 0000
* 0011 JNZ E000
*
* "JMP nnnn" is the entry of ddtf. In this example, the
* search is initiated by typing GB. Additional searches
* may then be conducted by simply typing G (as long as the
* program counter has not be explicitly changed with the
* XP command).
*
* "CALL 0038" is the exit to DDT from DDTF. Whenever DDT is
* invoked in this way, a simple G will activate the next
* command (in this case, an immediate reentry into DDTF).
*
* "JPO" gives the starting address of the block to be searched.
* "JNZ" gives the length of the block to be searched. The
* default values are 0000 and E000. These may be changed
* at assembly time; they may also be changed at run time
* by using the A command. (Changes are not normally needed.)
*
*..................................................................
*
* Example: Change length of search block to 200h.
*
* Procedure: -a11
* 0011 jnz 200
* 0014 <cr>
* -
*
*********************************************************************
*
* IMPORTANT: ASSEMBLY INSTRUCTIONS
*
* Note: As distributed, this source 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 most RCPM downloading systems.
* (LASM is a slight upgrade of LINKASM.)
*
* LASM's special feature is allowing separate source files to
* be assembled as one, if each source chains in the next via a
* LINK statement. (Eg., "LINK NEXT.ASM".) If linked to itself,
* a program can create two copies of itself, or of selected
* routines within itself. This provides a convenient method for
* creating a relocatable program without using a relocating
* assembler. DDTF.ASM uses this technique.
*
* 1) If LASM is available, DDTF.ASM will assemble without
* modification. The one exception is that if you change the
* name of the source from DDTF.ASM to something else, you must
* also change the "LINK DDTF.ASM" 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 DDTF.ASM with any assembler.
*
* a) PIP DDTF2.ASM=DDTF.ASM
*
* b) Erase the following lines at the end of DDTF2.ASM:
*
* IF NOT COPY1
* LINK DDTF
* ENDIF
*
* c) PIP DDTF2.ASM=DDTF2.ASM,DDTF2.ASM
*
* d) Assemble and use DDTF2.ASM instead of DDTF.ASM.
*
* (end of documentation)
**********************************************************************