[comp.sys.atari.st] GST Assembler preview

braner@batcomputer.tn.cornell.edu (braner) (01/07/87)

[]

Here is my FIRST IMPRESSION of the GST Macro Assembler (for the Atari ST),
especially in comparision to A-Seka.

I am NOT affiliated with anybody.

I will register various complaints, but let me note in advance the big
PLUS:  GST ASM is a complete and working product.  It includes an editor,
macro assembler, linker, and a "graphical shell" program.

The shell is a GEM program that supplies the user with drop-down menus
allowing invocation of the other parts, setting up options for the assembler
and linker, and running other programs.  A window displays a log of what
has been done: each command invoked via the menus prints a line on the log.
That looks sort of like the screen of a command-line-interpreter, after some
commands have been entered (less the text cursor...).  The shell program is
about 49K long (total of 3 parts).

The editor is sort of like 1st word, but without the WP features not needed
for program editing.  You are not forced to use that editor - I used
microEMACS.  It is about 51K long.

The assembler (31K) and linker (20K) are similar in approach: they are
invoked with some arguments: the name of the file to assemble or
link, and various options.  They can be used from the graphical shell,
the desktop, or a command-line shell such as micro-C-Shell, as follows:
The graphical shell arranges for the argument passing somehow, and these
programs do their things after opening GEM windows, one after the other.  
(There is a menu choice to invoke the two in sequence.)
If named .TOS and invoked from the desktop, they ask for arguments after
the invocation.  (The two programs have to be invoked separately.)
If they are named .TTP, they look at the command-line for the arguments.
(In micro-C-Shell the user may arrange a shell script to invoke the two
in sequence with one command-line.)

The assembler allows absolute or relative modes, with no need to write
'(PC)' everywhere when relative is wanted.  It also optimizes branches to
the short form automatically (unless you write BRA.L explicitly) but
FOR FORWARD REFERENCES ONLY.

The assembler provides extensive macro capabilities, and also include files.
Some example programs and macro files are on the disk, including a macro
package that allows "structured assembly code" (with IF/ELSE/ENDIF,
REPEAT, UNTIL, FOR, SWITCH, etc).

The linker (and the shell) will work with the various GST high-level-
language compilers (e.g. GST C), and some provisions are there for easy
interface between assembler and high-level code (e.g. FORTRAN-style
'common blocks').

Now the complaints:

Both the assembler and the linker are 'two-pass': they read their input
twice.  A RAMdisk is strongly recommended!!  The speed on a RAMdisk is OK,
practically instantaneous for SHORT source files.  But not quite as fast as
A-Seka (which is one integrated RAM-resident program, cramming editor,
assembler and linker into one 20K file!)

The assembler refuses to eat TAB characters (ASCII 9), anywhere outside
comments.  You get an ERROR report, and no output.  A-Seka did SOME wierd
things with tabs, but this is RIDICULOUS!!!

There is supposed to be a way of producing an executable file directly
from the assembler, without linking.  But it turns out that the programmer
has to write position-independent code (makes sense) and to include the
TOS program header (the 14 bytes with the sizes of the segments, etc.)
explicitly in the code (as DC instructions).  So this option is not very
useful...  (But the extra linking step is quite painless...) (A-Seka does
the linking as part of the one quick step.)

When I invoked microEMACS from the graphical shell, the mouse cursor was not
turned off.  On the other hand, the text cursor stayed on after leaving
microEMACS... (Perhaps it's my fault in not doing it inside m.e., but it's
a .TTP program: the caller should?)  Also: when invoking a .TTP program
(e.g. microEMACS) from the graphical shell, I did not get a chance to enter
the command line arguments.  (Perhaps you can fix that by renaming me.ttp
edit.prg and invoking it via the 'edit' menu item.  Havn't tried yet.)
(A-Seka is a closed environment: you have to return to the desktop and
then invoke microEMACS, although that is quick and easy on a RAMdisk.)

The errors found during assembly are logged to a file.  You can then use
the editor (opening two text windows) to correct the source, then try
again. (A-Seka stops on the first error, and then a single <ESC> puts
you, instantly, in the screen editor on the bad line.  You can correct it,
then retry the assembly with a <ESC> A <RETURN>.)

There doesn't seem to be a way to set up BSS (stack, heap) space from
inside the assembler source code.  You have to tell the LINKER how much
space you want - and you have to calculate that amount yourself.
(A-Seka allows a BLK instruction for alloting space beyond the program
code area.  BUT: the version of A-Seka I tried failed to express that
in the TOS program header BSS size field.)

GST ASM comes with a 6 by 9 inch spiral-bound 171-page manual.  It is a
REDUCED reprint of a letter-quality printout, a bit small for my eyes.
It has separate sections for the assembler, linker and editor.  The pages
do have numbers, but each section has a one-page table of contents with
subsection numbers only - not the page numbers!  And: NO INDEX (arghhh!!!)

In conclusion:

GST Macro Assembler is not perfect, but quite usable for the creation
of ST programs, large and small.  It is reasonably fast if put on a
RAM disk.  And it is compact: you should be able to run it WITH A RAM DISK
on a 512K machine.  The flexibility in choosing a user interface is an
example to be followed.  I hope the above-mentioned problems will be
fixed.

Religious note:

Personally, I like the RAM-resident approach, and put high priorities on
speed and interaction: the approach taken by A-Seka.  Too bad the early
versions of A-Seka were full of bugs.  I would still like to hear whether
A-Seka has been finished-up.


- Moshe Braner

ref0070@ritcv.UUCP (Bob Fortin) (01/07/87)

In article <1959@batcomputer.tn.cornell.edu> braner@batcomputer.UUCP (braner) writes:
>[]
>
>Here is my FIRST IMPRESSION of the GST Macro Assembler (for the Atari ST),
>especially in comparision to A-Seka.
>
>I am NOT affiliated with anybody.
>

Is the shell mentioned the MENU+ shell, and are the object files compatible 
with Lattice C ?


Bob Fortin
{allegra seismo decvax}!rochester!ref0070