.\" ENVIRONMENTS: TOS
.TH "Atari-specific features" "" "" "Overview"
.PC
.PP
The following entries in the Lexicon
describe features of \*(PN that relate specifically to the Atari ST:
.RS
.IP \fBAES\fR 0.6i
This describes the GEM Application Environment System (AES),
which allows the programmer to use predefined windows, icons,
pull-down menus, and other GEM elements.
It also lists and briefly describes all of the AES routines.
Each AES routine has its own entry within the Lexicon.
.IP "\fBarchives\fR"
.br
\*(PN includes a number of archives of source code.
These archives demonstrate how to build large programs with \*(PN.
.IP \fBbios\fR
This entry describes the \*(OS function
.BR bios ,
and introduces the functions that use it
to manipulate the Atari ST's BIOS.
.IP "\fBcommands\fR"
.br
This lists the commands that can be used with the micro-shell \fBmsh\fR.
.IP "\fBdesk accessory\fR"
.br
This entry describes how to compile a GEM
desk accessory.
.IP "\fBexamples\fR"
.br
\*(PN includes source code for smaller example programs.
.IP \fBgemdos\fR
This entry describes the \*(OS function
.BR gemdos ,
and introduces the functions that use it
to manipulate GEM-DOS.
.IP "\fBtechnical information\fR"
.br
This manual also includes a number of articles that given information
about the 68000 and the Atari ST.
These include information about the keyboard, the line A functions,
screen control, and system addresses.
.IP \fBVDI\fR
This describes the GEM Virtual Device Interface (VDI),
which gives the user access to basic graphics routines.
It also lists and describes briefly all of the VDI routines;
each VDI routine also has its own entry within the Lexicon.
.IP \fBxbios\fR
This entry describes the \*(OS function
.BR xbios ,
and introduces the function
that use it to manipulate the Atari ST's extended
BIOS.
.RE
.SH "Compiling TOS Programs"
You can include the AES/VDI libraries in your compilations
in any of three ways.
.PP
First, you can include the libraries with the
.I library
option to the
.B cc
command line.
To compile the program
.BR sample.c ,
use the following form of the 
.B cc
command line:
.DM
	cc sample.c -laes -lvdi
.DE
.PP
The
.B \-l
option is described in the Lexicon entry for
.BR cc .
.PP
The other two methods involve using a switch on the
.B cc
command line.
.II "cc^\-VGEM"
.B \-VGEM
is used to create an ordinary GEM program.
It automatically links in the AES and VDI libraries, and calls
the special run-time start-up routine
.BR crtsg.o .
For example, to use the
.B \-VGEM
option to compile
.BR sample.c ,
use the following command line:
.DM
	cc \-VGEM sample.c
.DE
.II crtsg.o
.PP
.B crtsg.o
has the advantage of being smaller, faster, and simpler
than the default run-time start-up routine,
.BR crts0.o .
Note, however, that it differs from the default runtime startup
.B crts0.o
in the following ways:
.RS
.IP \fB1.\fR
.BR argv ,
.BR argc ,
and
.B envp
are all set to zero.
.IP \fB2.\fR
.B getenv
is not enabled; this means programs that use
.B crtsg.o
cannot read environmental parameters.
.IP \fB3.\fR
.B stderr
will send error messages to the auxiliary ports rather to
the console.
.RE
.PP
.II "cc^\-VGEMACC"
.B \-VGEMACC
is used to create a GEM desktop accessory.
It works in much the same way as
.BR \-VGEM ,
except that it uses the run-time start-up routine
.II crtsd.o
.B crtsd.o
instead of
.BR crtsg.o .
.PP
The source files for
.B crtsd.o
and
.B crtsg.o
are included with your copy of \*(PN,
should you wish to enhance it.
.PP
Finally, 
.B libaes.a
uses
the routine
.B crystal.o
to call traps.
This routine is
.I never
called by the programmer, but it is automatically linked
with
.BR libaes.a .
.SH "See Also"
.B
AES, archive, bios, command, example, gemdos, Lexicon,
system addresses, technical information, xbios
.R
