home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug132.arc / SUPERZAP.DOC < prev    next >
Text File  |  1979-12-31  |  17KB  |  346 lines

  1.         ____________________________________________________________________
  2.  
  3.         SUPERZAP  DISC SECTOR EDITOR   SUPERZAP.COM  (SPZ)
  4.         ____________________________________________________________________
  5.  
  6.  
  7.         SUPERZAP is a full screen interactive disk update utility, providing
  8.         many of the features found in DU.COM, one of the earlier PD sector
  9.         editors.  The program is menu driven, and little additional documen-
  10.         tation is required. The following notes consist of a functional
  11.         overview,  plus notes on features not documented in the menus.
  12.  
  13.         The version of SUPERZAP on this disc has been specilly configured
  14.         for the MicroBee keyboard and needs no setting up.
  15.  
  16.         The program is menu-driven.  These notes are for further information
  17.         and guidance.  The notes at the end of this document are supplied
  18.         by S J Younger and refer to his modifications for CP/M Plus.
  19.  
  20.         SYSTEM REQUIREMENTS
  21.  
  22.         SUPERZAP (SPZ) requires a Z80 - it may be possible to update  the
  23.         source for 8080 but extensive use is made of Z80 opcodes, and this
  24.         would be a lrge exercise.  Subroutines would be required to
  25.         simulate  LDR, LDDR,  and  CPIR,  to  say nothing of varieties of
  26.         shift,  rotate and load instructions.
  27.  
  28.         One or more disks may be used - SPZ determines if a selected disk
  29.         is defined in the BIOS before attempting to access it.
  30.  
  31.         The  terminal  used must support cursor addressing, clear screen,
  32.         and erase to end of line. At least an 80 by  24  display  is
  33.         required.
  34.  
  35.         FACILITIES
  36.  
  37.         SUPERZAP enables disk sector editing in HEX or ASCII, using  File
  38.         Relative  or  Track/Sector addressing.  In File Relative mode a
  39.         sorted  directory  listing is used to select the  file. In both
  40.         modes  forward  and backward browse is provided,  in  addition to
  41.         random record selection.  The displayed sector may be  copied to a
  42.         scratchpad  buffer,   or  exchanged  with  the  scratchpad. The
  43.         directory  list may be full (*.*) or selective,  eg  *.ASM and the
  44.         selection may be changed at any time.
  45.  
  46.         A file TYPE facility gives a paged, formatted display of any file.
  47.         Control characters are displayed as "." except  for  TAB  and
  48.         Carriage return/Line feed which are processed  normally.  COM files
  49.         are not formatted.
  50.  
  51.         The  SPZ command format may enter any operational mode directly:-
  52.  
  53.               SPZ                   enters SPZ with a *.* directory list.
  54.               SPZ d:                as above with d:*.* diectory list.
  55.               SPZ [d:]afn           as above with d:afn directory list.
  56.               SPZ [d:]ufn           enters SPZ in file relative mode,
  57.                                     using the specified file.
  58.               SPZ [d:]DSK:          enters SPZ in Track Sector addressing
  59.                                     mode on the specified drive.
  60.  
  61.         DIRECTORY LIST MODE.
  62.  
  63.         In directory list mode the cursor is positioned on the first
  64.         filename displayed.  The cursor can be moved LEFT, RIGHT, UP or
  65.         DOWN using Control keys.  A file is selected by typing a command
  66.         character against the required file name - "E" for file relative
  67.         editing, or "T" for the TYPE function.
  68.  
  69.         Up to 32 file names are listed. If there are more files, the
  70.         directory list may be paged forward and back.
  71.  
  72.         Other drives may be selected or the current disk changed.
  73.  
  74.         NOTE  - if the disk in the current drive is changed, the "change
  75.         disk" function  should be used to select the same drive again.
  76.         This provides a new directory list, and avoids CP/M making the
  77.         disk Read Only.
  78.  
  79.         Track/Sector addressing is selected from the directory list
  80.         display.
  81.  
  82.         The directory list selection may be changed - the  default  is
  83.         *.* unless set by the SPZ command.
  84.  
  85.         FILE RELATIVE MODE.
  86.  
  87.         In this mode the selected file is displayed in HEX and ASCII format
  88.         with  record number and file offset displayed. For .COM files the
  89.         address when loaded at 0100H is displayed.
  90.  
  91.         The record displayed may be selected by browsing forward and back,
  92.         locating the first or last record, or by setting a record number
  93.         (in HEX).  When setting a record number, Hex digit are entered in
  94.         "calculator style" - new digits are entered on the right while the
  95.         number moves left.  Backspace deletes the last digit entered, and
  96.         Escape restores the original number. These features are common to
  97.         all number entries in SPZ. The selected record is read when RETURN
  98.         is pressed. If it is not found, the previous record number will be
  99.         restored.
  100.  
  101.         The displayed record may be changed by typing "C". The cursor
  102.         is positioned on the first hex digit, and is moved using the
  103.         same control keys as are used in the directory list mode. Any
  104.         valid hex digit may be typed to alter the record. Ctrl A  key
  105.         moves the cursor to it corresponding location in the ASCII
  106.         display, allowing character strings to be easily changed. Another
  107.         Ctrl A returns the cursor to the HEX display area.
  108.  
  109.         Two control codes are available to stop editing  the record - one
  110.         saves the changes and rewrites the  record  to  disk, the other
  111.         restores the record to its original contents.
  112.  
  113.         Return to directory list mode is made by typing "L".
  114.  
  115.         TYPE FILE
  116.  
  117.         Files are TYPEd with up to 72 characters per line, 18 lines per
  118.         page.  Except for .COM files, Carriage  return/Line  feed  codes are
  119.         honoured, and Tabs are expanded. All  other  control  characters are
  120.         displayed as  "."  to prevent unwanted terminal control functions.
  121.  
  122.         Forward and backward paging operations are provided, including
  123.         return to top of file.  Following paging, the highest page displayed
  124.         can be restored.
  125.  
  126.         DIRECTORY LIST SELECTION.
  127.  
  128.         The ambiguous file name used for the directory list may be edited by
  129.         typing "M" in the directory list  mode dislay. The existing  file
  130.         NAME and TYPE may be overwritten or edited using INSERT and
  131.         DELETE control keys.  Only those characters defined as legal in
  132.         the CPM documentation are permitted.
  133.  
  134.         If  "*"  is  typed at any point in the  NAME or TYPE, the
  135.         remainder  of the field will be filled with "?". If a SPACE is
  136.         typed the remainder of the field will be blanked out. Period also
  137.         has  this  effect if used in the  NAME  field  -  an  ambiguous
  138.         filename may thus be entered in the normal fashion.
  139.  
  140.         The TAB key switches between editing the NAME and TYPE.
  141.  
  142.         The ESCAPE key restores the original selection, RETURN produces
  143.         a new direcory list.
  144.  
  145.         NOTE  - insert and delete affect only the field being
  146.         edited, - characters do not wrap between name and type.
  147.  
  148.  
  149.         TRACK/SECTOR ADDRESSING
  150.  
  151.         This mode is entered by typing "S" in directory list mode. The
  152.         facilities provided here are similar to File Relative mode, but
  153.         sectors  are  selected  by setting (or browsing back and forward)
  154.         track and sector numbers.  The allocation  block number is also
  155.         displayed and may be set.  When a block number is set, the first
  156.         sector of that block is displayed. The record displayed may be
  157.         altered  in the same manner as  File Relative mode.  The
  158.         scratchpad  facility is also available in this mode.  Note that
  159.         sectors saved in one mode are available for exchange in the other
  160.         mode.
  161.  
  162.         INSTALLATION
  163.  
  164.         SPZ uses the following terminal facilities -
  165.  
  166.                   Cursor Addressing
  167.                   Clar Screen
  168.                   Erase to end of line.
  169.  
  170.         The  screen control strings start at 180h and each is eight bytes
  171.         long including the length prefix:
  172.  
  173.               180-187   Clear screen and home cursor
  174.               188-18F   Clear to end of line
  175.               190-197   Set inverse video
  176.               198-19F   Set normal video
  177.               1A0-1A7   Cursor-positioning prefix
  178.               1A8-1AF   String sent to screen BETWEEN cursor coordinates
  179.               1B0-1B7   String sent to screen at end of cursor-positioning
  180.  
  181.         The  next  few  bytes relate to cursor positioning. Rows are
  182.         numbered  0 to 23 from top down, columns are numbered  0-79
  183.         from left to right.
  184.  
  185.               1B8                   1  if  row    coordinate  sent    before
  186.                                     column  coordinate(usual case) or  0  if
  187.                                     row before  column.   WARNING:   Do  not
  188.                                     set this location to any value except  0
  189.                                     or 1!
  190.  
  191.               1B9                   "Offset" to add to row (usually 20h)
  192.  
  193.               1BA                   "Offset" to add to column (usually 20h)
  194.  
  195.               1BB                   Non-zero  if  coordinates  are  sent  as
  196.                                     single-byte  binary values  (usual case)
  197.                                     or  zero  if  coordinates  are  sent  as
  198.                                     multi-byte decimal  numbers  (e.g.  ANSI
  199.                                     terminals).
  200.  
  201.         Finally, if you are using a Hazeltine terminal  which  doesn't  like
  202.         the tilde character:
  203.  
  204.               1BC                   Set to 7Dh for Hazeltine terminals,  7Eh
  205.                                     for others.
  206.  
  207.         If you are using Z8E to configure the object file then the symbol
  208.         names for the above locations can be loaded from the .PRN file:
  209.  
  210.               z8e zap.com zap.prn
  211.  
  212.         You can the use the following names with the E command:
  213.  
  214.               clsstr    Clear screen and home cursor
  215.               cllstr    Clear to end of current line
  216.               vinv      Set inverse video
  217.               vnorm     Set normal video
  218.               cppref    Cursor positioning prefix
  219.               cpmid     Cursor positioning infix
  220.               cpend     Cursor positioning suffix
  221.               row1st    Row-before-column flag (remember, set to 0 or 1
  222.                         ONLY)
  223.               rowoff    Offset to add to row
  224.               coloff    Offset to add to column
  225.               cpbin     Binary/ASCII coordinate flag
  226.               maxasc    Higest displayable character
  227.  
  228.         When you select track/sector mode,  the deault track number used to
  229.         be 0 but I changed it so that  the default  is  now  the  directory
  230.         track.   It  is  not  very often you want to look at   the   system
  231.         tracks with a disk eitor.   More frequently you want  to    recover
  232.         files by fiddling the directory.  Besides, on a  "split" hard  disk
  233.         where the splitting is done by cylinder rather than  by  platter or
  234.         surface, there may not even be a track 0 on the selected disk.
  235.  
  236.         In  sector  displays,  characters with the high bit set   are   now
  237.         displayed in inverse video rather than as dots.    This  simplifies
  238.         reading directory sectors where files have attribute bits set.
  239.  
  240.         I put an .XLIST directive at the start and a .LIST directive at the
  241.         end of the source file  to generate  a  .PRN file suitable  for use
  242.         with the Z8E  debug  tool (SIG/M vol 239).
  243.  
  244.          If anyone wants to contact John, his address is:-
  245.  
  246.                        John Hastwell-Batten,
  247.                        SYSOP,
  248.                        Tesseract RCPM+,
  249.                        P.O. Box 242,
  250.                        Dural, NSW 2158,
  251.                        AUSTRALIA
  252.  
  253.         Now to the real goodies in  3.4  -  more  object  code  patches  for
  254.         control commands.
  255.  
  256.  
  257.  
  258.               1BD                   The "flag" character used  in  directory
  259.                                     list
  260.               1BE                   The number of command  codes  following.
  261.                                     Do NOT change.
  262.               1BF                   Cursor Left control code
  263.               1C0                   Cursor Right
  264.               1C1                   Cursor Up
  265.               1C2                   Cursor Down
  266.               1C3                   Cursor Tab
  267.               1C4                   ESCape
  268.               1C5                   Insert mode in file name edit
  269.               1C6                   Character delete in file name edit
  270.               1C7                   Quit - applies to sector and string edit
  271.               1C8                   End Edit.
  272.  
  273.        Once these codes are patched in - using SPZ of  course,  the  panels
  274.        are displayed with the new values.
  275.  
  276.                                  Thats it Folks -
  277.                                            Willie Davidson.
  278.  
  279.  
  280.                  Installation for CP/M PLUS - S.J. Younger
  281.  
  282.               This version (now 3.7) had been modified to  run   under  CP/M
  283.         Plus before I became aware of the Hastwell-Batten version,  and  was
  284.         written on an Amstrad PCW.  Having had the  opportunity  to  examine
  285.         version 3.4, I have attempted to retain th best features from  both
  286.         sources.  Thus Michael Hendry's CP/M Plus implementation  beats  the
  287.         JHB system in that the latter has un-necessary calls to BDOS 50.   I
  288.         have taken in all the object code patchable features and the inverse
  289.         video feature except that it has been eliminated from 'Type' mode by
  290.         the simple expedient of clobbering bit 7 first.  This makes WordStar
  291.         document mode files  fully  legible  without  being  spattered  with
  292.         inverse video characters.
  293.  
  294.               It should be mentioned that all the routines in  this  program
  295.         controlling keyboard input can be aborted by pressing "ESC" ("EXIT")
  296.         and that partial deletions of the input are achieved by pressing the
  297.         'Cursor Left' arrow.
  298.  
  299.               A 'Select to Page No.' routine has been introduced into    the
  300.         Type routine.  The input is  decimal.    Since   the    relationship
  301.         between  page of text and sector numbers is not   predictable    the
  302.         only  way  to  avoid  ending  up  totally  knotted  is  to      read
  303.         sequentially  down or up the file.  The routine can  be  stopped  at
  304.         any time by pressing the STOP button (Control-C).  Large  files  can
  305.         be scanned more quickly if they  are first transferred onto  the  M:
  306.         drive.  When working under CP/M Plus the program acquires  knowledge
  307.         of the screen size and if  it  finds  that  it's  a  90x32  it  then
  308.         proceeds to use all of it in 'Type' Mode.
  309.  
  310.               Due to it's strict attention to format LocoScript  takes  some
  311.         time to display it's documents.  This can make the use of LocoScript
  312.         for selecting and clearing out unwanted files  a  tedious  business.
  313.         SUPERZAP can  quickly  make an intelligible  display  of  LocoScript
  314.         files.  To be a useful  file cleaner in this context it  needed  the
  315.         opportunity to  select  user number and also erase  files  from  the
  316.         Directory  mode.    The  user number follows the convention of   the
  317.         CCP,  namely  I/O  is  decimal and user zero is not displayed.   The
  318.         user number  is  not  re-set other than explicitly when the drive is
  319.         changed.
  320.  
  321.               The Erase File feature deletes the file at the curso position
  322.         using CP/M's  erasure routines,   which  prefix the directory entry
  323.         (entries) with E5h.  If  a  file  is  erasd  in  error  it  can  be
  324.         resurrected by re-setting the directory entry  (or entries  if  the
  325.         file is greater than 16k) by  switching  to  the  'Track  /  Sector
  326.         Addressing Mode' and changing the directory entry back to 0n  where
  327.         n is User No.
  328.  
  329.         TAKE GREAT CARE NOT TO DWELL ON THE 'K' FOR ERASE BUTTON SINCE  THIS
  330.         MAY DELETE MORE THAT ONE FILE!
  331.  
  332.               In this version of Superzap the 'Find  a  String'  routine in
  333.         Edit Mode has been re-introduced with input either in ASCII  or HEX
  334.         format.  The search is precise to case - e.g. a search for the word
  335.         'Function' will be unsuccessful  with  the  input  'function'.   If
  336.         control  characters  are  included in  an  ASCII  string  they  are
  337.         displayed.  Thus a press ofthe 'TAB' key  will  be  represented  on
  338.         screen as '^I'.  The maximum length of string that can  be  entered
  339.         for the search is 32 characters.  Searches will run more quickly if
  340.         the file is first put onto the 'M:' drive.
  341.  
  342.  
  343.         S.J. Younger     February 1988
  344.  
  345. es will run more quickly if
  346.         the file is first put onto t