Dski; Eof - Epson TF-20 Reference Manual

Hx-20 disk basic
Hide thumbs Also See for TF-20:
Table of Contents

Advertisement

DSKF
To return the free area remaining on the disk.
DSKF (<drive name>)
PRINT DSKF ("A:")
DSKF returns the amount of free area in the disk set in the
specified disk drive in units of kilobytes.
<drive name> is a string with a value of "A:" through "D:".
If the RESET statement is not executed after the disk is
replaced, DSKF will not return a correct value, so caution is
advised.
Also, as the memory area for BASIC DOS is allocated in
2K-byte units, called blocks, the value returned by DSKF will
change in multiples of two.
To read data directly from the disk
DSKI$ (<drive name>, <track No.>, <sector No.>)
A$=DSKI$ ("A:", 1, 3)
DSKI$ reads one logical sector from the specified drive and
track and returns the result as a 128-byte string.
The specification of <drive name>, <track No.> and
<sector No> is the same as DSK0$ and, as with DSK0$,
there is no need for opening or closing.
(See DSK0$.)
To return the end-of-file code.
EOF (<file number>)
IF EOF (1) THEN CLOSE #1 ELSE GOTO 100
The file specified by <file number> must have been opened
for the input mode. EOF checks if the file specified by <file
number> has reached its end.
EOF returns -1 (true) if the end of the file has been reached
and returns 0 (false) if not.
If the specified file is RS-232C port ("COM0:"), EOF returns
-1 when the buffer is empty and returns 0 when the buffer
is not empty. The EOF function always returns 0 (false) for
the file assigned to the keyboard.
INPUT$
To return a string of characters read from a specified file.
INPUTS (<number of characters> [,[#]<file number>|)
A$=INPUT$ (5, #3)
INPUT$ reads a string of characters in the number specified
by <number of characters> from the file specified by <fite
number>. If <file number> is omitted, characters can be
input from the keyboard; but the characters input from the
keyboard are not displayed on the screen, unlike the
execution of an INPUT statement.
INPUT$ is in a wait state until a string of characters specified
by <number of characters> is all input. However, if any input
data exists in the input buffer, INPUT$ reads characters from
the buffer.
With an INPUT$, all characters except BREAK key are read
as is. Therefore, INPUT$ allows the input of characters, such
as Carriage Return (character code 13), etc., which cannot be
entered by INPUT and LINE INPUT statements.

Advertisement

Table of Contents
loading

Table of Contents