OEDIT




The OEDIT program is for  looking at and modifying Alto files  and Alto
Trident files, in  octal and other formats.   Call it with OEDIT  f1 f2
...  where the f's are the names of the files you want to look  at (you
are limited to  about 4 Trident files,  15 or 20 Diablo  files).  OEDIT
will display the contents of  the corresponding words of all  the files
on the same line, with wrap-around printing if they don't all fit.

Each filename can be optionally preceded by a disk  drive specification
as in the following examples: "tp5:name.ext" means the  file "name.ext"
on Trident  drive number  5, while  "DP1:name.ext" means  "name.ext" on
Diablo drive 1.  The default is "dp0:", which means the standard system
disk.  Each T-300 disk has  up to three distinct Alto file  systems; if
Trident  drive  2 were  a  T-300  drive, these  file  systems  would be
referred to as "tp2:", "tp402:", and "tp1002:" (a 2 in the  right byte,
and either 0, 1, or 2 in the left byte).

The files are initially  opened with read-only access.  The  second and
subsequent files can  only be read and  displayed by OEDIT.   But OEDIT
has commands that write into the first of the specified files.   If you
want to be able to alter the first file, use the /W switch on the OEDIT
command.  Otherwise, OEDIT will have to reopen the first file to obtain
read/write access the first time  that you try to store into  it; OEDIT
will request confirmation before reopening the first file.

OEDIT output usually goes to the Alto screen only; the font used is the
one  stored in  the file  named "dp0:gacha10.al"  if that  file exists,
otherwise the standard system font (fixed pitch looks better).   If you
would like a permanent record of  your OEDIT session, use the /F  or /L
switch on the  OEDIT command, which will  copy the session on  the file
"dp0:Oedit.Lst".  Note that this provides  a way to get octal  dumps of
Alto files.

When it starts, the program  computes the lengths (in bytes  and words)
of all of the specified  files.  For large files this can  take upwards
of 15 seconds (if the file system hints prove to be wrong), so don't be
alarmed by the delay.

After typing the lengths, OEDIT waits for commands:
n/      show location n of each file in the standard modes
lf      show the next location of each file
↑       show the previous location of each file
cr      show the current location again
tab     show the location pointed to by the last displayed location
n!      show locations n to n+40b of each file
>       show the next 40b locations of each file
<       show the previous 40b locations of each file
nV      display the value n itself in both octal and decimal
nF      beginning at current location in the first file,
        find a word containing the value n, show it and its address
Q       quit



                             ------------
                   Copyright Xerox Corporation 1980


OEDIT                      November 23, 1980                          2




The lf, ↑, tab, <, >, and cr commands can be preceded by a number which
is written into the current  location of the first file.   Control-W is
synonymous with ↑, and control-V is synonymous with V.

All numbers can be input  in a variety of formats, called  modes.  Each
mode is referred to be a one-letter code (either upper or  lower case),
as described in the following table:

O           a double-word octal number
W           a single-word octal number
H           an octal byte
A,S, or C   an ASCII byte
X           a hexadecimal byte
E           an EBCDIC byte
D           a double-word decimal number
N           a decimal byte

When inputting  a number, you  announce the intended  mode by  giving a
mode letter followed by a colon; the default is "O:".  Thus, "O:354" or
"o:354"  or  "354" inputs  the  integer 354b,  while  "C:A"  inputs the
character code for  upper case A in  ASCII.  The register that  you are
loading  with this  input is  a double  word, 32  bit integer;  this is
necessary  since  file addresses  may  exceed 16  bits  in  length.  In
situations where only  16 bits make sense,  such as specifying  the new
contents of the current word  of the first file, the  least significant
16 bits of  the input register are  used.  Each input mode  specifies a
new chunk of data to be shifted in at the right of the  input register.
Input modes that describe only a byte of data shift this new byte in at
the right, while  modes that describe a  double-word of data  reset the
entire register.  Separate multiple  chunks of input with  spaces.  For
example,  "O:40502", "40502",  "h:101 h:102",  "C:A c:B",  "x:41 x:42",
"x:41 c:B",  and "d:16706"  are all  legal ways  to describe  the input
value 40502b (a one-word quantity).

When inputting  a number in  octal, decimal, or  hexadecimal, preceding
the  digits with  a  minus sign  will  take the  two's  complement.  In
particular, "-1"  is an easy  way to  input a number  that has  all one
bits.  Thus, to give another example, "O:37777600000", "W:-1  W:0", and
"h:-1  x:FF  w:0"  are  all ways  to  specify  a  double  word quantity
consisting of 16 ones followed by 16 zeros.

When inputting  a number in  octal, decimal, or  hexadecimal, preceding
the  digits with  a  minus sign  will  take the  two's  complement.  In
particular, "-1"  is an easy  way to  input a number  that has  all one
bits.

All addresses are word addresses (even though the file lengths are also
shown in  bytes.) Furthermore, addresses  are only displayed  in octal.
The data words in the files can be displayed in modes analogous  to the
modes listed above:

O           displays a full-word octal value
H           two octal bytes
A,S, or C   two ASCII bytes
X           two hexadecimal bytes
E           two EBCDIC bytes
D           a full-word signed decimal value
N           two decimal bytes


OEDIT                      November 23, 1980                          3




The control character correponding to each output mode is a  command to
type out the current location  in that mode.  If the  control character
is preceded by a number, it means open that location and display  it in
the specified mode.  When no particular mode is spcified, OEDIT  uses a
set of modes called the standard modes.  Unless you say  otherwise, the
standard mode set  is OHA.  You  may add modes  to the standard  set by
specifying them as global switches  on the OEDIT command; you  can also
remove a  mode from the  standard set by  preceding that letter  with a
minus sign  in the  list of global  switches.  Thus,  if one  wanted to
display the  files in  hexadecimal, ASCII, and  EBCDIC only,  one would
type "OEDIT/-O-HXE filename".

A note on EBCDIC: the  underline character in EBCDIC is  represented by
left-arrow  in ASCII;  the  cents symbol  in EBCDIC  is  represented by
backslash in ASCII; and the hook symbol in EBCDIC (logical negation) is
represented by  up-arrow in ASCII.   All unassigned character  codes in
EBCDIC are represeted by tilde in ASCII.

It is  often useful  to be  able to scan  through a  portion of  a file
looking at every d'th word, that is, at a set of addresses that form an
arithmetic progression, and either searching for a particular  value in
a particular  field, or  writing a particular  value into  a particular
field.  This capacity  exists in OEDIT by  means of a  special command,
invoked by typing "F" or  "f" without first giving a number.   You will
first be prompted to input a starting address, ending address,  and the
parameter d  (the common  difference of  the arithmetic  progression; d
must be positive).  Then, input  a mask that specifies by its  one bits
the relevant  field.  Next,  say S  for Searching  or R  for Replacing.
Finally, give the new data, with the bits already in the correct field;
data bits that are obscured by the mask don't matter.  Each number that
you are  inputting during  this process  can be  in any  mode; separate
multiple bytes with spaces, and end each numeric argument with carriage
return or escape.