free hit counter

Introduction To File Control - Sharp MZ-80B Basic Manual

Personal computer double precision disc
Hide thumbs Also See for MZ-80B:
Table of Contents

Advertisement

1.2 Introduction to file control

The DISK BASIC interpreter SB-66 1 0 is a system software which has a su perb file control f u nc­
tion . It f u lly u tilizes the large capacity and high speed accessing featu re of the floppy disk file system
·s o th at files can be u sed not only for data storage bu t also as a random access data area connected to
the system program . Fu rther, with this interpreter disk files can be u sed as program segments which
may be called for execu tion in j ob u nits by the program in memory with the CHAIN or SWAP state­
ments.
Data fi les are classified into t wo grou ps according to the file access method: sequ ential access files
and random access f iles.
A sequ ential access file is a block of file data which can be accessed sequ entially. Data are accessed
sequ entially from the beginning. by specifying the f ile name.
System
A random access fi le is a set of fi le data which can be accessed at random. Each data item is
written in the file as an array element and is assigned with an expression with which the system
controls it .
System
In general, when data can be treated in segments (e.g., decimal data u sed when coding a program
by POKE statement) or it is arranged according to a certain ru le (e.g. , elements of a table) , it is
effective to write it as a sequ ential access file. When particu lar data items need to be accessed (e.g. , in
the case of in formation retrieval), it is effective to write it as a random access fi le.
To access d ata, first specify the f ile ( a set of d ata assigned a file name) with a logical file nu m ber of
to 1 2 7. A logical file nu mber is assigned to a file with a logical open statement as an alternative to
the f i le name .
Write
Read
E XPRESSION
(m)
Write
Read
"file n ame"
BASIC Sequential
access Data file (BSD)
BASIC Random
access Data file (BRD)
3

Hide quick links:

Advertisement

Table of Contents
loading