<s>
SpartaDOS	B-Operating_System
X	I-Operating_System
(	O
or	O
SpartaDOS	O
4.0	O
)	O
is	O
a	O
disk	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
for	O
the	O
Atari	B-Device
8-bit	I-Device
family	I-Device
of	O
computers	O
that	O
closely	O
resembles	O
MS-DOS	B-Application
.	O
</s>
<s>
It	O
was	O
developed	O
and	O
sold	O
by	O
ICD	O
,	O
Inc	O
.	O
in	O
1987-1993	O
,	O
and	O
many	O
years	O
later	O
picked	O
up	O
by	O
the	O
third-party	O
community	O
SpartaDOS	B-Operating_System
X	I-Operating_System
Upgrade	O
Project	O
,	O
which	O
still	O
maintains	O
the	O
software	O
.	O
</s>
<s>
SpartaDOS	B-Operating_System
X	I-Operating_System
is	O
a	O
successor	O
to	O
SpartaDOS	O
1.0	O
,	O
2.0	O
and	O
3.0	O
(	O
also	O
ICD	O
products	O
)	O
and	O
while	O
it	O
enjoys	O
good	O
level	O
of	O
backward	O
compatibility	O
with	O
older	O
versions	O
,	O
it	O
is	O
a	O
completely	O
new	O
system	O
,	O
written	O
from	O
scratch	O
.	O
</s>
<s>
The	O
cartridge	B-Protocol
contained	O
an	O
additional	O
cartridge	B-Protocol
slot	O
on	O
itself	O
,	O
so	O
that	O
it	O
was	O
possible	O
to	O
plug-in	O
another	O
cartridge	B-Protocol
,	O
such	O
as	O
ICD	O
's	O
R-Time	O
8	O
battery-backed	O
clock	O
,	O
a	O
language	O
cartridge	B-Protocol
(	O
Action	O
!,	O
MAC/65	B-Application
etc	O
.	O
)	O
</s>
<s>
or	O
a	O
game	B-Protocol
cartridge	I-Protocol
,	O
and	O
use	O
it	O
in	O
conjunction	O
with	O
the	O
DOS	B-Device
.	O
</s>
<s>
Ten	O
years	O
later	O
development	O
of	O
SpartaDOS	B-Operating_System
X	I-Operating_System
,	O
then	O
considered	O
abandonware	O
,	O
was	O
picked	O
up	O
by	O
its	O
enthusiasts	O
,	O
as	O
SpartaDOS	B-Operating_System
X	I-Operating_System
Upgrade	O
Project	O
.	O
</s>
<s>
SpartaDOS	B-Operating_System
X	I-Operating_System
is	O
a	O
non-multitasking	O
operating	B-General_Concept
system	I-General_Concept
intentionally	O
modeled	O
after	O
and	O
closely	O
resembling	O
MS-DOS	B-Application
in	O
look	O
and	O
feel	O
.	O
</s>
<s>
It	O
consists	O
of	O
the	O
kernel	O
,	O
the	O
system	O
library	O
,	O
several	O
types	O
of	O
drivers	O
,	O
the	O
shell	B-Operating_System
(	O
called	O
COMMAND.COM	B-Operating_System
)	O
and	O
a	O
number	O
of	O
utility	O
programs	O
.	O
</s>
<s>
SpartaDOS	B-Operating_System
X	I-Operating_System
is	O
written	O
in	O
6502	B-General_Concept
machine	O
language	O
and	O
fits	O
into	O
a	O
128k	O
file-oriented	O
ROM	B-Protocol
cartridge	I-Protocol
.	O
</s>
<s>
There	O
is	O
full	O
support	O
for	O
Atari-type	B-Device
serial	I-Device
disk	I-Device
drives	I-Device
as	O
well	O
as	O
for	O
parallel	O
hard	O
drives	O
,	O
as	O
long	O
as	O
they	O
conform	O
to	O
Atari	O
standards	O
(	O
i.e.	O
</s>
<s>
as	O
long	O
as	O
they	O
use	O
the	O
"	O
plug-and-play	O
"	O
Parallel	B-Device
Bus	I-Device
Interface	I-Device
(	O
PBI	O
)	O
mechanism	O
implemented	O
in	O
the	O
ROM	B-Device
OS	O
of	O
the	O
XL/XE	O
computers	O
)	O
.	O
</s>
<s>
The	O
maximum	O
number	O
of	O
drives	O
(	O
or	O
hard	O
disk	O
partitions	O
)	O
connected	O
at	O
the	O
same	O
time	B-Device
is	O
15	O
as	O
of	O
version	O
4.40	O
(	O
9	O
in	O
earlier	O
versions	O
)	O
.	O
</s>
<s>
It	O
also	O
maintains	O
environment	O
variables	O
,	O
and	O
programs	O
may	O
request	O
files	O
to	O
be	O
searched	O
through	O
directories	O
specified	O
in	O
$PATH	B-Application
.	O
</s>
<s>
The	O
variables	O
also	O
control	O
some	O
settings	O
for	O
the	O
DOS	B-Device
as	O
well	O
as	O
for	O
programs	O
,	O
for	O
example	O
the	O
format	B-Application
of	O
date	O
and	O
time	B-Device
to	O
be	O
displayed	O
(	O
the	O
choice	O
is	O
between	O
the	O
"	O
European	O
"	O
DD-MM-YY	O
and	O
24-hour	O
clock	O
,	O
and	O
"	O
American	O
"	O
MM-DD-YY	O
and	O
12-hour	O
clock	O
)	O
.	O
</s>
<s>
Thanks	O
to	O
some	O
form	O
of	O
virtual	O
filesystem	B-Application
,	O
practically	O
any	O
filesystem	B-Application
can	O
be	O
directly	O
accessed	O
,	O
if	O
an	O
appropriate	O
filesystem	B-Application
driver	O
exists	O
and	O
was	O
loaded	O
to	O
the	O
memory	O
.	O
</s>
<s>
Up	O
to	O
eight	O
such	O
drivers	O
can	O
be	O
installed	O
at	O
a	O
time	B-Device
.	O
</s>
<s>
The	O
main	O
filesystem	B-Application
driver	O
(	O
fitting	O
within	O
less	B-Application
than	O
4.5	O
KB	O
)	O
can	O
search	O
directories	O
(	O
FFIRST/FNEXT	O
)	O
,	O
read/write	O
files	O
(	O
FREAD/FWRITE	O
)	O
,	O
retrieve	O
or	O
change	O
the	O
current	O
position	O
within	O
a	O
file	O
(	O
FTELL/FSEEK	O
)	O
,	O
retrieve	O
the	O
file	O
's	O
length	O
(	O
FILELENG	O
)	O
,	O
delete	B-Device
files	O
and	O
directories	O
(	O
REMOVE/RMDIR	O
)	O
,	O
rename	B-Device
files	O
and	O
directories	O
(	O
RENAME/RENDIR	O
)	O
,	O
make	B-Application
directories	I-Application
(	O
MKDIR	B-Application
)	O
,	O
change	O
attributes	O
in	O
files	O
and	O
directories	O
(	O
CHMOD	B-Application
)	O
,	O
change	O
current	O
directory	O
(	O
CHDIR	B-Application
)	O
,	O
retrieve	O
path	B-Application
to	O
current	O
directory	O
(	O
GETCWD	O
)	O
,	O
collect	O
information	O
about	O
the	O
disk	O
(	O
GETDFREE	O
)	O
,	O
and	O
make	O
a	O
binary	O
file	O
bootable	O
(	O
SETBOOT	O
)	O
.	O
</s>
<s>
It	O
also	O
maintains	O
the	O
queued	O
buffer	O
cache	O
that	O
can	O
hold	O
up	O
to	O
16	O
sectors	O
(	O
8	O
KB	O
)	O
at	O
a	O
time	B-Device
.	O
</s>
<s>
The	O
proprietary	O
file	B-Application
system	I-Application
format	B-Application
,	O
called	O
SpartaDOS	O
FS	O
(	O
unrelated	O
to	O
and	O
not	O
compatible	O
with	O
MS-DOS	B-Application
FAT	B-Application
)	O
,	O
offers	O
full	O
support	O
for	O
subdirectories	O
,	O
MS-DOS-like	O
attributes	O
(	O
AHPS	O
:	O
Archived	O
,	O
Hidden	O
,	O
Protected	O
,	O
Subdirectory	O
)	O
,	O
modification	O
date	O
and	O
time	B-Device
stamps	O
,	O
random	O
access	O
to	O
data	O
within	O
a	O
file	O
,	O
sparse	B-General_Concept
files	I-General_Concept
.	O
</s>
<s>
The	O
file	O
naming	O
convention	O
is	O
8+3	O
(	O
this	O
scheme	O
,	O
inherited	O
from	O
CP/M	B-Application
,	O
is	O
normal	O
on	O
Atari	O
)	O
.	O
</s>
<s>
The	O
file	B-Application
system	I-Application
is	O
16-bit	O
:	O
a	O
drive	O
can	O
contain	O
up	O
to	O
65,535	O
logical	O
sectors	O
(	O
sector	O
0	O
does	O
not	O
exist	O
on	O
Atari	O
disks	O
)	O
.	O
</s>
<s>
The	O
system	O
library	O
contains	O
a	O
binary	O
loader	O
supporting	O
standard	O
,	O
address-dependent	O
Atari	O
binaries	O
as	O
well	O
as	O
SpartaDOS	B-Operating_System
X	I-Operating_System
address-independent	O
(	O
"	O
relocatable	O
"	O
)	O
binary	O
files	O
.	O
</s>
<s>
It	O
also	O
facilitates	O
such	O
tasks	O
as	O
error	O
handling	O
,	O
parsing	O
the	O
command	B-Application
line	I-Application
,	O
as	O
well	O
as	O
managing	O
memory	O
,	O
file	O
and	O
device	O
resources	O
etc	O
.	O
</s>
<s>
The	O
library	O
also	O
contains	O
a	O
menu-driven	O
disk	O
formatter	O
,	O
that	O
can	O
be	O
invoked	O
at	O
any	O
time	B-Device
,	O
not	O
only	O
from	O
the	O
DOS	B-Device
 '	O
