CHAPTER 27
27.
OTHER SYSTEM FUNCTIONS
In
the
following
description
of the system functions
these 'symbols will be used:
Symbol
Meaning
A
A accumulator
B
B
accumulato~
X
Index register
CC
Condition code
~egister
Z
Zero flag of condition code register (bit
2)
c
Carry
flag
of
condition
code register
(bit
0)
XH
Most significant byte of X
XL
Least significant byte of X
B,A
The
register pair B and A
treated
as
a
sixteen bit register
For
MDOS09,
the registers
YI
U
and DP are unchanged by
the system function calls.
It is assumed that the
reader
is
familiar
with
what
system
functions are, how they are invoked} what precautions
must be taken
~hen
testing programs using
system
functionsl
and
how
errors are handled by system functions
(se~
section
24.8) .
The
remainder
of
this
chapter
is
devoted
to
the
description
of
all system functions not described thus far.
The description
is
divided
into
the
following
sections:
register
functions,
double-byte
arithmetic
functions,
character string
functions,
diskette
file
functions,
and
miscellaneous functions:
27.1 Register Functions
The
register
functions
are
used by some
~f
the other
system functions as an extension
of
the
M6800
instruction
set.
Many
operations that involve the transfer and exhange
of information between the register
pair
IfB,A"
and
the
X
register
are
made
feasible
by
the
fact
that
the
SWI
instruction (used
ror
accessing
system
runction
handler)
automatically
saves
all
registers on the stack.
Since the
sixteen
bit
registe~s
are
pushed
on
the
stack
least
Page
27-01