+3 DOS

Notes on the Disk Operating System for the Plus 3

+3DOS is the Disk Operating System of the Spectrum +3. It is contained in ROM 2 on those machines and provides support for:

  • Support for one or two floppy disk drives and a RAMdisk.
  • CP/M Plus and CP/M 2.2 file compatibility.
  • AMSTRAD CPC range and PCW range file and media compatibility.
  • Up to 16 files open at the same time.
  • Reading and writing files to or from any page in memory.
  • Byte level random access.
  • Deleting disk files; renaming disk files; changing disk files' attributes.
  • Selecting the default drive and user.
  • Booting a game or operating system.
  • Low level access to floppy disk driver.
  • Optional mapping of two logical drives (A: or B:) onto one physical drive (unit 0).

Spectrum +2A

The +2A (not the +2) has the exact same ROM's as the +3, it just has a Cassette tape instead of a 3" floppy drive. As such, +3DOS is available but only provides:

  • Only drive M: is available (the RAMdisk)
  • The default drive for filenames is initialised to M: rather than A:
  • Any attempt to use drives A: or B: will fail with error '22 - Drive not found'
  • As the sector cache is not required for use with the RAM disk, it is increased to 64K (the whole of pages 1, 3, 4, 6). This will give 62K of data and 2K of directory (64 entries).
  • The presence of the floppy disk interface can be determined by calling DD_INTERFACE. If the interface were not present, then none of the other low level floppy disk routines (DD... etc.) could be called; the effect of doing so is undefined.

Another method to determine if a machine is a +3 or a +2A is to inspect bit 4 of FLAGS3 (0x5B66). If the bit is set then a disk interface is present, hence a +3. If the bit is reset then no disk is present, hence a +2A or a +3 with no disk interface or the interface disabled.

CP/M File compatibility

+3DOS uses the CP/M file structure, subject to the following restrictions:

  • Maximum file size of 8 megabytes (CP/M Plus supports a maximum of 32 megabytes).
  • Maximum drive size of 8 megabytes (CP/M Plus supports a maximum of 128 megabytes).
  • Directory labels are ignored.
  • No passwords. XFCBs will be erased, renamed, etc., along with their file(s) but are otherwise ignored.
  • No date and time stamps. SFCBs are initialised to zero when a file is created, but are otherwise ignored.
  • The archive file attribute is ignored, i.e. it is unaffected by all routines except DOS SET ATTRIBUTES.

Essential API

+3DOS Essential API

Additional API

+3DOS Additional API

Low Level API

+3DOS Low Level API

+3DOS File Header

The +3DOS File Header

Error Codes

The +3DOS Error Codes

Last modified November 24, 2021: Addn CP/M file compatibility (a6476de)