!pr3
!or1
Macintosh Assemblers.................................Lane Hauck
                                                  San Diego, CA

I have the privilege* of Beta testing two 68000 assemblers for the Macintosh -- the one from Apple (Workshop), and the one from Mainstay.  Mainstay is the "serious" side of Funsoft.

* (If you are masochistic, and enjoy little surprises like alert boxes with no messages or GoAwayButtons in them, frequent crashes, and system fonts abruptly changing; you too might want to become a Beta Tester.)

I've gotten permission from both Apple and Mainstay to talk about these products.  The versions I'm testing are preliminary, and therefore subject to change.

The Workshop is in "version 0.6" release, and is expected to be available about October (I'd guess November).  The Mainstay product is scheduled for early October release, and judging from their staff and working hours, I think they'll make it.  (I visited them in Agoura, CA, and found a very smart and hard working group of programmers.)

Although both assemblers do the same thing -- translate 68000 source programs into runnable programs on the Macintosh -- they couldn't be more different in how they operate!


The Apple Assembler

The Workshop has several parts.  EDIT, ASM, LINK and EXEC are four applications that do the actual code development.  Additionally, RMAKER creates resource files from text source files created by EDIT.  And finally, MacDB and its associated "Nub" programs provide debug support for when your code doesn't run.

The development system can run on one drive, but two are highly recommended.

EDIT:  This is a DISK BASED editor, so the short document frustrations of MacWrite are avoided.  Additionally, you can open up to four documents, and cut and paste between them (a la Lisa)!  This is a bare bones (but wonderful) editor, without fancy fonts or formatting.  One improvement over the Lisa editor:  it has a "reverse tab" -- hitting backspace from a tab stop takes you back not one space, but back one tab position.  This is a great convenience when you're entering formatted source code.

ASM:  Supports conditional assembly, macros (both "Lisa-type" and new "Mac-type").  It's tailored to the Mac development environment (for example it helps you write relocatable code).

Toolbox support is provided by special, compressed equate files (they are compressed by a program called PacSyms, which you can use to compress your own equate files).  The Workshop provides all the Trap and symbol equates mentioned in Inside Macintosh.

LINK:  Links ".REL" code modules produced by the Assembler, and (eventually -- not working yet) output files from RMAKER to produce a final file, complete with your code and resources.  Takes its direction from a ".LINK" text file.

EXEC:  Lets you automate the entire ASM-LINK process.  One great improvement over the Lisa version:  you can direct EXEC to reenter the editor if any assembly or link errors occur.

FIVE debuggers are supplied.  MacDB is the best, most visible debugger I'ver ever seen.  It requires two Macs (or one Mac and a Lisa running MacWorks).  The Workshop will be supplied with an interconnect cable for two Macs.  Other debugger versions (which don't require the second Mac) let you debug from an 8-line onscreen window on the Mac, and from any remote terminal.

This is a professional, complete, "industrial strength" 68000 assembly language development package.  Its utilization of the Macintosh environment is total and outstanding.  My only real quibble is that it takes a fair amount of time (a few minutes) to "turn" one cycle from EDIT to running the new code.  A hard disk would presumably improve this greatly.

If you're an "interactive" programmer who likes to make changes and see their results QUICKLY, you might be interested in the Mainstay Assembler.


The Mainstay Assembler

If you've ever used any of the assemblers for the Apple II from S-C Software, you'll feel right at home with the Mainstay environment.  It's patterned after the S-C 68000 Cross Assembler, and it looks and feels just like you're running on an Apple //e!

The fact that none of the Macintosh interface is used will bother some, especially the Mac purists.  Mainstay's intention is to get a quality assembler to market quickly, and the approach they've taken allows this to happen.  I don't mind non-fidelity to the Mac interface in a DEVELOPMENT product -- we developers are EXPECTED to put up with all sorts of indignities!

