Atari Assembler Editor
- Medium
- Cartridge
- Year
- 1981
- Publisher
- Atari, Inc. (also Atari Elektronik, Atari Italia)
- Type
- Development tool
- Category
- 6502 assembler, editor and debugger cartridge
- Developer
- Shepardson Microsystems, Inc. (Kathleen O'Brien)
- Language
- 6502 machine language
- Requirements
- Atari 400/800/XL/XE; 8K ROM cartridge (CXL4003); cassette or disk drive for saving source and object code
- Tags
- assembler, 6502, cartridge, atari-inc, shepardson, debugger, programming, beginner
Overview
The Assembler Editor cartridge was Atari's own machine-language development kit for the 400 and 800. One 8K ROM holds three programs. The first is an editor: you type numbered source lines, much as you would in BASIC. The second is an assembler, which turns those lines into 6502 object code in memory, on cassette or on disk. The third is a debugger, which lets you run, trace and patch the result. Professionals wrote it off almost at once, but it was cheap and it was a cartridge, so it needed no disk drive or extra memory. Owners who wanted more than BASIC usually started here. Mark Chasin wrote every example in his 1984 tutorial Assembly Language Programming for the Atari Computers for this cartridge because it was "the most widely owned" assembler. Don and Kurt Inman's The Atari Assembler (1981) is a whole book built around it.
Behind the scenes
Atari BASIC and the Assembler Editor came from the same contractor, Shepardson Microsystems, Inc. (SMI). Kathleen O'Brien wrote the Assembler Editor; she also wrote Atari BASIC's floating-point routines. Atari promised the cartridge at the January 1980 CES. It had been announced earlier as Assembler Debug, and it shipped in early 1981. The US release was CXL4003; there were also Atari Elektronik (Germany, RXG4003) and Atari Italia editions.
In February 1981 SMI sold the source code of BASIC, DOS 2.0S's file manager and the Assembler Editor to the newly founded Optimized Systems Software. In April OSS introduced EASMD, an enhanced disk-based version. EASMD in turn led to MAC/65, whose manual describes it as a direct descendant of the cartridge "via EASMD".
How it works
When you power up, the cartridge shows an EDIT prompt. Every source line starts with a line number (0–65535). One space after the number begins the label field. If a line has no label, leave two spaces before the opcode, or the assembler will take the mnemonic for a label:
10 *= $0600 ;origin: page 6
20 FREQ = $9F
30 LOOP LDA FREQ ;label after one space
40 ROR A ;accumulator mode needs the explicit A
50 .BYTE "HELLO",$9B
60 .END
Editor commands
LIST [n[,m]] · NUM [start,]step (auto line numbers) · REN · DEL n[,m] · REP/old/new/[,A] (replace text, ,A for all occurrences) · NEW · SIZE (shows the buffer start, end of source and top of RAM) · LOMEM (moves the source buffer; it must be the first command after power-up). SAVE, LOAD, LIST and ENTER work with cassette (C:), disk (D:) or printer.
Assembling and debugging
ASM assembles the source in memory and shows a listing with addresses and object bytes. BUG switches to the DEBUG prompt, and X returns to the editor. In the debugger:
| Command | Purpose |
|---|---|
G1000 |
Run from $1000, then show the registers |
T1000 |
Trace: run while displaying each instruction |
S |
Single-step |
D1000 |
Display memory |
C |
Change memory |
L1000 |
Disassemble (list) memory |
M, V |
Move a block; verify (compare) two blocks |
The directives are the classic Atari set: *= (origin), label = (equate), .BYTE, .WORD (low byte first), .DBYTE (high byte first) and .END. The operand field allows + - * / and &, so LOOP&255 and LOOP/256 give the low and high bytes of an address.
Reception and limitations
Contemporary reviewers were blunt. A Creative Atari languages column called it "absolutely unacceptable for major software development". The writer remembered assemblies of large programs taking up to an hour, and reported that any CPY instruction hung the TRACE function. It praised the debugger, though, and said the cartridge was fine for small machine-language routines called from BASIC. Chasin's comparison found Synapse's SYNASSEMBLER "from 50 to 100 times faster". Other limitations:
- No operator precedence. Expressions are evaluated strictly left to right. Code moved to MAC/65, which does use precedence, can silently change meaning.
- Object code goes straight into memory by default. It is easy to overwrite DOS, your source or the screen by mistake.
- The
.IFconditional was described by OSS as "clumsy and unusable". - In its favour, the cartridge can usually handle forward references to zero-page labels, a case where MAC/65 gives a phase error.
LISTed source is plain ATASCII text, and .ASM is the usual extension. Later assemblers such as MAC/65, SYNASSEMBLER and AMAC can ENTER such files and convert them with only minor syntax changes.
Using it today
Dumps of the cartridge are on AtariMania, along with scans of the manual, errata and reference card. It runs in any emulator as a standard 8K left-cartridge image; give it a DOS disk in D1: if you want to save to disk. The cartridge is still a reasonable way to follow the period tutorials (Chasin, the Inmans, Antic and COMPUTE! machine-language articles) exactly as written. For new projects, MAC/65 accepts the same basic syntax and is far quicker, and PC cross-assemblers are faster still.
Credits
- Picture: The Assembler Editor User's Manual for the CXL4003 cartridge. — Manual cover from the Internet Archive item 'ATARI Assembler Editor User Manual' (Fair use (manual cover))
- AtariMania — Assembler Editor (Atari, CXL4003) — AtariMania
- AtariMania — Assembler Editor (Atari Elektronik, RXG4003) — AtariMania
- Assembly Language Programming for the Atari Computers (Mark Chasin, 1984), ch. 6 — AtariArchives.org, 1984
- The Creative Atari — Atari Languages — AtariArchives.org
- comp.sys.atari.8bit FAQ (Michael Current) — Michael Current (comp.sys.atari.8bit FAQ)
