Atari Assembler Editor: History
Please note this is an old version of this entry, which may differ significantly from the current revision.
Subjects: Others
Contributor:

Atari Assembler Editor (sometimes written as Atari Assembler/Editor) is a ROM cartridge-based development system released by Atari, Inc. in 1981. It is used to edit, assemble, and debug 6502 programs for the Atari 8-bit family of home computers. It was programmed by Kathleen O'Brien of Shepardson Microsystems, the company which wrote Atari BASIC, and Assembler Editor shares many design concepts with that language. Assembly times are slow, making the cartridge challenging to use for larger programs. In the manual, Atari recommended the Assembler Editor as a tool for writing subroutines to speed up Atari BASIC, which would be much smaller than full applications. The Atari Macro Assembler was offered as an alternative with better performance and more features, such as macros, but it was disk-based, copy-protected, and did not include an editor or debugger. Despite the recommendation, commercial software was written using the Assembler Editor, such as the games Eastern Front (1941), Caverns of Mars, Galahad and the Holy Grail, and Kid Grid. The source code to the original Assembler Editor was licensed to Optimized Systems Software who shipped EASMD based on it.

  • commercial software
  • source code
  • grail

1. Development

Assembler Editor was written by Kathleen O'Brien of Shepardson Microsystems. The company had been hired by Atari to help fit Microsoft 6502 BASIC onto an 8KB ROM, something programmers at Atari were struggling with. Instead, Bill Wilkinson suggested designing an entirely new version of BASIC, which became Atari BASIC.[1]

While Atari BASIC was being written, primarily by Paul Laughton, O'Brien's husband, O'Brien worked on the Assembler Editor.[1] It was written by punching codes into a punch tape machine, running the tape through an EPROM burner, and then testing the resulting ROM in an Atari 800. The cartridge was completed before Atari BASIC, and O'Brien spent some time working on portions of that project as well.[1]

As part of Shepardson's work, a number of common routines were incorporated into the Atari computer's operating system, including the floating point math functions. These were written by O'Brien, the first floating point math code she worked on.[1] The low performance of key functions affected both Atari BASIC and the Assembler Editor and was a topic that Wilkinson often wrote about.[2]

2. Details

The Assembler Editor is two-pass 6502 assembler in an 8KB cartridge. Both source and object code can be in memory simultaneously, allowing repeated editing, assembly, and running of the resulting code without accessing a disk or tape drive.[3]

2.1. Edit

The cartridge starts in EDIT mode. The programmer enters lines of assembly source into the Atari BASIC-like editor. Source text must be prefixed with a line number, or it is interpreted as a command. Like Atari BASIC, Assembler Editor included an ENTER command that could be used to combine files together into a single larger program listing. Unlike Atari BASIC, Assembler Editor includes commands for automatically creating spaced-out line numbers, as well as renumbering lines and deleting them en masse. A FIND command is useful when working with labels.[4]

Instructions are listed in the order they will be placed in memory. The starting point for instructions is specified with the *= directive, so, for instance, code intended to be placed in the special "page six" would be prefixed with the line *= $0600.[5] Variable names can be assigned to specific addresses, and this was often combined with an increment *= *+1 to directly encode offsets into tables.[6]

Values following instructions are normally interpreted as "the value at this memory address", but an actual numeric value can be provided as an "immediate operand" by appending it with a hash, like LDA #12, which loads the accumulator with the decimal value 12. Hexadecimal is indicated with a dollar sign, LDA #$12 loads the accumulator with 12 hex, or 18 decimal. Indirect addressing is supported using parentheses; LDA ($600) uses the values in location $600,$601 to produce a 16-bit address, and then loads the accumulator with the value found at that location.[7]

Errors are reported with numeric codes that can be looked up in the manual, with about 50 such codes in total.[8]

2.2. Assemble

Code can be assembled at any time by typing the ASM command into the editor.[9]

Assembler Editor was widely derided as the slowest assembler on the platform. Much of this was due to it sharing much of the editor code with Atari BASIC, which had also been written by Shepardson Microsystems. Atari BASIC was notorious for the very slow routines used to convert numerical constants in code into an internal representation, which used binary-coded decimal (BCD) routines in the Atari's operating system. This meant that all numbers, even line numbers, had to be converted to BCD. Oddly, it also meant that 1E2 was a legal line number.[10]

2.3. Debug

The debugger, really a monitor, is entered with the BUG command.[11] The X command returns to EDIT mode.[12] The debugger allows the viewing and changing of registers and memory locations, code tracing, single-step and disassembly.[13]

3. Example Code

The following is 6502 code for Hello World! written for the Assembler Editor:

