From: mintha@geog.ubc.ca (Jim Mintha)
Subject: Beginnings of a FAQ
Organization: University of British Columbia, Vancouver, B.C., Canada
Date: Wed, 22 Jul 1992 08:50:58 GMT

I had some spare time so I began to work on a FAQ for comp.sys.atari.st.tech
This is what I have come up with so far.  I was unsure as to how far to
extend the scope of this, but sections can be added/deleted as appropriate.
All comments and contributions are most welcome, and since this is a first
draft, I take absolutely no responsibility for the inevidable errors in this.
(not that I would anyway!)

My email address is: mintha@geog.ubc.ca  if you have problems with this then
you can try mailing to dorothy@presto.ig.com with some sort of note at the
start mentioning that this is for me (Jim Mintha)

(csas-FAQ refers to the comp.sys.atari.st FAQ)

Table of Contents:

0. Read the comp.sys.atari.st FAQ first
1. Programming

  1) Language Alternatives
    1) C Language
    2) GFA Basic

  2) Gnu Development System
    1) Overview & requirements
    2) What files are needed
    3) Installation
    4) Common Problems

  3) Operating System Specifics
    1) Where to get more info
    2) UNIXMODE - what is it

2. MiNT
  1) Overview
    1) What is MiNT
    2) What isn't MiNT (& what is MultiTOS)
    3) What do you need to run MiNT

  2) Installation
    1) What Files are needed
    2) Addition Files
    3) Setting up configuration files
    4) MGR

  3) Using MiNT
  4) Programming with MiNT
  5) Other Problems

3.  Hardware Mods
  1) Memory Upgrades
  2) Overscan
  3) Accelerators


And this is what I have so far in the way of answers/contents

1. Programming.

1.1.0) Language Alternatives

(From csas-FAQ)  Languages available for the Atari ST:

68000 assembly, abc, APL, awk, Basic, C, C++, Elan, Fortran,
Forth, Icon, Lisp, Modula2, OPS5, perl, Prolog, Scheme, 
Smalltalk, Xlisp, Xprolog, Xscheme

1.1.1) C Language

'C' is probably the most widely used language available on the
atari ST (For good or bad - no flames please)  There are a number of C
packages available, this is a non-exhaustive list of them, with 
their relative (de)merits. (+, and -'s)

Pure C (formerly Turbo C)

+ Full integrated environment
+ Fast and produces Good Code
+ Ansi compatible
+ Has integrated source debugger

- Documentation is still in German


Laser C

(Haven't tried it)

Gnu C (et. al.)

+ Available for free 
+ Produces good code
+ Source Debugger
+ Ansi compatible
+ Source Code available

- Requires at least 2.5 meg and a bunch hard drive space
- Not that fast

Sozobon C

+ Available for free
+ Source code available
+ Small (no hard drive needed/ 1Mb machine okay)

- Not ansi compatible
- Not that fast

Heat & Serve C

(someone explain what the difference here is?)


1.1.2) GFA Basic

(haven't used it)


1.2.1) Gnu Development System

The GNU package (GNU stands for Gnu's Not Unix) is a suite of program
that provide a complete development system.  It is available for quite
a number of computers.  (for more info on the GNU project check out
the newsgroup gnu.misc.discuss, or FTP information files on
prep.ai.mit.edu (pub/gnu/...))  The majority of the program have been
port to the ST thanks to the efforts of a number of people (insert
names of people who have done this - Bammi, etc.) (see csas-FAQ :GNU:)

System Requirements:

The Gnu C compiler requires at least 2.5 meg to compile anything more
than a Hello, World! program.  The bigger the program the more memory
(especially with optimization)

1.2.2) What Files are Needed

There are quite a number of files needed to get GNU up and running
these are the files I needed from atari.archive: 

Directories are at atari.archive in atari/gnustuff/tos (=~)

gcc21b02.zoo (~gcc/)       Binaries for C compiler
gccdoc.zoo (~gcc/)        Documentation for GCC
libolb80.zoo (~gnulib/)   Gnu Library files (binaries)
gmlibo23.zoo (~gemlib/)   Gem library files (binaries)
includ80.zoo (~include/)  Include files
pmlolb18.zoo (~pmathlib/) Math library files (binaries)
utlbin27.zoo (~util/)     Binaries of other program (gnu-ld gnu-as etc.)
gplibo07.zoo (~g++/)      G++ libraries (binaries) (for C++)
gpincl07.zoo (~g++/)      G++ include files (for C++)
crt.zoo (atari/new)*      startup files crt0.o and gcrt0.o (in new
                          directory until they are moved to the
                          correct spot.)
    

Notes:

The above is for version 2.1 of the compiler.  There are also binaries
for version 1.4, which also works well, and is a bit smaller.

Source files for all of the above can be found in the same
directories as the binaries.

The compiler (gcc) will compile both C, and C++ code (ver. 2.1 - 1.4
has separate programs gcc and g++)

1.2.3) Installation

