NOTE: The first uploaded ARC of MTOS contained compaction errors that PREVENTD usability. This has been REPAIRED in this version. John Nagy, CHAOS BBS (517) 371-1106

orangesvetElectronics - Devices

Nov 8, 2013 (3 years and 11 months ago)

109 views


NOTE: The first uploaded ARC of MTOS

contained compaction errors that

PREVENTD usability. This has been

REPAIRED in this version.



John Nagy, CHAOS BBS (517) 371
-
1106








M.ulti
-
T.asking O.perating S.ystem


M.T.O.S.


MT
-
OS


MTOS


Copyright (C) 1987 by Tom Hunt




(beta test version)


12
-
25
-
87

(Merry Christmas Atarians, from me to you!)




MTOS is a revolutionary new O.S for Atari 8
-
bit computers with 256k (or
more).

It is actually a O.S
. extention, since it works with the resident ROM
based

Atari O.S., and with DOS. With MTOS installed, the multitasking
environment

is made available to the Atari owner




This document is divided into the following sections,



WHAT MULTITASKING IS,

WHAT M
ULTITASKING ISN'T,

WHAT MTOS IS, AND WHAT IT CAN DO,

WHAT MTOS ISN'T, AND WHAT IT CAN'T DO,

GETTING STARTED,

and SPECIAL NOTES.



If the subject of time
-
sharing/multitasking is new to you, then you
should

read the whole text.

_____________________________
____________________________________________
______

WHAT MULTITASKING IS

_________________________________________________________________________
______


Everyone seems to know a little about what multitasking is. Simply put,

multitasking is a computer oper
ating environment that allows more than
one

program to be run at the same time. There is a form of multitasking that

occurs during the regular Atari computer functions. These are slices of
time in

which your program is interrupted by hardware signals, and
system control
is

turned over to the O.S. for the purpose of performing system tasks. The
VBI

and DLI are two interrupts that you've probably heard about. During these

interrupts, you can even make the O.S. perform some tasks that you've
made

provision for
, by pointing the appropriate vector to point to your m.l.

routine.


But the realm of multitasking is a realm whose domain has been
traditionally

the MINI and MAIN FRAME computers. These large computers are not only
capable

of multitasking, but are also ca
pable of supporting the MULTI
-
USER
environment.

In a situation like this, individual users have a job (aka task, program,

application) running on his/her assigned terminal. To each user, it
appears

as tho they have the sole use of the computer's resources.

Before
multiuser/

multitasking, users had to wait for their turn to use the computer. But
using

modern operating systems, time sharing is a common thing.


Think about time being a pie, and time
-
sharing as slices of that pie.
Each job

is assigned a

slice of the time pie. Some jobs get assigned bigger slices
than

others, depending on their priority. So multitasking is a valuable asset
if you

want to do some word
-
processing, while another program is working on some
other

task in the background.

_____
____________________________________________________________________
______

WHAT MULTITASKING ISN'T

_________________________________________________________________________
______


There is an old saying
-

"There ain't no such thing as a free lunch!". In
oth
er

words, multitasking is system taxing! You can have one program hogging
100% of

the system's resources, or 2 programs sharing 50% of the system's
resources,

and so on... The pie never gets any bigger, you just cut the slices
smaller.

Plus, there is the
O.S. overhead involved in the juggling. That is, each
time

a task's clock counts down to zero, the multitasker has to jump in there
to do

house
-
keeping to get things ready for the next task on the agenda. This
house

keeping eats up machine cycles, and migh
t account fo 4% of the time pie
with

only 2 jobs running. With 3 jobs running, it goes up to 8%. With 6 jobs
run
-

ning it goes up to a whopping 20%!! So, the more jobs you have running,
the

slower your programs will execute. A multitasking environment will

not
give

you more processing power. It will only distribute processing among
different

jobs.

_________________________________________________________________________
______

WHAT MTOS IS, AND WHAT IT CAN DO

_________________________________________________
________________________
______


MTOS follows the discription about multitasking and time sharing. It
allows

the Atari computer owner to run up to 6 tasks at the same time. In the
past,

this kind of system environment was totaly unavailable to us. Now you c
an
be

using a word processor, flip to a basic game, flip to check on the
progress

of a program doing calculations, then flip back to your word processor.
And

all while each individual program is running! You can write your own
programs

that are compatable
with MTOS, if a few simple rules are observed. These

rules will be discussed later.

_________________________________________________________________________
______

WHAT MTOS ISN'T, AND WHAT IT CANNOT DO

_____________________________________________________
____________________
______


As you add jobs to MTOS, each program will seem to run slower. For some

programs, this is unacceptable. Other programs, like a word processor,
spend

alot of wasted time in loops, waiting for events to occur. Like waiting
for

a k
eypress. CPU time could be put to better use with MTOS.


