Msg: 6395 *Conference*

03-28-96 14:49:49

From: RON WIESEN

To : ANTHONY FEST

Subj: REPLY TO MSG #6381 (FIXING RAMPAC)

I looked at the Rampac documentation.  What I've told you to date is correct
with one exception.  In the Directory (sector 0) the accounting for the other
sectors is in groups of two bytes per sector, rather than groups of four.  So
only half of the bytes in the directory sector (512 of 1,024) are used.
 
There's two clarifications I'll mention about the Rampac documentation, dated
June 23,1992, page 7, last paragraph.
 
1.  The first sentance refers to "contents of this particular file".  The file
is a Command file (.CO) type but the "contents" ignores the 6-byte header which
preceeds the image portion of every Command file type.  Rather than say the
contents "start after the 16th byte", it would be less confusing to say content
starts after the 10th byte regardless of file type.  Where a Command file is
loaded into the file region memory of the Model 100 (from Rampac or elsewhere),
the 6-byte header is present along with the image portion.  Where you LOADM,
RUNM, or otherwise invoke (select from Menu) a Command file, the Model 100
makes a copy of only the image portion (6 bytes less than the entire file
length) of the file in the HIMEM region of memory.  HIMEM is where command
images can execute.
 
RAM100.CO is a good example.  The length of this file is 1406 bytes which break
down as follows:
 
Header - Top: 2 bytes, low/high order Header - Len: 2 bytes, low/high order 
Header - Exe: 2 bytes, low/high order Image: 1400 bytes
 
Where RAM100.CO is invoked, the Model 100 reads the 6-byte header to determine:
where in HIMEM a copy of the image is to be made (Top); the length of the image
(Len); and where in HIMEM execution is to start (Exe).  These 16-bit values in
the header are: 61558 for Top; 1400 for Len; and 61558 for Exe.  In
conventional practice the total memory required to invoke Command files is 6
(header) plus the image length for the requirement on the file region of
memory, and the image length is involved a second time for the requirement on
the HIMEM region of memory.  In other words, two times the image length plus 6
is the total memory requirement.  Rather than pay a double price in memory
requirement, there are unconventional ways to reduce the operational
requirement to only the image length in the HIMEM region and simply have no
Command file in the file region of memory (and no file name slot occupied on
the Menu).  But that's another subject.
 
2.  The second sentance refers to "bytes 9 and 10".  It would be less confusing
to say "the 9th and 10th bytes" which in index terminology are referred to as
bytes 8 and 9.  As an index, the first item (byte, word, sector, etc.) is
numbered as 0.
 
This sentance confirms what I said in the prior message.  The format for a
"first sector" has ten overhead bytes.  Byte 8 and 9 are File_length and their
arrangement is low order (byte 8) followed by high order (byte 9).
 
Note that File_length within a "first sector" of a Rampac is the entire length
of a file as it would be where it's loaded into the file region memory of the
Model 100.  Don't confuse it with "Len" in the header of a Command file.
Again, RAM100.CO is a good example.  The File_length of this file (low=126
high=5) is 1406 bytes and it is a Command file, so bytes 2 and 3 of the Command
file (Len) express a 16-bit image length (low=120 high=5) of 1400 bytes.  Note
that 5 times 256 plus 126 equals 1406 for File_length in Rampac and that 5
times 256 plus 120 equals 1400 for Len in the header of the RAM100.CO Command
file.
 
'Nuff said regarding Rampac documentation Tony.  If you need more help fixing
your Rampac contact me via the Conference.  If you want to pursue use of
RAM100.CO, or other copyrighted Command files (DOS100.CO, etc.), without paying
a double price in memory requirement contact me in Private E-Mail (I won't
publically discuss how you can legally modify copyrighted software that you
have purchased).