home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
ref
/
mlcode.doc
< prev
next >
Wrap
Text File
|
2006-10-19
|
3KB
|
55 lines
There is a lot of mystery surrounding CO programs because of the way they
are loaded into the Model 100, what you should know first is that who ever
designed its software evidently did so with Text files and Basic programs
in mind were as Machine language programs were an after thought. You see
file management is done automatically for Text files and Basic programs,
their file type, starting address and name are recorded directly into the
file directory in machine memory (63930-64138) when they are created. As
old files are deleted and new ones created the remaining files are moved
up and down in RAM and as their locations change their starting addresses
are automatically updated in the file directory.
Machine language or "CO" programs on the other hand often times cannot be
moved because of address specific routines within the program so they are
given a fixed address and here's were things get sticky for this is not
compatible with the operations of the file manager. To accommodate CO
programs a modification had to be made, instead of going directly to the
program from the address found in the file directory the machine goes to
a pseudo file which contains a 6 byte table with the address information
for the the location of the programs code. In this way the file manager
can move the pseudo file but not the real CO program.
When you create a Text file or Basic program in the Model 100 you do so
through the built-in programs TEXT and BASIC which use the file manager
but when you create a CO program you must first load it from a Text file
(the file may be in decimal, hexadecimal or ASCII characters) to its end
location in RAM. This is done using a "loader" which converts the file
from what ever form it's in to single bytes, it may even be tailored for
that specific program saving you any further work. If the loader wasn't
tailored for that program or the file was loaded from tape you must enter
the programs name and address information so that the file directory can
CALL the program, this is done in two steps:
First go to BASIC and set the HIMEM pointer to the very first address of
the CO programs code, this is done with the CLEAR command and keeps the
machine from using that area as the RAM fills up.
Second you have to enter the programs name and address information with
the SAVEM routine, this puts the 6 byte address table in the pseudo file
which is automatically recorded in the file directory as the CO program.
The SAVEM routine incorporates many of the functions of the file manager
but you control it manually.
If the CO program is loaded from a Tandy Disk Drive the SAVEM operation
is automatically done for you but you still have to set HIMEM.
If you do not know the addresses for either the first or the second step
just type RUNM "program name" (the "CO" extension is not needed) and you
will get the "Top","End","Exe" addresses followed by a "OM Error".
If you should accidentally KILL a CO program from the Menu and find that
you have to get back into it you can still run the program by CALLing its
Execution address, if it is the lowest CO program or the only one in RAM
and its Top address and Execution address are the same (they usually are)
you can CALL HIMEM.