Download Print this page

Motorola EXORdisk II User Manual page 312

Advertisement

INPUT/OUTPUT
FUNCTIONS
25.3 -- Device Independent I/O Functions
The
contents
oT
the
data
bu~fer
. (non-diskette
device) and the
se~tor
buffer
(diskette
device)
are
indeterminate.
25.3.4 Input a record -- .GETRC
The
. GETRC
function reads a record from an opened file
or device
into
a
data
buffer.
The
specific
processing
performed
by .GETRC depends on the FMT bits of IOCFDF and on
the device type.
The
record
input
function
will
process
three
file
formats:
binar~
record (FMT
=
3),
ASCII
record
(FMT
=
5);
and ASClI-converted-binary record
(FMT
=
7>'
Binary records will be
stripped
of their
record
header
(see
section
24.3),
their byte count, and their checksums.
Only the data characters between the byte count and
checksum
fields will be returned.
If characters are encountered after
the checksum field of one binary record but before the header
field of the next record,
they wi
11
be ignored.
ASCII
records will be stripped of null characters,
line
feeds, rubouts,
and
the device
control
characters
DC1-DC4.
When
reading
records
from
the diskette,
compressed spaces
(bytes with bit
7
set to
1)
will
be·
automatically
expanded
into
the
appropriate
number
of spaces before being placed
into the data buffer.
This automatic space
ex~ansion
occurs
regardless
of
the
compression
bit in IOCFDF (bit "N").
A
carriage return will be the last data character in
the
data
b u-Pfer.
ASClI-converted-binary
records are handled similarly to
binary records;
howeverl
the conversion of two seven-bit data
bytes
into
a
single
eight-bit
data byte is automatically
performed.
The .GETRC function treats the system console
(CN)
in
a
slightly
different way than it does other devices,
since the
input from this device is usually in an interactive mode with
the
operator.
In
addition
to
the
normal
ASCII
record
pro c e
s
sin g
I
GETR
C
w ill per form the f
0
1
low i
n 9 .
Fir s t
I
i
f the
first
byte
of
the
IOCSUF
field
contains
a
displayable
character in the range
$20-$5F,
it
will
be
automatically
diSplayed as an input prompt each time the. GETRC function is
invoked.
Next, the special keyboard characters rub out ($7F),
cancel
(CTL-X,
$18),
and
EDT
(CTL-D, $04) will cause the
standard MDOS keyboard functions
to
be
performed
(section
2.5),
Rubout
will delete the previously entered character,
cancel will delete the entire input line
entered
thus
far,
and
EDT
will
~ause
the
in~ut
-iirie .ntered thus far to be
redisplayed on a
new
line
of
the
console.
Lastly,
the
carriage
return character will cause a carriage return,
line
feed,
and null
sequence to
be sent to the
consQle~
All
other
Page
25-39

Advertisement

loading

This manual is also suitable for:

Exordisk iii