The dot command that handles attributes is .chmod and has a bit of a different syntax than MOVE as it accepts four attributes r, h, s and a, for read-only, hidden, system and archive. The first is in essence the same as p for MOVE while h doesn't exist on NextZXOS (setting the system attribute makes it also hidden by default) but it does exist as an attribute on FAT drives. Trying:

.chmod TBBLUE.FW -h

you will see that nothing has changed when doing CAT EXP. If you however take your SD Card to a PC, you will be able to see the file again there.

The RAMdisk

You may have been wondering what point there is in storing information in the RAMdisk (m:) as it will be lost once the ZX Spectrum Next is switched off. Well, perhaps its most obvious use is to store chunks of NextBASIC program (or routines) which can be merged (using MERGE "m:filename") into a smaller program, in sequence. This makes it possible to write about 90K of NextBASIC code, and hold it in the machine, without going into the more complicated BANK commands. Another little less obvious use is to store temporary files there that won't be needed when your program finishes. Memory is the fastest medium on your ZX Spectrum Next and quick access to files may be beneficial.

As we saw in Chapter 17, one of the more interesting uses of the RAMdisk is in animation, where a series of pictures can be defined by a slow NextBASIC program, stored in drive m:, then called back to the screen at high speed. Obviously BANK is still the preferred way to do it, but for quick jobs that use Layer 0 it's a quick and easy method!

Drive and Partition Management

We've talked about physical devices and virtual devices; we've also talked about the automounting features of NextZXOS but we haven't truly explored how the system manages storage devices and assigns them to drives. NextZXOS provides us with four commands to help us list and manage disks and drives. The drive and partition management commands are: CAT TAB that lists the physical storage devices attached to the system and what partitions they contain; CAT ASN that lists all drive assignments to whichever partition or disk (basically listing what's mounted), MOVE … IN to assign any device/partition physical or virtual to a drive (mount) and MOVE … OUT to remove an assigned partition from a drive as well as REMOUNT that allows us to change system disks on the fly. NextZXOS also provides us with a way to create virtual disks of varying sizes in the form of two dot commands: .mkdata and .mkswap

CAT TAB and CAT ASN

CAT TAB lists the storage devices currently connected to your ZX Spectrum Next and their partitions. It's syntax is:

CAT [#n] TAB

where #n is an optional stream to redirect the output to (e.g. to a file). On a standard ZX Spectrum Next with a single SD Card reader, giving

CAT TAB

will return:

MMC unit 0 (1024M)
MMC unit 5 (1024M)
5>1>NEXT           1024M FAT32

which illustrates also a point we made early in the chapter. Each SD Reader is assigned two device numbers (0,5 and 1,6 for first and second SD Readers respectively) according to what partitions it holds. If for example we had eight partitions, seven IDEDOS and one FAT32 then our display would have been:


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.