This is an absolute assembler, meaning that your code module is produced with an address origin, and it is loaded and run at that address.  It does not produce "linkable" code modules, as does the Apple Workshop Assembler.  In fact no linker is supplied or required.

The Editor is built in, and it functions much like the Apple II.  The cursor is moved around with keyboard commands.  The Editor has BASIC-like line numbers and the normal complement of line-number oriented commands (RENumber, COPY, MOVE, etc.).

Resources are handled right inside your source code (remember there is only one code "module").  This is more convenient than the Apple "RMAKER" approach.

The Assembler supports conditional assembly, macros, and local labes.  It takes a novel approach in how it is installed and run on the Macintosh.

When you start the Assembler, it grabs a large chunk of memory from the application heap, and uses it for storing the symbol table, source code, and object code.  Typing MEM shows you exactly where these three memory areas are.  While you're in the Assembler environment, your code "stays put", so you can deal with absolute addresses without fear that the memory manager will move things around on you.

This means that you can edit, assemble, and test your code IMMEDIATELY, without goin through a linking and (optionally) a resource compiling step.  This is the primary strength of this assembler -- it allows "quicklook" programming which is ideal for experimentation and learning the Macintosh system.

Eventually you will want to make your application an "installable" Macintosh program, so you should get into the habit of writing position independent code.  The Mainstay package will supply the tools necessary to make your application runnable on the Mac.  It will also contain Toolbox and Operating System equate files.

There are some nice "Apple II-like" features, such as typing DIR to look at the disk catalog.  In the Mac environment, you have to exit the application and get back to the desktop to see your files.  You can also type "EJECT" and eject a disk immediately.  I like to do this just before running new code, to protect disks from my runaway test programs that mysteriously fire up the disk drive.

Having this assembler, a Mac, and a copy of INSIDE MACINTOSH might just be the most efficient way to learn the Macintosh.  The prime benefit of this assembler is its very high speed in moving between editing, assembling, and running your test code.


Which One?

Which assembler would I recommend?  At this stage I'd have to give the universal Computer Salesman answer:  "It depends."

The Apple one allows you to write separate code modules, assemble them, and then link them together later.  This allows you to utilize already written and debugged modules in new programs.

Another advantage of the "linker" approach is that a single module can be changed and reassembled, and then linked to other already-debugged modules.  This saves reassembling the whole shebang every time you make a change.

If you like this "relocatable assembler" approach, you'll want the Apple Assembler.  (If you're comfortable with the Lisa Assembler, ditto.)

The Mainstay Assembler, by contrast, is an absolute assembler - it puts code at a particular place in memory (set by an ORG - origin statement), and allows only one "module" -- your entire program. (Better write relocatable code if you want it to run as an application, though!)

The Mainstay Assembler is so fast (especially if you put a "LIST OFF" directive at the beginning of your code), that it negates the speed advantage of the linked module approach.  I would guess that it takes you from source code edit to running reassembled code in about one-twentieth the time required by the Apple Assembler.  if you're an "interactive" programmer who likes to see results of program changes FAST, the Mainstay Assembler is for you.

If time is a factor, the Mainstay product will ship within a week; the Apple Assembler is supposed to come out in October, but I doubt it.

If you're unhappy with "non-Mac-user-interface" products, you're better off with the Apple version.  The operation of the Mainstay assembler is a bit strange at first, but anyone with Apple II roots will adjust quickly.

Here's a factor I consider very important:  Apple is a "Pascal house" with almost no support given to assembly language programming of the Macintosh.  I've found their support in this area dismal.

The Mainstay Assembler is a major committment by this small company.  I've had quite a bit of technical interaction with them, and have found them to be very intelligent, motivated, and responsive.  I've had indications that you'll be able to expect not only Assembler support from Mainstay, but also some Macintosh support as well.

--------

[  10/15 -- The folks at Mainstay tell me they started shipping last week, so we should have some copies for sale by the time you read this.  The introductory price is $100. -- Bill  ].