Command	B-Operating_System
Processor	O
,	O
but	O
also	O
from	O
within	O
an	O
application	O
program	O
.	O
</s>
<s>
The	O
entire	O
library	O
occupies	O
24	O
KB	O
of	O
the	O
cartridge	B-Protocol
(	O
in	O
three	O
banks	O
,	O
8	O
KB	O
each	O
)	O
and	O
can	O
be	O
switched	O
off	O
as	O
necessary	O
to	O
release	O
some	O
memory	O
.	O
</s>
<s>
The	O
SpartaDOS	B-Operating_System
X	I-Operating_System
default	O
user	O
interface	O
is	O
a	O
command-line	B-Application
interpreter	O
with	O
the	O
same	O
name	O
as	O
the	O
one	O
used	O
by	O
MS-DOS	B-Application
:	O
COMMAND.COM	B-Operating_System
.	O
</s>
<s>
The	O
SpartaDOS	B-Operating_System
X	I-Operating_System
COMMAND.COM	B-Operating_System
program	O
is	O
less	B-Application
than	O
4	O
KB	O
and	O
includes	O
roughly	O
45	O
internal	O
commands	B-Application
such	O
as	O
DIR	B-Device
,	O
CD	B-Application
,	O
DEL	B-Device
etc	O
.	O
</s>
<s>
I/O	B-Device
redirection	I-Device
uses	O
"	O
<<" and ">>" instead of "<" and ">" of UNIX and other systems (this is because the ">	O
"	O
sign	O
is	O
the	O
SpartaDOS	O
native	O
path	B-Application
separator	O
)	O
.	O
</s>
<s>
Pseudo-pipelines	O
are	O
available	O
as	O
of	O
SpartaDOS	B-Operating_System
X	I-Operating_System
version	O
4.42	O
.	O
</s>
<s>
The	O
environment	O
variable	O
$COMSPEC	O
may	O
point	O
to	O
an	O
alternative	O
command-line	B-Application
interpreter	O
,	O
to	O
be	O
loaded	O
instead	O
of	O
COMMAND.COM	B-Operating_System
.	O
</s>
<s>
Additional	O
utility	O
,	O
called	O
RUNEXT	O
,	O
allows	O
to	O
associate	O
data	O
types	O
with	O
programs	O
to	O
be	O
invoked	O
automatically	O
,	O
when	O
the	O
user	O
enters	O
the	O
name	O
of	O
the	O
data	O
file	O
at	O
the	O
DOS	B-Operating_System
prompt	I-Operating_System
and	O
hits	O
the	O
Return	O
key	O
.	O
</s>
<s>
A	O
program	O
called	O
MENU	O
facilitates	O
complex	O
file	O
management	O
tasks	O
and	O
can	O
serve	O
as	O
a	O
replacement	O
shell	B-Operating_System
.	O
</s>
<s>
Other	O
utilities	O
allow	O
to	O
change	O
disk	O
names	O
,	O
search	O
disks	O
for	O
files	O
,	O
undelete	O
them	O
,	O
install	O
keyboard	B-Device
buffer	I-Device
,	O
edit	O
system	O
files	O
(	O
CONFIG.SYS	B-Device
and	O
AUTOEXEC.BAT	O
)	O
and	O
so	O
on	O
.	O
</s>
<s>
A	O
port	O
of	O
ARC	B-Application
provides	O
file	O
compression	O
facilities	O
.	O
</s>
<s>
Among	O
the	O
dedicated	O
programs	O
,	O
which	O
are	O
not	O
directly	O
available	O
on	O
the	O
cartridge	B-Protocol
and	O
thus	O
are	O
not	O
bundled	O
with	O
DOS	B-Device
itself	O
,	O
there	O
are	O
disk	O
editors	O
available	O
as	O
well	O
as	O
utilities	O
to	O
check	O
and	O
repair	O
filesystem	B-Application
consistency	O
.	O
</s>
<s>
The	O
following	O
commands	B-Application
are	O
supported	O
by	O
SpartaDOS	B-Operating_System
X	I-Operating_System
.	O
</s>
<s>
At	O
startup	O
,	O
a	O
text	O
file	O
called	O
CONFIG.SYS	B-Device
is	O
read	O
from	O
the	O
boot	O
disk	O
.	O
</s>
<s>
The	O
contents	O
of	O
the	O
file	O
decides	O
,	O
which	O
memory	O
the	O
DOS	B-Device
will	O
use	O
to	O
keep	O
the	O
bulk	O
of	O
its	O
code	O
and	O
drivers	O
(	O
the	O
choice	O
is	O
between	O
the	O
extended	O
memory	O
and	O
two	O
areas	O
of	O
the	O
conventional	O
64K	O
)	O
,	O
how	O
many	O
files	O
can	O
be	O
opened	O
at	O
a	O
time	B-Device
,	O
the	O
size	O
of	O
the	O
buffer	O
cache	O
and	O
its	O
location	O
in	O
the	O
memory	O
(	O
same	O
choices	O
as	O
for	O
the	O
DOS	B-Device
code	O
)	O
,	O
the	O
default	O
environment	O
variables	O
,	O
and	O
which	O
drivers	O
to	O
load	O
.	O
</s>
<s>
When	O
no	O
CONFIG.SYS	B-Device
file	O
is	O
present	O
,	O
the	O
default	O
one	O
is	O
loaded	O
from	O
the	O
cartridge	B-Protocol
.	O
</s>
<s>
It	O
is	O
a	O
batch	O
file	O
that	O
is	O
run	O
by	O
the	O
COMMAND.COM	B-Operating_System
,	O
when	O
the	O
COMMAND.COM	B-Operating_System
is	O
loaded	O
for	O
the	O
first	O
time	B-Device
.	O
</s>
<s>
SpartaDOS	B-Operating_System
X	I-Operating_System
requires	O
an	O
Atari	B-Device
8-bit	I-Device
(	O
400	O
,	O
800	O
or	O
XL/XE	O
models	O
)	O
computer	O
equipped	O
with	O
at	O
least	O
48	O
KB	O
of	O
conventional	O
memory	O
to	O
run	O
,	O
or	O
64	O
KB	O
to	O
be	O
truly	O
usable	O
(	O
on	O
a	O
48K	O
machine	O
there	O
is	O
too	O
little	O
memory	O
left	O
as	O
to	O
execute	O
most	O
programs	O
)	O
.	O
</s>
<s>
The	O
DOS	B-Device
can	O
use	O
the	O
extended	O
memory	O
to	O
keep	O
large	O
portion	O
of	O
its	O
code	O
,	O
buffer	O
cache	O
and	O
internal	O
structures	O
thus	O
releasing	O
the	O
conventional	O
memory	O
.	O
</s>
<s>
Unlike	O
its	O
predecessor	O
,	O
SpartaDOS	O
3.0	O
,	O
SpartaDOS	B-Operating_System
X	I-Operating_System
is	O
not	O
what	O
is	O
commonly	O
referred	O
to	O
as	O
a	O
"	O
DOS	B-Device
"	O
in	O
Atari	B-Device
8-bit	I-Device
parlance	O
.	O
</s>
<s>
The	O
Atari	B-Device
8-bit	I-Device
Operating	B-General_Concept
System	I-General_Concept
consists	O
of	O
two	O
main	O
parts	O
:	O
the	O
ROM-based	O
"	O
OS	O
"	O
and	O
bootable	O
"	O
DOS	B-Device
"	O
.	O
</s>
<s>
The	O
common	O
misconception	O
about	O
that	O
division	O
is	O
that	O
these	O
respective	O
parts	O
correspond	O
to	O
BIOS	B-Operating_System
and	O
DOS	B-Device
on	O
an	O
IBM	O
PC	O
compatible	O
machine	O
.	O
</s>
<s>
In	O
reality	O
the	O
"	O
OS	O
"	O
is	O
responsible	O
for	O
communication	O
not	O
only	O
with	O
the	O
block	O
devices	O
(	O
like	O
PC	B-Operating_System
BIOS	I-Operating_System
)	O
,	O
but	O
also	O
for	O
character	O
devices	O
,	O
including	O
file-oriented	O
ones	O
(	O
like	O
PC	O
DOS	B-Device
)	O
.	O
</s>
<s>
Consequently	O
,	O
all	O
the	O
file	O
management	O
functions	O
are	O
centralized	O
in	O
the	O
"	O
OS	O
"	O
-part	O
,	O
and	O
the	O
"	O
DOS	B-Device
"	O
-part	O
is	O
only	O
one	O
of	O
its	O
subordinated	O
device	O
drivers	O
,	O
that	O
performs	O
on	O
a	O
mass-storage	O
media	O
(	O
like	O
floppy	O
disk	O
)	O
.	O
</s>
<s>
A	O
"	B-Operating_System
DOS	I-Operating_System
"	I-Operating_System
for	I-Operating_System
Atari	I-Operating_System
,	O
then	O
,	O
typically	O
consists	O
of	O
the	O
aforementioned	O
device	O
driver	O
(	O
called	O
FMS	O
,	O
"	O
File	O
Management	O
System	O
"	O
)	O
,	O
and	O
an	O
application	O
program	O
playing	O
the	O
role	O
of	O
the	O
OS	O
shell	B-Operating_System
.	O
</s>
<s>
This	O
shell	B-Operating_System
is	O
typically	O
called	O
DUP	O
,	O
"	O
Disk	O
Utility	O
Package	O
"	O
.	O
</s>
<s>
All	O
the	O
communication	O
between	O
the	O
user	O
programs	O
(	O
including	O
the	O
DUP	O
)	O
and	O
FMS	O
goes	O
through	O
the	O
CIO	O
(	O
"	O
Central	O
Input/Output	O
"	O
)	O
residing	O
in	O
ROM	B-Device
.	O
</s>
<s>
Such	O
a	O
design	O
has	O
some	O
shortcomings	O
,	O
for	O
example	O
,	O
no	O
typical	O
DOS	B-Device
is	O
able	O
to	O
keep	O
more	B-Device
than	O
eight	O
files	O
opened	O
at	O
a	O
time	B-Device
,	O
because	O
this	O
is	O
the	O
limit	O
imposed	O
by	O
the	O
API	B-General_Concept
of	O
the	O
ROM-based	O
"	O
OS	O
"	O
.	O
</s>
<s>
Now	O
SpartaDOS	B-Operating_System
X	I-Operating_System
,	O
even	O
though	O
it	O
is	O
registered	O
in	O
the	O
ROM-based	O
CIO	O
as	O
a	O
device	O
driver	O
and	O
(	O
for	O
backward	O
compatibility	O
)	O
performs	O
all	O
typical	O
DOS	B-Device
functions	O
as	O
requested	O
that	O
way	O
,	O
is	O
in	O
fact	O
independent	O
of	O
the	O
CIO	O
.	O
</s>
<s>
Instead	O
,	O
it	O
has	O
own	O
"	O
I/O	O
centre	O
"	O
(	O
known	O
as	O
"	O
the	O
kernel	O
"	O
)	O
,	O
not	O
related	O
to	O
the	O
ROM-based	O
OS	O
,	O
with	O
own	O
set	O
of	O
specifiers	O
and	O
drivers	O
for	O
both	O
character	O
devices	O
(	O
like	O
CON	O
:	O
or	O
COM	O
:	O
)	O
and	O
block	O
devices	O
.	O
</s>
<s>
Under	O
SpartaDOS	B-Operating_System
X	I-Operating_System
programs	O
can	O
perform	O
all	O
the	O
I/O	O
operations	O
through	O
the	O
SpartaDOS	O
kernel	O
bypassing	O
the	O
Atari	O
OS	O
in	O
ROM	B-Device
completely	O
.	O
</s>
<s>
there	O
can	O
be	O
as	O
many	O
as	O
16	O
files	O
opened	O
at	O
a	O
time	B-Device
.	O
</s>
<s>
This	O
also	O
makes	O
SpartaDOS	B-Operating_System
X	I-Operating_System
(	O
unlike	O
,	O
for	O
example	O
,	O
its	O
predecessor	O
SpartaDOS	O
3.2	O
,	O
or	O
any	O
other	O
DOS	B-Device
for	O
Atari	O
)	O
an	O
operating	B-General_Concept
system	I-General_Concept
,	O
not	O
just	O
another	O
device	O
driver	O
with	O
some	O
sort	O
of	O
a	O
shell	B-Operating_System
.	O
</s>
