/* ---------------------------------------------
Instructions for generating hexified .rep files
by Roy Stedman : 11FEB92
--------------------------------------------- */
linecut out1.tmp /* removes offset caused by negative times */
( only required if offset exists. )
mixer mixfile out2.tmp /* (un)scrambles columns as per mixfile */
( see instructions on generating a mixfile below. )
nihex out3.tmp /* converts addr & data to hex */
( this converts any 23bit field into an address (6 hex digits,
multiplied by 2), any 16 bit field into four hex digits and any
8 bit field into 2 hex digits. Fields are separated by spaces
in out2.tmp. Nihex tends to scramble the header information. )
tail +XX out3.tmp >out4.tmp /* optional, remove old (munged) header */
( set XX to remove junk and leave first line of binary stuff
usu: 5 < XX < 40. Some experimenting is usually required. )
cat newheader out4.tmp >output.rep /* optional, add new header */
( create newheader by taking the header from out2.tmp and
removing excess columns in address & data areas. )
rm out*.tmp /* clean up old files */
---------------------------------------
For the at4179a1 files:
mixfile : at.mix
newheader : ahexhead
linecut is required.
( all programs and files in ~roy/unix/reptohex )
---------------------------------------
TO CREATE A MIXFILE:
A mixfile defines which columns from an input file go where in
the output file from mixer. The format is one column per line, two
fields per line. Field one is any number of non-space characters, Field two
is separated by a space and consists of an integer value.
The first field of each line is ignored and usually filled with a label
for each column. Positive integers in field two define which column in the output
file that input column will go to. Negative integers remove columns entirely.
Not much error checking is done, so it is possible to put two input columns
into one output column, or even overflow the output line length.
(currently 250 characters)
input column 0 = line 0. input column n = line n
EXAMPLE 1:
ABCDEF
123456
789012
.
.
.
To reverse the order of the columns, remove column D, and put a space
between each column, the mixfile would look like this:
(blank lines are significant, be careful)
A 9
B 7
C 5
D -1
E 3
F 1 (a space would be inserted at column 0)
The easiest way to generate mixfiles is to take the header from the input
file with 'head', and then rotate it with rot. All that remains is to
number the columns. Rot replaces spaces in the input with periods on output
in order to make generating mixfiles easier.
EXAMPLE 2:
ABCDEF
0 1 2
12 4
111111
222222
333333
head -4 inputfile | rot >mixfile /* take the header and rotate it */
now mixfile is:
A01.
B.2.
C1..
D.4.
E2..
F...
... /* << you might need to remove the last line */
/* if output is double-spaced */
All that remains to be done is to add the column numbers to each line.