Download Print this page

Motorola EXORdisk II User Manual page 333

Advertisement

INPUT/OUTPUT FUNCTIONS
25,3 -- Device Independent I/O Functions
standard error messages if an invalid file name specirication
is
entered,
if a file name is missing} of
if
one
Or
the I/O
functions returns an error condition.
The
system
function
.ALPHA
is
used
to test ror alphabetic characters.
Both
Or
these functions are discussed
in
detail in Chapter
27.
In this example,
the assumption is made that the
prog~am
is
invoked
from
the
MDOS
command
line.
Thus,
it
must be
origined to load above location $lFFF.
The stack pointer
is
automatically
initialized
through
the
loading
process to
point to the last-loaded program location.
The
stack
area
has
been
set
up
so
that
the
default value of the stack
pointer can be used without having to execute
a
load
stack
pointer
inst~uction.
* *
DEFINE SOME WORKING STORAGE
*
PFNPAK FDB
UCFLG
FCB
*
*
0,0
o
PROCESS FILE NAME PACKET
UPPER CASE CONVERSION FLAG
*
EXTRACT NAME FROM
COMMAND
LINE
*
START
*'
ERR!
ERR2
LDX
STX
LDX
STX
LDX
SCALL
TSTB
BEG
ASLB
BCS
LDAB
BRA
#TEXFIL+IOCLUN.
DESTINATION
PFNPA~+2
OF NAME
CBUFP$
PFNPAK
#PFNPAK
· PFNAM
STARTA
SOURCE OF NAME
EXTRACT FILE NAME
CHECK FOR VALID NAME
EG
=:>
GOOD
ERR!
CS
=~
NAME MISSING
#7
ILLEGAL
NAME MSG NUMBER
ERR2
#5
NAME REQUIRED MSG NUMBER
LDAB
SCALL
BRA
· MDERR
EXIT
DISPLAY
ERROR, THEN EXIT PROGRAM
'*
ERR3
*
CLRB
BRA
*
RESERVE
AND
*
STARTA
LDX
seALL
BCS
SeALL
BCS
*
ERR2
OPEN
THE
#TEXFIL
· RESRV
ERR3
· OPEN·
ERR3
*
READ
A
LOGICAL SECTOR
*
I/O FUNCTION ERROR MSG NUMBER
lOCB
CS
=>
ERROR
CS
=:>
ERROR
INTO BUFFER
Page
25-60

Advertisement

loading

This manual is also suitable for:

Exordisk iii