Commands And Statements; Dsko; Files - Epson TF-20 Reference Manual

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

Advertisement

4.4 Commands and Statements

The commands and statements used in Disk BASIC are as follows.
To close file(s)
CLOSE [[#]<file number>,[#]<file number>...]]
CLOSE #3
CLOSE closes a file specified by <file number> <file
number> is the number under which the file was opened
The file may then be reopened using the same or a different
file number, likewise, that file number may now be reused to
open any file
A CLOSE statement without <file number> closes all files
opened at the time of executing the statement # before
<file number> may be omitted Note that END and NEW
statements always close all files automatically but a STOP
statement does not close any files
When an output file has been opened, the file must be
closed in order to correctly complete the output processing
of the data remaining in the buffer After CLEAR, LOGIN,
NEW, DELETE, WIDTH, LOAD. RUN, or MERGE is ex-
ecuted, or a program is edited, all the files being open at that
time will be closed
(See OPEN)
4-6
1

DSKO

To write data directly to a disk
DSKO$ <drive name>, <track No.>, <sector No.>,
<string expression>
DSKO$ "A:", 1, 5, A$
This command is a disk output command to write the
contents of <strmg expression> to a specified location on
the disk in the drive indicated by <dnve name> Data write
is in units of one record (128 bytes) and is physically written
to the first or second half (128 bytes) of a single sector.
The length for <stnng expression> is 128 characters If a
string longer than this length is used, the first 128 bytes of
data will be accepted and the remainder will be ignored If
fewer than 128 characters are input, an FC error will occur.
To store data which is less than 128 bytes, the remaining
bytes should be padded with dummy data (OOH) as is done in
the following program
5 CLEAR 500
10 H*="12345fc"
20 ft$=
re
o* "A; ",8, 18- A*
<dnve name> can be "A ", "B ", "C " or "D "
<track No > can be any integer from 0 to 39
<sector No > can be any integer from 1 to 64
NOTE:
In this command, <sector No > refers to a logical sector (the
amount of data transferred in a single logical I/O operation) or
one record (128 bytes) As the length of the physical sectors
is 256 bytes, <sector No > 1 indicates the first half of the
first physical sector, <sector No > 2 indicates the second
half of the first physical sector, etc This pattern is continued!
in the following manner
4-7

Advertisement

Table of Contents
loading

Table of Contents