SpartaDOS X Reference Manual

Programming with SpartaDOS X




C h a p t e r    6

Index


SpartaDOS X Functions from BASIC

Many features of SpartaDOS may be accessed in BASIC, Action!, machine language, and other programming environments. The following is a list of common BASIC functions and XIO statements that allow the programmer to accomplish a variety of tasks. Conversion to other languages should not be difficult; refer to the reference material for that language for details.

In this list, IOCB refers to an Input/Output Control Block (or channel) number from 0 to 7. IOCB #0 is used by the Atari operating system for the screen editor, so it should normally not be used. An Atari DOS disk is one initialized in standard Atari DOS 2 format, whether in single, enhanced (dual), or double density, as produced by Atari DOS 2.0S and 2.5, MYDOS, other DOS 2 clones, and the SpartaDOS X Formatter when used in Atari DOS mode. d:, path, and fname.ext refer to any legal SpartaDOS X device identifier, pathname, and filename with extension as defined in chapter 4.
 

Notes on the Default Drive Please remember that D: from BASIC or another language refers to the default drive, not necessarily drive #1. From the command processor, D: refers to drive #4. With most other DOS types including earlier versions of SpartaDOS, D: represents D1:.

    OPEN #1,4,0,"D:TEST.TXT"

will open the file TEST.TXT on the default drive, not necessarily drive #1, for read under SpartaDOS X.
 

Accessing the "Kernel" Through CIO The D: device available through the CIO with SpartaDOS X is not just the disk drive handler; it is the handler for the SpartaDOS "kernel". Any "kernel" device may be accessed through the CIO from any application by preceding its name with D. For example,

    OPEN #3,8,0,"DPRN:"'

will open the printer for output. This also means that D4:, DD:, DD4:, DDD:, DDSK4:, and DDSKD: all refer to drive #4. When referring to a device other than a disk drive or the CAR: device, the fname.ext part of the syntax is ignored. If this confuses you just ignore it and use D1: - D9:, E:, P:, R:, and so on as you would with any other DOS.


Previous page

Next page