The amount of memory available to each program is limited to 16k. The
amount

of screen ram allocated to each task is 1280 bytes, enough for GRAPHICS
0,1,

2,3,4,5,6,12, and 13. The programs running un
der MTOS must be "well
behaved".

That is to say that they shouldn't steal the VVBLKD vector, or the VKEYBD

vectors. They shouldn't interfere with any memory above $7FFF, or from

$2600
-
$3FFF. If you do so, you risk either interferring with another
program,

or at worse, a total system crash. Any free and legal addresses from

$0000
-
$0500 (with the exception of the above mentioned vectors!) MAY be
used!


If your program doesn't follow the rules, there is nothing to prevent it
from

doing so. On the CPU's used by

large computers is a mask that will not

allow any illegal addressing, and will return an error message to the
user.

The 6502 family of CPU's don't have this capability.

M.l. programs must be assembeled to reside from $4000
-
$7FFF. Your booting

game disks a
re definatly not MTOS compatable. These programming
constraints

of the multitasking environment are not out of the ordanary, since
program
-

mers working on a mainframe computer must make "well behaved" programs,
also.

______________________________________
___________________________________
______

GETTING STARTED

_________________________________________________________________________
______


There is a built
-
in keyboard buffer in MTOS. Sparta dos users need to
KEY

OFF before loading MTOS. MTOS may be used w
ith or without BASIC, but if
you

want to mix running both m.l. and BASIC programs, be sure to boot without

holding down the option key.


When MTOS initializes, you will be looking at the executor screen. The

executor program (called Exec) will be running,
and reserves task #0

for itself. You should press a 1 to initialize a new task. After this,

You can press a 1 to initialze a m.l. program, or a 2 to

initialize a basic program. There is also a test mode that is initialized
by

a 3. You will be prompted for
the amount of clocks to be assigned to the
new

task. 2
-
9 is the normal amount, but you can input any single character.
That

character will have $30 subtracted from it's atascii value, and the new
value

used for the amount of core clocks assinged to the new

task. For
instance, if

you would input a F, the value 16 would be the amount of core clocks
assigned.

If you chose the m.l. option (2), you will be prompted for the filespec
of

the object file. A m.l. program has to obey the rules (see above)! The

process

will then be executed to get either the basic cartridge or your
m.l.

program initialized.


To detach from Exec, and attach to the job you just started, press 2 to

(view) the job. You will be prompted for which job, which you choose from
the

ones listed on

the Exec screen as being active. If you did everything as

described above, you should now have your terminal attached to the new
task,

and if you chose basic, you should be looking at basic's familiar READY

prompt. To detach and go back to Exec, have your

joystick plugged in to
the

second port (actually PORT1), and press the trigger.

_________________________________________________________________________
______

SPECIAL NOTES

_________________________________________________________________________
______


This is a beta test version, and I request that you please keep detailed

notes about bugs, and send them to me, Tom Hunt. This will help me
greatly

in getting MTOS in to the kind of shape that the Atari owner deserves.
Please

note what kind of jobs were ru
nning, in what order, and what exactly

happens when the bug shows. This beta version is just that, a test
version to

work out bugs.


The m.l. loader routine only loads single stage load files. This will be

worked on to multi
-
stage load files. Also, the m.l
. loader routine seems
good

for only one load at this time. The balance of tasks have to be basic, or

test
-
loops. I have to work on moving the screens to different locations,

since sometimes the editor balks at where some of them are presently
located.

Bec
ause of this problem, some task combinations work better than others

(with this beta version). Just note the ones that work good, and be
patient

for version 1.0 to be released. I will also be working to support the
Sparta

dos 128k ramdisk ("RD D8: /E"), so

you can use a ramdisk with your MTOS

programs. The beta version should NOT be used with any ramdisk. It can be

loaded from a ramdisk, but will then use the extended ram banks,
corrupting

any files in the ramdisk.

There is a rudimentary TOOLKIT available,
and also under development. The

entry point to the TOOLKIT'S routines will be published later.

Also, this version is compatable only with the internal memory upgrades,
NOT

with the MIO. The keyboard buffer and the keyboard mask is still being
worked

on, s
o you might have some difficulty with keystrokes being sent to the
wrong

task.


In the best of Atari traditions, page 6 of memory is up for grabs. I
suggest

that you avoid using it when developing a program for MTOS.


If you make an interesting program for

MTOS, please upload it to The
Balloon

Works bbs. The number is 419
-
289
-
8392.


Don't wait for somebody else to make MTOS compatable programs,

do it yourself! It really isn't hard if you follow

the simple rules mentioned above.


If you don't have a password

on The Balloon Works bbs, and you want to

contact me, just leave a message in any of the message bases, and I'll
spot

it.


Tom Hunt