Calls; Applications Programs Under Hh O/S - Tandy 600 Programmer's Reference Manual

Bios programmers
Hide thumbs Also See for 600:
Table of Contents

Advertisement

Each
application
has
its
code
(be
it
native
8086 code
or Microsoft
QCODE)
stored
in
an
application
load
file.
The
system
manager
program
recognizes
files
having extensions
of
the
form:
.!DD
(where
DD
is
a
two
digit
number), as an
application
program
file.
Applications
will
appear ordered
(in
the
left
hand column
of
the
system
manager
display)
by
the
number
'DD\
Programs
are
always invoked through
the
HH
O/S
execute
program
function
(OSEXEC).
Normally, the
call
to
OSEXEC
will
be
made
by the
Microsoft
System Manager
program.
The
OSEXEC
call
specifies
the
name
of the application
program
to
run,
the
name
of
the
AMI
file
to
use,
and an
optional
parameter
string to
be passed
to
the
application.
If
the specified
AMI
file
exists,
and
is
recognized as being a
valid
AMI
for
the specified
application,
execution
of
the
application
will
resume
at
the point
where
the application previously terminated,
tf
the
specified
AMI
file
does
not
exist,
a
new
one
will
be
created,
and
control
will
be passed
to
an
entry point
specified
in
the application
header
at
the
beginning
of
the application
code
file.
The
application
code
file
and
the
AMI
file
for
the
currently
executing
program
are
open
while
the
program
is
running,
and
the
handles
for
these
files
may
be
obtained
by using
the
Get
Application
File
Handle,
and Get
AMI
File
Handle system
calls.
By
using the
Expand
file
and
Reduce
file
system
calls
on
the
file
handle
for
the
current
AMI, a
program
may
expand
or
reduce the
size of
its
work
space.
Care
should
be taken
when
using the
Reduce
file
call
that
the reduction
does
not
reduce
the size
of
the
file
below
that
portion
used
for statically
allocated
data
and
the
program
stack.
Programs
terminate execution through the
HH
O/S
terminate
program
function
(OSTERM).
When
a
program
terminates,
control
will
be
returned
to
the parent
who
invoked
the
program.
Normally,
this
will
be
the Microsoft
System Manager
program.
The
OSEXEC
function
in
HH
O/S
maintains a stack
of
program
invocations
to
allow
this call-return
type operation
to
be
successful.
This stack
is
large
enough
to
allow
4
levels
of
depth.
A
program
may
terminate
for
one
of
two
reasons.
It
may
complete
its
task,
and
terminate
of
its
own
accord
without
user
intervention, or
it
may
be
told to
terminate
by
the
user.
The
Microsoft
Hand-Held
software allows the user
to
switch
easily
between
applications
programs.
It
does
this
through the
use
of
functions
keys which
have
special
meanings.
In
order
to
support
this
philosophy
of easily
switching
between
applications,
an
application
should
be ready
to
terminate
anytime
it
is
reading
keyboard
input.
When
the
user requests
the application
to
terminate, the
HH
O/S
will
return
a
special
<QUIT>
character
code
to
the
application.
When
the application
sees
this
<QUIT>
character,
it
must
place
itself
into
some
orderly state
and
then perform
an
OSTERM
function.
When
an
application terminates,
it
should release
any
space
that
it
has
obtained
for
its
data
region
that
it
is
not actually using.
This
frees the
memory
so
that
other applications
can
make
use
of
it.
The
<QUIT>
character
indicates that
the user
has requested
the
program
to
terminate, with
the
presumption being
that
some
other
program
will
be
run.
In
addition
to
the
<QUIT>
character
an
application
program
may
see
a
<SUSPEND>
character. Like the
<QUIT>,
the
<SUSPEND>
character
indicates that
the running
program must
place
itself
into
an
orderly
state,
and
then perform
an
OSTERM
function.
However,
the
<SUSPEND>
character
additionally
means
that
the user
is
executing
a
'pop-up' function
and
that
when
that
'pop-up'
terminates, control
will
return to
the
program
being
<SUSPEND>ed.
(An
example
of
a
'pop-
up'
function
is
the
system
calculator generally
accessed
through CTL-F2.)
112

Advertisement

Table of Contents
loading

Table of Contents