Msg: 6875 *Conference*

11-29-96 11:41:15

From: RICHARD HANSON

To : DAVID SOWD

Subj: REPLY TO MSG #6874 (VT100)

Okay ... I understand your questions.  Let's take a little time, right now, to
build a knowledge foundation.  Please print out this message.  I've placed it
in the (1)Conference for all to read and, perhaps, add their two cents too.

A .DO file is an ASCII file.  It can contain "most" of the first 128 characters
in the 256 character, 8-bit chart, and all of the second 128 character codes.
A program stored in ASCII is not executable in its present form ... it need to
be either interpretered or compiled to the target processor.

A .BA file is tokenized.  It may contain "all" of the characters, including the
ones that can not be carried in an ASCII file, i.e. the null and control
characters.  Each character in a tokenized file is absoluteoly important to the
executability of that file.

Now, don't let this confuse you.  There are only 256 possible character codes
in our 8-bit language.  A BASIC program in ASCII is a convenience, but it will
not run as is.  It must be interpreted by a BASIC interpreter, i.e. BASIC.  The
BASIC interpreter is a program that takes an ASCII file (code writen in the
style of the BASIC language) and first, tokenizes the commands to take up less
space in RAM, i.e. a command like GOTO (4 bytes) ends up being a one byte code
when tokenized.

Note: Bill Gates, the most renouned micro-based programming language writer,
adopted the tokenization scheme back in the early 70's due to the 4K RAM space
available in early processor design, i.e. each byte had to count.

The BASIC interpreter then, given the command RUN, converts each line of code
into equivalent machine language code for the attached processor to execute.
Think of BASIC as your application, like word processing, and your BASIC
program as a macro, i.e. the processor is executing the BASIC application
program with, in turn, is converting the user-code for execution, one line at a
time, for the processor.

The major advantage of an interpreted language is, due to its ASCII level, is
it's fast to learn and modify, i.e. you don't have to recompile each time
before running.  You can modify on the fly, so to speak.  BASIC stands for
Beginners All purpose Symbolic Instruction Code.

Okay... with the above under our belt, we see we have a program written in the
"style" of BASIC but it is stored in a .DO (ASCII) file.  Our first job is to
let BASIC tokenize the file for use.

 go into BASIC
 load"filename.do" <enter>
 ...wait for the WAIT light to stop blinking and the OK to return
 save"filename" <enter>
 kill"filename.do" <enter>
 menu <enter>

You will now see a tokenized version of your program.  You might want to save
the tokenized vertion to disk (DVI) before progressing.  To run the code,
simply put your bar cursor over the .BA file and hit <enter>.  Because it has a
.BA extension, it will be fed to the BASIC interpreter; and because it's in
tokenized format, the BASIC interpreter will run the code.

Note: If you ever get a chance to save BASIC code in ASCII with a .BA extension
without tokenizing it, as you can do, when you attempt to run it, the BASIC
interpreter will freeze up and cold start your computer, i.e. it expects that
the .BA file is tokenized ... which in all cases it is, unless you start
hacking!

If, what you ran was a program that created at .CO file, then save the .CO file
to disk (DVI) as well.  Again, one of the reasons I could not give you
tokenized and machine language files on DVI disk was because I do not own a
DVI.  I use a MS-DOS based program that will format DVI disks and copy ASCII
files, only, between the two.  The other reason has to do with supply and
demand, as well as maintenance issues.

Now let's cover the use of .CO files.  First off, a .CO file is a program whos
characters represent the machine language commands necessary for the processor
to use, directly, without further interpretation.  This is also called
"compiled or assembled."  There are differences but let's not go in that
direction right now.

The benefits of a machine language program are, 1) The code is represented in
its smallest form (takes up the least amount of RAM), and 2) The code does not
need more code (a.k.a. an interpreter program) to be executed.

The 80c85 processor handles .CO files a bit differently than modern processors.
Today, one simply points at a machine language program and hits <enter> ... or
clicks their rat!  The code is then copied to "any place" in RAM and executed
by the processor.  This is sometimes referred to as "relative" vs. "direct"
addressing.  The 80c85 requires that .CO programs locate in a specific portion
of RAM--specifically reserved for that program.  Once at itslocation, all
intracode accesses (or jumps) are directly related to the address space that
the program occupies, i.e. direct addressing.

Some .CO files will do this, automatically, most will not.  However, there is
an easy way for you to get it right everytime ... without a degree in computer
science.  Here are the steps:

Given that a .CO file shows in your menu...

Place your bar cursor over the .CO file, hit <enter>.  More than likely, all
you get is a beep and the menu screen returns.  Now what?  This simply means
that the "specific" area in RAM for that .CO files' execution has not been
"reserved."  All you have to do is reserve it.  Here are the steps:

First you need to know what to reserve ... you need a number:

 go into BASIC
 loadm"filename.co" <enter>

You will get three numbers and an OM error (this is okay).  The first number is
the one you want.  Let's say that it reads 56400.

 clear0,maxram <enter>

This cleans up anything that "might" be in that "special" area.

 clear256,56400 <enter>
 menu

BINGO! You just reserved what you need and now you're back to the menu.  Place
your bar cursor over the .CO file and hit <enter> and away you go.

To answer your final question about how to call the programs once online, the
answer is: You do not use the built in TELCOM program.  You use one of the .CO
files ... READ AND STUDY THE DOCUMENTATION!!!

Good luck... have fun... -Rick-