home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug132.arc
/
SUPERZAP.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
17KB
|
346 lines
____________________________________________________________________
SUPERZAP DISC SECTOR EDITOR SUPERZAP.COM (SPZ)
____________________________________________________________________
SUPERZAP is a full screen interactive disk update utility, providing
many of the features found in DU.COM, one of the earlier PD sector
editors. The program is menu driven, and little additional documen-
tation is required. The following notes consist of a functional
overview, plus notes on features not documented in the menus.
The version of SUPERZAP on this disc has been specilly configured
for the MicroBee keyboard and needs no setting up.
The program is menu-driven. These notes are for further information
and guidance. The notes at the end of this document are supplied
by S J Younger and refer to his modifications for CP/M Plus.
SYSTEM REQUIREMENTS
SUPERZAP (SPZ) requires a Z80 - it may be possible to update the
source for 8080 but extensive use is made of Z80 opcodes, and this
would be a lrge exercise. Subroutines would be required to
simulate LDR, LDDR, and CPIR, to say nothing of varieties of
shift, rotate and load instructions.
One or more disks may be used - SPZ determines if a selected disk
is defined in the BIOS before attempting to access it.
The terminal used must support cursor addressing, clear screen,
and erase to end of line. At least an 80 by 24 display is
required.
FACILITIES
SUPERZAP enables disk sector editing in HEX or ASCII, using File
Relative or Track/Sector addressing. In File Relative mode a
sorted directory listing is used to select the file. In both
modes forward and backward browse is provided, in addition to
random record selection. The displayed sector may be copied to a
scratchpad buffer, or exchanged with the scratchpad. The
directory list may be full (*.*) or selective, eg *.ASM and the
selection may be changed at any time.
A file TYPE facility gives a paged, formatted display of any file.
Control characters are displayed as "." except for TAB and
Carriage return/Line feed which are processed normally. COM files
are not formatted.
The SPZ command format may enter any operational mode directly:-
SPZ enters SPZ with a *.* directory list.
SPZ d: as above with d:*.* diectory list.
SPZ [d:]afn as above with d:afn directory list.
SPZ [d:]ufn enters SPZ in file relative mode,
using the specified file.
SPZ [d:]DSK: enters SPZ in Track Sector addressing
mode on the specified drive.
DIRECTORY LIST MODE.
In directory list mode the cursor is positioned on the first
filename displayed. The cursor can be moved LEFT, RIGHT, UP or
DOWN using Control keys. A file is selected by typing a command
character against the required file name - "E" for file relative
editing, or "T" for the TYPE function.
Up to 32 file names are listed. If there are more files, the
directory list may be paged forward and back.
Other drives may be selected or the current disk changed.
NOTE - if the disk in the current drive is changed, the "change
disk" function should be used to select the same drive again.
This provides a new directory list, and avoids CP/M making the
disk Read Only.
Track/Sector addressing is selected from the directory list
display.
The directory list selection may be changed - the default is
*.* unless set by the SPZ command.
FILE RELATIVE MODE.
In this mode the selected file is displayed in HEX and ASCII format
with record number and file offset displayed. For .COM files the
address when loaded at 0100H is displayed.
The record displayed may be selected by browsing forward and back,
locating the first or last record, or by setting a record number
(in HEX). When setting a record number, Hex digit are entered in
"calculator style" - new digits are entered on the right while the
number moves left. Backspace deletes the last digit entered, and
Escape restores the original number. These features are common to
all number entries in SPZ. The selected record is read when RETURN
is pressed. If it is not found, the previous record number will be
restored.
The displayed record may be changed by typing "C". The cursor
is positioned on the first hex digit, and is moved using the
same control keys as are used in the directory list mode. Any
valid hex digit may be typed to alter the record. Ctrl A key
moves the cursor to it corresponding location in the ASCII
display, allowing character strings to be easily changed. Another
Ctrl A returns the cursor to the HEX display area.
Two control codes are available to stop editing the record - one
saves the changes and rewrites the record to disk, the other
restores the record to its original contents.
Return to directory list mode is made by typing "L".
TYPE FILE
Files are TYPEd with up to 72 characters per line, 18 lines per
page. Except for .COM files, Carriage return/Line feed codes are
honoured, and Tabs are expanded. All other control characters are
displayed as "." to prevent unwanted terminal control functions.
Forward and backward paging operations are provided, including
return to top of file. Following paging, the highest page displayed
can be restored.
DIRECTORY LIST SELECTION.
The ambiguous file name used for the directory list may be edited by
typing "M" in the directory list mode dislay. The existing file
NAME and TYPE may be overwritten or edited using INSERT and
DELETE control keys. Only those characters defined as legal in
the CPM documentation are permitted.
If "*" is typed at any point in the NAME or TYPE, the
remainder of the field will be filled with "?". If a SPACE is
typed the remainder of the field will be blanked out. Period also
has this effect if used in the NAME field - an ambiguous
filename may thus be entered in the normal fashion.
The TAB key switches between editing the NAME and TYPE.
The ESCAPE key restores the original selection, RETURN produces
a new direcory list.
NOTE - insert and delete affect only the field being
edited, - characters do not wrap between name and type.
TRACK/SECTOR ADDRESSING
This mode is entered by typing "S" in directory list mode. The
facilities provided here are similar to File Relative mode, but
sectors are selected by setting (or browsing back and forward)
track and sector numbers. The allocation block number is also
displayed and may be set. When a block number is set, the first
sector of that block is displayed. The record displayed may be
altered in the same manner as File Relative mode. The
scratchpad facility is also available in this mode. Note that
sectors saved in one mode are available for exchange in the other
mode.
INSTALLATION
SPZ uses the following terminal facilities -
Cursor Addressing
Clar Screen
Erase to end of line.
The screen control strings start at 180h and each is eight bytes
long including the length prefix:
180-187 Clear screen and home cursor
188-18F Clear to end of line
190-197 Set inverse video
198-19F Set normal video
1A0-1A7 Cursor-positioning prefix
1A8-1AF String sent to screen BETWEEN cursor coordinates
1B0-1B7 String sent to screen at end of cursor-positioning
The next few bytes relate to cursor positioning. Rows are
numbered 0 to 23 from top down, columns are numbered 0-79
from left to right.
1B8 1 if row coordinate sent before
column coordinate(usual case) or 0 if
row before column. WARNING: Do not
set this location to any value except 0
or 1!
1B9 "Offset" to add to row (usually 20h)
1BA "Offset" to add to column (usually 20h)
1BB Non-zero if coordinates are sent as
single-byte binary values (usual case)
or zero if coordinates are sent as
multi-byte decimal numbers (e.g. ANSI
terminals).
Finally, if you are using a Hazeltine terminal which doesn't like
the tilde character:
1BC Set to 7Dh for Hazeltine terminals, 7Eh
for others.
If you are using Z8E to configure the object file then the symbol
names for the above locations can be loaded from the .PRN file:
z8e zap.com zap.prn
You can the use the following names with the E command:
clsstr Clear screen and home cursor
cllstr Clear to end of current line
vinv Set inverse video
vnorm Set normal video
cppref Cursor positioning prefix
cpmid Cursor positioning infix
cpend Cursor positioning suffix
row1st Row-before-column flag (remember, set to 0 or 1
ONLY)
rowoff Offset to add to row
coloff Offset to add to column
cpbin Binary/ASCII coordinate flag
maxasc Higest displayable character
When you select track/sector mode, the deault track number used to
be 0 but I changed it so that the default is now the directory
track. It is not very often you want to look at the system
tracks with a disk eitor. More frequently you want to recover
files by fiddling the directory. Besides, on a "split" hard disk
where the splitting is done by cylinder rather than by platter or
surface, there may not even be a track 0 on the selected disk.
In sector displays, characters with the high bit set are now
displayed in inverse video rather than as dots. This simplifies
reading directory sectors where files have attribute bits set.
I put an .XLIST directive at the start and a .LIST directive at the
end of the source file to generate a .PRN file suitable for use
with the Z8E debug tool (SIG/M vol 239).
If anyone wants to contact John, his address is:-
John Hastwell-Batten,
SYSOP,
Tesseract RCPM+,
P.O. Box 242,
Dural, NSW 2158,
AUSTRALIA
Now to the real goodies in 3.4 - more object code patches for
control commands.
1BD The "flag" character used in directory
list
1BE The number of command codes following.
Do NOT change.
1BF Cursor Left control code
1C0 Cursor Right
1C1 Cursor Up
1C2 Cursor Down
1C3 Cursor Tab
1C4 ESCape
1C5 Insert mode in file name edit
1C6 Character delete in file name edit
1C7 Quit - applies to sector and string edit
1C8 End Edit.
Once these codes are patched in - using SPZ of course, the panels
are displayed with the new values.
Thats it Folks -
Willie Davidson.
Installation for CP/M PLUS - S.J. Younger
This version (now 3.7) had been modified to run under CP/M
Plus before I became aware of the Hastwell-Batten version, and was
written on an Amstrad PCW. Having had the opportunity to examine
version 3.4, I have attempted to retain th best features from both
sources. Thus Michael Hendry's CP/M Plus implementation beats the
JHB system in that the latter has un-necessary calls to BDOS 50. I
have taken in all the object code patchable features and the inverse
video feature except that it has been eliminated from 'Type' mode by
the simple expedient of clobbering bit 7 first. This makes WordStar
document mode files fully legible without being spattered with
inverse video characters.
It should be mentioned that all the routines in this program
controlling keyboard input can be aborted by pressing "ESC" ("EXIT")
and that partial deletions of the input are achieved by pressing the
'Cursor Left' arrow.
A 'Select to Page No.' routine has been introduced into the
Type routine. The input is decimal. Since the relationship
between page of text and sector numbers is not predictable the
only way to avoid ending up totally knotted is to read
sequentially down or up the file. The routine can be stopped at
any time by pressing the STOP button (Control-C). Large files can
be scanned more quickly if they are first transferred onto the M:
drive. When working under CP/M Plus the program acquires knowledge
of the screen size and if it finds that it's a 90x32 it then
proceeds to use all of it in 'Type' Mode.
Due to it's strict attention to format LocoScript takes some
time to display it's documents. This can make the use of LocoScript
for selecting and clearing out unwanted files a tedious business.
SUPERZAP can quickly make an intelligible display of LocoScript
files. To be a useful file cleaner in this context it needed the
opportunity to select user number and also erase files from the
Directory mode. The user number follows the convention of the
CCP, namely I/O is decimal and user zero is not displayed. The
user number is not re-set other than explicitly when the drive is
changed.
The Erase File feature deletes the file at the curso position
using CP/M's erasure routines, which prefix the directory entry
(entries) with E5h. If a file is erasd in error it can be
resurrected by re-setting the directory entry (or entries if the
file is greater than 16k) by switching to the 'Track / Sector
Addressing Mode' and changing the directory entry back to 0n where
n is User No.
TAKE GREAT CARE NOT TO DWELL ON THE 'K' FOR ERASE BUTTON SINCE THIS
MAY DELETE MORE THAT ONE FILE!
In this version of Superzap the 'Find a String' routine in
Edit Mode has been re-introduced with input either in ASCII or HEX
format. The search is precise to case - e.g. a search for the word
'Function' will be unsuccessful with the input 'function'. If
control characters are included in an ASCII string they are
displayed. Thus a press ofthe 'TAB' key will be represented on
screen as '^I'. The maximum length of string that can be entered
for the search is 32 characters. Searches will run more quickly if
the file is first put onto the 'M:' drive.
S.J. Younger February 1988
es will run more quickly if
the file is first put onto t