10 ; HELLO.ASM 20 ; --------- 30 ; 40 ; THIS ATARI ASSEMBLY PROGRAM 50 ; WILL PRINT THE "HELLO WORLD" 60 ; MESSAGE TO THE SCREEN 70 ; 0100 ; CIO EQUATES 0110 ; =========== 0120 *= $0340 ;START OF IOCB 0130 IOCB 0140 ; 0150 ICHID *= *+1 ;DEVICE HANDLER 0160 ICDNO *= *+1 ;DEVICE NUMBER 0170 ICCOM *= *+1 ;I/O COMMAND 0180 ICSTA *= *+1 ;I/O STATUS 0190 ICBAL *= *+1 ;LSB BUFFER ADDR 0200 ICBAH *= *+1 ;MSB BUFFER ADDR 0210 ICPTL *= *+1 ;LSB PUT ROUTINE 0220 ICPTH *= *+1 ;MSB PUT ROUTINE 0230 ICBLL *= *+1 ;LSB BUFFER LEN 0240 ICBLH *= *+1 ;MSB BUFFER LEN 0250 ICAX1 *= *+1 ;AUX BYTE 1 0260 ICAX2 *= *+1 ;AUX BYTE 1 0270 ; 0280 GETREC = 5 ;GET TEXT RECORD 0290 PUTREC = 9 ;PUT TEXT RECORD 0300 ; 0310 CIOV = $E456 ;CIO ENTRY VECTOR 0320 RUNAD = $02E0 ;RUN ADDRESS 0330 EOL = $9B ;END OF LINE 0340 ; 0350 ; SETUP FOR CIO 0360 ; ------------- 0370 *= $0600 0380 START LDX #0 ;IOCB 0 0390 LDA #PUTREC ;WANT OUTPUT 0400 STA ICCOM,X ;ISSUE CMD 0410 LDA #MSG&255 ;LOW BYTE OF MSG 0420 STA ICBAL,X ; INTO ICBAL 0430 LDA #MSG/256 ;HIGH BYTE 0440 STA ICBAH,X ; INTO ICBAH 0450 LDA #0 ;LENGTH OF MSG 0460 STA ICBLH,X ; HIGH BYTE 0470 LDA #$FF ;255 CHAR LENGTH 0480 STA ICBLL,X ; LOW BYTE 0490 ; 0500 ; CALL CIO TO PRINT 0510 ; ----------------- 0520 JSR CIOV ;CALL CIO 0530 RTS ;EXIT TO DOS 0540 ; 0550 ; OUR MESSAGE 0560 ; ----------- 0570 MSG .BYTE "HELLO WORLD!",EOL 0580 ; 0590 ; INIT RUN ADDRESS 0600 ; ---------------- 0610 *= RUNAD 0620 .WORD START 0630 .END

These commands can be interactively entered to assemble the code, enter the debugger, run the program, then exit the debugger when it is finished:

ASM BUG G600 X 

4. Legacy

Shortly after Shepardson delivered Assembler Editor and Atari BASIC to Atari, Bob Shepardson, the owner, decided to return to being a one-person company.[14] O'Brien, Laughton and Wilkinson formed their own company, Optimized Systems Software (OSS), to continue development of the Atari products. They licensed the original source code for BASIC, Assembler Editor and Atari DOS, which they had collectively written.[15]

In 1981, OSS released an improved version of Assembler Editor, EASMD on floppy disk. EASMD was replaced by MAC/65 in 1982. MAC/65 was one of the fastest assemblers on the platform.[10] Much of the improved performance of MAC/65 is the result of tokenizing lines of code as they're entered—at is the case with Atari BASIC—to reduce the amount of work needed at assembly time.[3]

Assembler Editor continued to be available from Atari, and increased in popularity as the price dropped to US$10 or $5 in the latter half of the 1980s.[16]

The content is sourced from: https://handwiki.org/wiki/Software:Atari_Assembler_Editor

References

  1. Interview 2015.
  2. Wilkinson, Bill (February 1985). "INSIGHT: Atari". Compute!: 139. 
  3. Hague 2009.
  4. Manual 1981, p. 15.
  5. Manual 1981, p. 7,31.
  6. Manual 1981, p. 31.
  7. Manual 1981, pp. 10-12.
  8. Manual 1981, pp. 43-44.
  9. Manual 1981, p. 25.
  10. Wetmore 1983, p. 29.
  11. Manual 1981, p. 35.
  12. Manual 1981, p. 41.
  13. Manual 1981, pp. 35-41.
  14. Wilkinson 1982, p. vi.
  15. Wilkinson 1982, pp. vi-vii.
  16. Ratcliff, Matthew (20 November 1989). "Atari Assembler Editor Reference". http://www.atariarchives.org/cfn/12/02/0090.php. 
More
This entry is offline, you can click here to edit this entry!
ScholarVision Creations