Msg: 5226 *Conference*

07-28-94 21:32:14

From: RICHARD HANSON

To : GUY SATYA

Subj: REPLY TO MSG #5220 (PROGRAMING)

----
Hi Guy... good question... how to handle large programs and/or large
program-accessed data files on a Model 100.  The answer is actually simple.  It
goes like this:

Break out the major routines of your program into subroutine-programs.  Instead
of calling these with GOSUB and returning with RETURN, use LOAD"filename to
load and run the subroutine program from a storage media or RAM-disk, then use
LOAD"filename to load and run the program core--usually a menu to the
subroutine programs--again, from a storage media or RAM-disk, not RAM.

From a file point of view, access your files from a storage media or RAM-disk,
not RAM.  And, if you have the ability to write the code, files stored on media
or RAM-disk may grow to the size of the storage.

That's it ... but the question is, now, what storage medias can you use?  Let's
list them, along with some pro and con.

----
TAPE: Since you own tape, you could load each program-module, or subroutine
program, on a separate tape.  Then, in your programs, simply prompt the user
(that's you, sir) to swap tapes, and which tape to use, and to make sure it's
rewound.  This will work!  It will be slow but ... it will work!  In fact, this
is exactly how we used to do data processing back in the late 60's, man ...
with tape-based programs calling the operator to load and offload tapes all
night long.  It was crazy but ... it worked!  Besides ... writing a major
program in this manner would be good practice for you.

----
TPDD/TPDD2 w/TS-DOS: Consider this just like your tape, except that it provides
you random access vs. sequential access.  Also, you can probably use just one
disk for both program modules and data files.  The TPDD stores 100K per disk,
with 1, 40 file directory, and the TPDD2 stores 200K per disk with 2, 40 file
directories.

The trick here is in using TS-DOS with the DOS-ON function turned on.  And,
unlike all other DOSes for the TPDD/TPDD2, you may get TS-DOS on an option
ROM--thus the DOSes code runs from the option ROMs address space, vs. the RAM
address space.

To use the direct disk access feature of the DOS-ON function, you simply change
your LOAD"filename to LOAD"0:filename, and/or LOAD"1:filename is you have a
TPDD2, depending on which directory you wish to access.  Frankly, most folks
just us the 0 directory and don't even know about the second directory.  In
both case, however, your maximum file storage is governed by the total storage
available on the media, i.e., 1 file, 200K large is the same as 80 files, 40 n
each directory, whose combined file storage demands equal 200K.

One draw back to using the TPDD or TPDD2 is that the disk must be attached to
your Model 100 while the program is processing.  Of course, this is not a
problem if you are not accessing the disk--the normal state of operations.

----
BOOSTER PAK: By far, the fastest multi-file access is to and from solid-state
storage (AKA: RAM-disk).  The Booster Pak is solid state with a 1/2-Meg
capasity, and ... get this ... a special version of TS-DOS built right into the
system ROMs of the Booster Pak.  Using the BP's TS-DOS, you don't have to turn
it on--it's always on.  As for programming, you have an additional R: command,
e.g., LOAD"R:filename.  You may also use a TPDD/TPDD2 with the Booster Pak and
keep the 0: and 1: commands.  Furthermore, with Desk-Link installed on a MS-DOS
computer, and your Model 100 plugged in through the serial port (COM1 or 2) via
a null-modem cable, you may also access files from your MS-DOS
computer--assuming you have one, of course.

----
XR4: Here, to is yet another item were you may access multiple files.  If
you're interested, I can have EME Systems [the manufacturer] send you a detail
sheet on its operations and options.

----
Well, I'll stop here and let you mull over these ideas.  Again, good question,
Guy.  Thanks for asking.  -Rick-

PS: This is a long message.  You might want to capture it into a file for
offline reading and printing.  Simply open a file then choose the <A>gain
feature from the line below to display this message ... again!