SpartaDOS X Reference Manual

Programming with SpartaDOS X




Format a Disk (FORMAT)

Index


Purpose To initialize a disk, setting up the appropriate track, sector, and directory data.
 
Syntax

XIO 254, #IOCB,0,0,"Dd:"
 

Remarks

The Dd: specified is irrelevant, since this command will bring up the SpartaDOS X disk formatter menu. From this menu disk number, format, size, skew, etc. may be selected. Once the formatter is exited with the <ESC> key, control will be returned to the program. This allows disks of all types to be formatted from within any program. The IOCB should be closed for this operation. WARNING! Formatting a disk will destroy all existing data on the disk. Hiding or protecting a file will not save it from being destroyed during a disk format.

The next two commands are not available through XlO calls. They must be accessed directly through the CIO. An assembly language listing of a routine to access these will follow, along with a BASIC program that demonstrates its use.


Previous page

Next page