All of the features provided with the +3e can be accessed using new commands added into +3 BASIC. The current commands are listed below:
Note that all "permanent" settings stored on your hard disk can be bypassed by holding down the CAPS SHIFT key when switching on the +3e.
Use this command to format your hard disk so that it can be used by the +3e. Once you have done this, you can use the NEW commands to create some partitions. The command requires the following parameters:
FORMAT TO 0,15
Formats the master drive with a maximum partition number of 15, for exclusive use by the +3e.
FORMAT TO 1,31,300
Formats the slave drive with a maximum partition number of 31, using only cylinders 0-299. This disk can be shared with PC/Mac/Linux machines, or with FATware on the divIDE interface.
This command displays a listing of the drives attached to your +3e (together with the number of cylinders, heads and sectors). If the hard disk(s) have been formatted by the +3e, this will also show a list of all the partitions on the drive. As with the +3's standard CAT command, you can send the catalog to any stream (eg #3 for the printer). If a drive letter is shown next to a partition, this indicates that it has a permanent assignment, and the partition will be assigned to this letter automatically on boot.
By specifying the optional EXP keyword, you can get an expanded catalog, showing the starting and ending positions of each partitions (this is not usually useful, however!).
Displays a listing of the partitions on your hard disks.
CAT #3 TAB EXP
Sends an expanded listing of the partitions on your hard disks to stream 3.
Creates a new partition ready for +3DOS to use. It requires the following parameters:
NEW DATA "0>Games",16
NEW DATA "My Documents",16
Creates two 16Mb partitions on the master drive, called Games and My Documents.
Creates a new swap partition. Swap partitions are available for the +3e system and application programs to use as an extension to normal memory; they cannot be used for storing files or data. It is recommended that you create two swap partitions on your master drive, both of around 1-4Mb in size.
Parameters are identical to those used in the NEW DATA command.
NEW EXP "swap1",4
Creates a 4Mb swap partition on the master drive.
Deletes the partition specified by part$. Doing this will destroy all files that were stored on the partition!
MOVE "Utilities" BIN
Deletes the partition named "Utilities" from the master drive.
Renames the partition specified by part$ as name$. Note that the new name should not include a drive unit number, otherwise this will be included as part of the name.
MOVE "1>Utilities" FOR "Utils"
Renames the partition named "Utilities" on the slave drive to "Utils".
This command displays a listing of your current drive mappings. The display shows the drive letter followed by the partition currently mapped (using 0> to denote the master drive, and 1> to denote the slave drive). Floppy drives and the RAMdisk are also shown; these are devices numbered 2> (internal floppy), 3> (external floppy) and 4> (RAMdisk).
As with the +3's standard CAT command, you can send the catalog to any stream (eg #3 for the printer).
Displays a listing of your current drive mappings.
CAT #3 ASN
Sends a listing of your current drive mappings to stream 3.
With this command, you map a drive letter to any (data) partition on your hard disk. You can then access the new "drive" in the same way you would with any other drive.
You can use any drive letter, A-P, provided it is not already in use, and each partition can only be mapped to one drive letter at a time. One final limitation in the current release of the ROMs, is that only two partitions can be mapped at any one time.
It is also possible to map the internal and external floppy drives, and the RAMdisk to any drive letter (provided you have unmapped them from A:/B:/M: with the MOVE...OUT command first). To do this, just use the physical device code instead of a partition name. These codes are as follows:
Finally, by using the ASN option, you can make this assignment permanent (ie, it will automatically be set up every time you turn the +3e on). This is only effective if you have a hard disk.
MOVE "C:" IN "Games"
Maps drive C: to the partition named "Games" on the master drive. It is now possible to use drive C: in +3 BASIC commands, such as COPY "A:*.*" TO "C:" and CAT "C:"
MOVE "D:" IN "4>" ASN
Maps drive D: to the RAMdisk, and makes this assignment permanent.
Removes the current mapping from the drive specified, leaving the drive letter free to be assigned to any other partition. It is also possible to unmap drives A:, B: and M: in this way, so that you can map them to a hard disk partition with the MOVE...IN command. The physical floppy drives and RAMdisk can be reassigned to other drive letters if you wish.
By specifying the ASN option, you can remove any permanent assignment for this drive letter, so that it is no longer automatically set up when you turn the +3e on.
MOVE "C:" OUT
Removes the previous mapping from drive C:, which can now be mapped to a different partition if required.
MOVE "B:" OUT ASN
Unmaps drive B:, and ensures that nothing will be mapped to this letter next time you switch the +3e on.
These commands can now be used with the ASN option, which specifies that the new default drive assignment should be made permanent (ie, it will be set every time the +3e is switched on). This is only effective if you have a hard disk.
Additionally, VERIFY and MERGE now work in the same way as the LOAD drive$ command, so that they set the current default (load) drive for +3 BASIC.
Sets the current default drive to C.
LOAD "E:" ASN
Sets the current default drive to E, and makes this assignment permanent.
The streams and channels system of the +3e has been extended, and it is now possible to open streams to channels other than the three standard ones. The stream number n should be between 0 and 15; altering streams 0-3 will change the behaviour of the system and should be used with care. For further details, please see the extended channels documentation, which also contains a demo of the window channels.
The channel name f$ can be any of the following (capitals or lower-case letters may be used):
Once a stream is opened, it can be used with the standard INPUT # and PRINT # commands, as well as the additional stream commands below.
NB: The INPUT # command currently does not work properly with file channels. However, you can simulate this command using the new NEXT # command below.
Creates a file named test.txt on drive A: and opens an output-only channel to it, connected to stream 4.
Opens an existing file named stuff on the default drive and opens an input-only channel to it, connected to stream 5.
Closes the channel attached to stream n. If n is 0-3, then the default channel for that stream is re-attached to it. Note that the bug in the standard Spectrum has been corrected, and it is now safe to "close" streams that are already closed.
Closes the channel attached to stream 4.
This command returns the current position of stream n and stores it in variable var. This is not supported on standard channels, which will fail with an invalid I/O device error.
Stores the current fileposition for stream 4 into the variable fpos .
This command returns the extent (or size) of stream n and stores it in variable var. This is not supported on standard channels, which will fail with an invalid I/O device error.
Note that on the +3e, filesizes are always a multiple of 128 bytes.
Stores the size of the file attached to stream 4 into the variable fsize.
This command sets the current position of stream n to m. This is not supported on standard channels, which will fail with an invalid I/O device error.
Sets the current fileposition for stream 4 to fpos.
This command gets the next character of input from stream n and stores it in the variable var. If used on the standard "K" channel, this is similar to the INKEY$ function, except that it always waits for the next character to become available (ie on the "K" channel, it waits for a keypress).
You can use this command to simulate the INPUT # command for file channels.
NEXT #0, x
Waits for the next character of input from stream 0 and stores it in variable x.
9000 LET a$="" 9010 NEXT #5,c 9020 IF c=13 THEN RETURN 9030 LET a$=a$+CHR$ c 9040 GO TO 9010
The above subroutine inputs a string from stream 5 and returns it in a$ .
This command loads a snapshot file in the popular .Z80 or .SNA format and runs it. Both 48K and 128K snapshots are supported. A small amount of the screen will be corrupted by the snapshot loading process - this is normal, and should not cause a problem unless the snapshot has code in the screen area.
Note that snapshot loading is only supported from hard disks/compactflash cards, not floppy disks. If you are using the +3e ROMs on a floppy-only system, you should instead use the snapshot loading programs on the software page.
Loads the "trapdoor.z80" snapshot from the default drive.
Loads the "bounder.sna" snapshot from drive C:.
These four commands set the colours for the +3 Editor screen, allowing you to type programs in to the colour-scheme of your choice.
Using the ASN option, makes the new +3 Editor and +3 BASIC colour scheme permanent, so that these colours will be used whenever you switch the +3e on (this is only effective if you have a hard disk).
SPECTRUM INK 4:SPECTRUM PAPER 0
Sets the +3 Editor colours to green ink on black paper.
SPECTRUM PAPER 1:SPECTRUM INK 6 ASN
Sets the +3 Editor colours to yellow ink on blue paper, and then makes these colours the default on booting the +3e, together with whatever the current +3 BASIC colours are.
Similarly to the previous colour commands, this sets the colours for the +3 Editor screen, but allows you to specify all attributes in one go. For ink i, paper p, bright b and flash f, the value is calculated as: n=(128*f)+(64*b)+(8*p)+i
Again, the ASN option sets both the +3 Editor and +3 BASIC colours that will be used every time the +3e is switched on.
SPECTRUM ATTR 4
Sets the +3 Editor colours to green ink on black paper.
SPECTRUM ATTR 14 ASN
Sets the +3 Editor colours to yellow ink on blue paper, making these colours (and the current +3 BASIC colours) permanent on boot.
Back to ZX Spectrum +3e homepage