English
Language : 

NSB8 Datasheet, PDF (109/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
ITALIAN TECHNOLOGY
grifo®
A file name is an unambiguous reference to a specific file, and so specifies not only the file’s name
and extension on diskette, but also the drive in which it is located. Thus, a complete file name consists
of an actual name of no more than 6+3 printable characters plus an optional drive suffix (which is
assumed to reference drive #1 if omitted). A file name is a string value. Statements which require file
names as arguments will accept any string expression, as long as it evaluates to a legal file name.
FILE SIZES (LENGTHS)
The size of a file is specified in file blocks. A file block is 128 bytes of information. Each file in NSB8
occupies a portion of disk storage. A file may be any number of file blocks in length, provided that
there is sufficient free storage space for it on the diskette. NSB8 has no functions nor statements to
obtain the file size, so if this information is necessary it is preferible to save it directly into the file.
FILE TYPES
Every file has a type, which can be used to classify a file according to how it is used. For example,
the NSB8 convention is that a type 2 file always holds a program written in BASIC tokenized. A file
of type 3 is used to store data used by BASIC programs. A type 1 file should contain an executable
machine language program, such as the BASIC interpreter itself. These, however, are only 3 of the
128 possible type designations (from 0 to 127). You are free to use the others as you wish, to signify
special types of file contents which are meaningful for you. For example, you could write a special
business program and arbitrarily declare that all data files relating to it would be of type 7. Facilities
within NSB8 allow you to determine a file’s type when accessing or creating it.
OPENING FILES
Before you can access a data file, you must associate its file name with a file number using the OPEN
statement. From that point on, use the designated file number when referring to the file. For example,
suppose “STOR” is opened as file #2. Then, all BASIC statements in your program which are
intended to access “STOR” should refer to file #2, instead of the actual file name.
CLOSING FILES
When you are finished using a file, the CLOSE statement will free the file number associated with
the file so that another file may be opened with that number.
Closing a file also causes any information which is part of the file but which is temporarily stored
in RAM memory to be written to the file on disk.
If your program requires manual swapping of several diskettes in and out of one drive, it is essential
that all files on a given diskette be closed before it is dismounted from the drive. This is to ensure
that all the latest changes in the file’s contents are actually transferred to the diskette. More
importantly, it ensures that no subsequent WRITE activity intended for these files will occur on the
wrong diskette.
NSB8
Rel. 5.10
Page 97