How you install the files on your hard drive is somewhat dependent on
how you organize the layout of your hard drive, whether you are using
UNIXMODE (see section 1.3.2) and the phase of the moon.

The is the basic tree on my drive D:

d:\gnu\
       bin\
       lib\
       include\

Throw all the executables in bin, the library files in lib, and the
include files in include/gcc or include/g++

You will also need to set some environment variables.  How you do
this will depend on what shell you are using.

GNUINC is a comma separated list of directories where you put the
include files for the library.
GXXINC is a comma separated list of directories where you pu the
include files for the g++ library
GCCEXEC is the directory where the binary executables gcc-cc1.ttp
gcc-cpp.ttp, gcc-ld.ttp, etc. are located (must add the gcc- at
the end as gcc will look for $GCCEXEC + cc1.ttp etc.
TEMP is a directory where the compiler can write temporary files
(a ramdisk is good here)

setenv GNUINC 'd:\gnu\include\gcc'
setenv GNULIB 'd:\gnu\lib'
setenv GCCEXEC 'd:\gnu\bin\gcc-'
setenv GXXINC 'd:\gnu\include\g++'
setenv TEMP 'd:\tmp'

After all this you should be able to type

gcc -o hello hello.c   (provided hello.c exists :)

Notes:

If you are using gulam you should add
set env_style mw
to your gulam.g files

If you are using MiNT then you can use /dev/d instead of d:

You need to add the path to gcc.ttp to you path variable

If things don't work, try gcc -v which will tell you exactly
what it is doing

For C++ you need to add -lg++  for example:
gcc -o hello hello.cc -lg++


1.2.4) Common Problems

Prob:  Upon linking you get errors with references to a symbol _splitmem_
and other errors.
Answer:  Get the current version of crt0.o and gcrt0.o (If you can't
find them, you can get the source to the gnu libraries, and compile
crt0.c (gcc -c crt0.c) to get crt0.o)


1.3) Operating System Specifics

1.3.1) Where to find the information.

The best way to get a lot of information concerning the internals of
the operating system is to become a register developer.  You will then
get a whole bunch of documentation.

Alternatively the following files are available; (somewhere)

"Hitchhikers guide to the Bios" - describes all the bios, and xbios
calls.  As well as atari's VT52 emulation, and miscellaneous other
interesting stuff.  Can be found...??

"Gemdos Guide" - describes the gemdos calls

???

1.3.2) UNIXMODE

UNIXMODE is a method of providing access to longer files names under
TOS.  In a nutshell it maps longer names to TOS's 8.3 length.  It
keeps the mappings in a file called .dir in the same directory as the
file.  UNIXMODE is not a program in itself, but rather just an
environment variable.  If a program supports UNIXMODE then it will
allow you to use the longer file names, other programs will just use
the shorter TOS ones. 

Further documentation on the use of UNIXMODE can by found in
UNIXMODE.doc which is located somewhere on atari.archive

2. MiNT

2.1.1)  What is MiNT?

From the mint documentation:

...

mint section still being worked on

3. Hardware Modifications

I haven't done many hardware mods on my atari, so any info for this
section would be appreciated.  Commercial add-ons belong in csas-FAQ
rather than here.  This more homebrew kind of stuff.

Contributors:

Still to be done.

Jim

--
Jim Mintha                       Home: (604) 467-2148
mintha@geog.ubc.ca               Work: (604) 465-5074