Msg: 3538 *Conference*

12-07-92 19:00:28

From: RICHARD HANSON

To : RICK HENDRIX

Subj: REPLY TO MSG #3537 (HELP WITH FILE TYPES)

Rick: A .CO file is a machine language file.  In other words, it's a file
written in the language of the processor, i.e., Intel 8085, in the case of our
Model T's.  Machine language programs (m/l) are really neat, but can be a pain
in the ... it you don't handle them properly.  M/L files run much, much faster
then .BA files (tokenized BASIC files) because the M/L file does not need to be
interpretered, line by line, to run.  The processor simply follow the commands
in the M/L file, directly.  Also, M/L programming is much closer to the
processor then .BA programming, giving the program much more control over the
functions of the processor; thus more "trick" are available to the M/L
programmer.
 
HANDLING THE .CO FILE IN A MODEL T
 
M/L files (.CO) run (execute) from one area in memory (RAM), only.  A .CO file
appearing in the menu as filename.CO is actually stored in a separate area of
memory then its running version; a duplicate copy.  Thus, when you run a .CO
file that you see in the menu, that menu-copy is copied to this special place
and executed from there, i.e., two copies taking twice as much room.  Some
crafty M/L programmers discovered that there are other places in RAM that they
could "trick" the processor into runnning .CO file from.  One of these areas is
the LCD buffer; a place in RAM used to drive the screen (LCD = liquid crystal
display).
 
The discussion, thus far, is sort of technical.  Let's explore facts a users
needs to know to actually use .CO files.
 
1) Each .CO file contains 3 addresses: Top, End, Exe.  It is important to
document these addresses for each .CO file you wich to play with.  Documenting
these three numbers is very easy.  Assuming the .CO file is visible in your
menu, go into BASIC and issue the following commands:
 
        CLEAR0,MAXRAM
        LOADM"filename.co"
 
The first command simply clears that "special place" of any .CO file residing
there.  We don't want cold starts, do we?  Okay, remember that command.  The
second command simply attemps to load the .CO file named filename into that
area.  Of course, it can't because we have not "opened" enough RAM for its
loading, so it will simply present you with those three numbers, then issue the
error code, OM? Error.  This means Out of Memory but is nothing you need to
worry about.  The thurd step is to write those numbers down, keeping an eye on
the "Top:" number.  That's the one you need to reference whenever you wish to
run this particular .CO file.  Lastly, to run your .CO file, do the following:
 
        CLEAR256,topnumber
        LOADM"filename.co"
        MENU
        ...now place your cursor over your .CO file and hit <enter>
 
Now that we've come this far, let's explore the use of more than one .CO file
at one time.  There are two ways to run two ore more .CO files in the same
machine, i.e., to run one, then the other, then another or back to the first.
 
1) For each .CO file, go into BASIC and issue the commands CLEAR0,MAXRAM and
CLEAR256,topnumber.  Return to the menu and run that .CO file.  To run the
second one, go back into BASIC and reissue the commands, using the second .CO
file's topnumber in place of the first .CO file's topnumber.  In this way, you
will clear out the old, then open up the correct space for the loading and
running of the new .CO file.  Keep track of all this and you will probably
never experience a .CO file conflict, leading to a cold start of your Model T.
 
Note: You will find several multiple .CO file handling programs in our
wonderful online library.  For those reading this thread, who do not yet have
library access, you are REALLY MISSING OUT!!!  And for just $12 a year, too.
Heck, you've probably paid more for a hair cut.  Sorry about that... just
getting a commercial in, here.
 
2) Most .CO files can be moved within that "special place" allowing room for
more than one to be "stacked" on top of each other.  This is just like stacking
appartments.  Each appartment (.CO file) has a front and rear door.  Appartment
dewellers use their separate doors to enter and exit their appartment.  Thus,
each .CO file, properly stacked, may be entered and exited without accidently
going into the other .CO file.  Stacking .CO files is actually quite easy with
some of the .CO file stacking utilities in our ... wonderful online library
(see commercial above) ... and knowledge of ... those three numbers assocated
with every .CO file.
 
For further information about .CO files, see (6)TechRef (D)ownload MLCODE.DOC
edited by our own man-about-town, Mr M/L file manipulator, the organizer behind
our ... wonderful online library ... none other than Robert Benson, CoSysop and
Online Librarian.  Yo!  Take it a way, Bob!
 
Your last question asked if you can use .CO files without a disk drive.  The
answer is, yes.  A disk drive, like a tape drive, or using another computer, is
simply a device for saving and loading files.  There are 3 filetypes stock
Model T's develop and use, i.e., .DO (text files, Aka: ASCII files), .BA
(Microsoft tokenized BASIC files, requiring execution within the BASIC
interpreter), and .CO (machine language files--the subject of this discussion).
You may, however, run into a few other filetypes like .CA (Lucid spreadsheet
files) and a few others.  In all cases, you do not "need" a disk drive to use
any of these files.
 
Note: ... no make this a BIG NOTE: Always store your files to "some" storage
device before messing around with .CO files, or any file for that matter.  It's
a matter of practicing safe computing.  We are the lucky few who deal with cold
starts these days.  Let's get into the habbit of protecting ourselves, so we
may "not fear" the cold start.  It's like being ready for an earth quake.
Quakes are wonderful experiences if you've protected yourself.  Believe me, I
enjoy earth quakes, and I do not fear a cold start.
 
Hope this helps.  Again, the dissertations I've writing these days in response
to online questions has more to do with helping as many of our members as
possible.  Thank you for your questions and the opportunity to offer some
assistance.  -Rick-