the esxDOS-compatible API) which can be used from machine-code or a language other than NextBASIC (for example C) to provide them with all the facilities needed for accessing your ZX Spectrum Next without having to write low-level access to the computer's hardware from scratch. The distinction is subtle and more easily discernible in facilities that are exposed to the 48K legacy mode of operation where the NextBASIC commands do not exist and their place is taken by the aforementioned dot commands.

In the following sections we will examine the NextBASIC usage of NextZXOS facilities before we extend the discussion to dot commands and the NextZXOS Command line so for the next few sections you can approach the subject as a NextBASIC topic if you feel more comfortable that way.

Let's however start by introducing topics in the order they will be needed in our discussion.

Notes

In this chapter, a lot of commands produce visual feedback that may be easier to see and understand on a 64 or 85 column display. Although NextZXOS menus are covered much later in the chapter, it may be of benefit to learn to use the Command Line in combination with the 32/64/85 option. You get to the Command Line menu either from the main NextZXOS menu or by pressing EDIT and navigating to it while in NextBASIC. Pressing EDIT again will allow you to select the 32/64/85 option which will cycle through all available widths until you find one that visually satisfies you.

Files, Drives, Partitions and Disks

Like most Operating Systems, NextZXOS uses the concept of Files to store data in a hierarchical organised set called a Drive identifiable by a Drive Name. This is the combination of a letter5 from A to P suffixed by a colon ie. d:, which in turn can be contained within a Disk. A file is any type of collection of data; Sprites, Arrays, NextBASIC programs, machine code, images or collections of the above. While NextZXOS via NextBASIC supports a finite set of file types, this set can be extended with the use of external programs and dot commands. For the following sections we will concentrate to what is available via NextBASIC and the provided dot commands with a brief discussion of how NextZXOS (and NextBASIC in turn) can be extended to handle more file types.

Files are usually organised in folders. While folders are not necessary for the storage of files, they are advisable as they help categorise and group files in a logical way, which allows them to be searched and accessed easily. That becomes apparent as your collection of files grows from a few tens to hundreds or thousands.

As mentioned above, files themselves are stored on disks, which are the physical devices that can be removed from the computer and whose contents are not lost like the main memory after each power cycle. Depending on the type of disk, there may be one or more data structures on it called partitions which as the name implies is a way to virtually organise the available space on the disk into smaller units. Partitions can be assigned to drives or sit unused –with or without data– invisible to NextZXOS (until a drive is assigned to them).

Apart from the physical disks, NextZXOS also allows the use of virtual disks and tape images. These are special files that contain an exact replica of the medium they simulate. They too, can be assigned to drives (see the footnote regarding tape images) as physical disks can and they appear to the user (and NextBASIC) as any other physical disk. There are some special considerations regarding these special files which we will visit further in this chapter.

Working with files

In our examples in the previous chapters we have already used files and specifically one particular type of file: NextBASIC programs. Even more specifically, we have SAVEd and LOADed them by using two commands: SAVE and LOAD.

5 NextZXOS cannot assign all letters in the range A to P as drives, since some are reserved; C: is always the boot drive, M: is the RAMdisk and T: (an exception to the A to P range) is the tape.


ZX Spectrum Next User Manual, 3rd Edition (ISBN 978-1-5272-5496-1), written and illustrated by Phoebus R. Dokos. Copyright © 2020-2024 Phoebus Dokos / SpecNext Ltd. Licensed under CC BY-NC-SA 4.0. This is a transcription and can contain errors; check any doubt against the printed page.