| Action! | |
|---|---|
Fullscreen editor | |
| Original author | Clinton Parker |
| Developer | Optimized Systems Software |
| Initial release | August 1983; 42 years ago (1983-08) |
| Final release | v3.6 / November 4, 1983; 42 years ago (1983-11-04) |
| Platform | Atari 8-bit computers |
| Size | 16K bank-switched cartridge |
Action! is a proceduralprogramming language andintegrated development environment written by Clinton Parker for theAtari 8-bit computers. The language, similar toALGOL, maps cleanly to theMOS Technology 6502 of the Atari computer without complex compiler optimizations. Fast execution speed of the resulting programs was a key selling point.
Parker, working withHenry Baker, had previously developed Micro-SPL, asystems programming language for theXerox Alto. Action! is largely a port of Micro-SPL concepts to the Atari with changes to support the 6502 processor and the addition of an integrated fullscreen editor and debugger.
Action! was distributed onROM cartridge byOptimized Systems Software starting in 1983. It was one of the company's firstbank-switched 16 kB "Super Cartridges". The runtime library is stored in the cartridge; to make a standalone application requires theAction! Toolkit which was sold separately by OSS.
Action! was used to develop at least two commercial products—theHomePak productivity suite andGames Computers Play client program—and numerous programs inANALOG Computing andAntic magazines. The editor inspired thePaperClipword processor. The language was not ported to other platforms.
The assembly language source code for Action! was made available under theGNU General Public License by the author in 2015.[1]
Action! is one of the earlier examples of the OSS SuperCartridge format. Although ROM cartridges for the Atari could support 16 kB,[2] OSS opted for bank-switching 16 kB, organized as four 4 kB blocks,mapped onto 8kB ofaddress space. The lower 4 kB did not change, and system couldbank switch between the other three blocks by changing the value in address $AFFF.[3][4] This allowed for moreRAM available for user programs.[5]
Action! used this design by breaking the system into four sections, the editor, the compiler, amonitor for testing code and switching between the editor and compiler, and the run-time library.[4] The run-time library is stored in the cartridge itself. To distribute standalone applications requires a separate run-time package which was sold by OSS as the Action! Toolkit.[6]
Action! constructs were designed to map cleanly to 6502opcodes, to provide high performance without needing complex optimizations in theone-pass compiler.[7] For example, local variables are assigned fixed addresses in memory, instead of being allocated on a stack ofactivation records. This eliminates the significant overhead associated with stack management, which is especially difficult in the case of the 6502's 256-byte stack. However, this precludes the use ofrecursion.[6]
Unlike the integratedAtari BASIC andAtari Assembler Editor environments, the Action! editor does not use line numbers. It has a fullscreen, scrolling display capable of displaying two windows, and includes block operations and global search and replace.[6]
The monitor serves as a debugger, allowing an entire program or individual functions to be run, memory to be displayed and modified, and program execution to be traced.[6]
Action! has three fundamentaldata types, all of which are numeric.
BYTE is internally represented as anunsigned 8-bit integer. Values range from 0 to 255.
The CHAR keyword can also be used to declare BYTE variables.
BYTE age=[21] ; declare age and initialize it to the value 21 BYTE leftMargin=82 ; declare leftMargin at address 82
CARDinal is internally represented as anunsigned 16-bit integer. Values range from 0 to 65,535.
CARD population=$600 ; declare population and store it at address 1536 and 1537 CARD prevYear, curYear, nextYear ; use commas to declare multiple variables
INTeger is internally represented as asigned 16-bit integer. Values range from -32,768 to 32,767.
INT veryCold = [-10] INT profitsQ1, profitsQ2, ; declaring multiple variables can profitsQ3, profitsQ4 ; span across multiple lines
Action! also has ARRAYs, POINTERs and user-defined TYPEs. Nofloating point support is provided.
An example of a user-defined TYPE:
TYPE CORD=[CARD x,y] CORD point point.x=42 point.y=23
Areserved word is any identifier or symbol that the Action! compiler recognizes as something special. It can be an operator, a data type name, a statement, or a compiler directive.
AND FI OR UNTIL = ( ARRAY FOR POINTER WHILE <> ) BYTE FUNC PROC XOR # . CARD IF RETURN + > [ CHAR INCLUDE RSH - >= ] DEFINE INT SET * < " DO LSH STEP / <= ' ELSE MOD THEN & $ ; ELSEIF MODULE TO % ^ EXIT OD TYPE ! @
The following is example code forSieve of Eratosthenes written in Action!. In order to increase performance, it disables theANTIC graphics coprocessor, preventing itsDMA engine from "stealing" CPU cycles during computation.
BYTE RTCLOK=20, ; addr of sys timer SDMCTL=559 ; DMA controlBYTE ARRAY FLAGS(8190)CARD COUNT,I,K,PRIME,TIMEPROC SIEVE() SDMCTL=0 ; shut off Antic RTCLOK=0 ; reset the clock to zero COUNT=0 ; init count FOR I=0 TO 8190 ; and flags DO FLAGS(I)='T ; "'T" is a compiler-provided constant for True OD FOR I=0 TO 8190 ; now run the sieve DO IF FLAGS(I)='T THEN PRIME=I+I+3 K=I+PRIME WHILE K<=8190 DO FLAGS(K)='F ; "'F" is a compiler-provided constant for False K==+PRIME OD COUNT==+1 FI OD TIME=RTCLOK ; get timer reading SDMCTL=34 ; restore screen PRINTF("%E %U PRIMES IN",COUNT) PRINTF("%E %U JIFFIES",TIME)RETURNWhile taking his postgraduate studies, Parker started working part-time atXerox PARC working onprinter drivers. He later moved to theXerox Alto project where he wrote several games for the system.[8] His PhD was innatural language parsing and he had worked on compiler theory during his graduate work.[9]
Henry Baker and Parker released Micro-SPL in September 1979. Micro-SPL was intended to be used as asystems programming language on theXerox Altoworkstation computer, which was normally programmed inBCPL. The Alto used amicrocode system which the BCPL compiler output. Micro-SPL output the same format, allowing BCPL programs to call Micro-SPL programs.[10]
Aside from differences in syntax, the main difference between Micro-SPL and BCPL, and the reason for its existence, was that Micro-SPL produced code that was many times faster than the native BCPL compiler. In general, Micro-SPL programs were expected to run about ten times as fast as BCPL, and about half as fast as good hand-written microcode. In comparison to microcode, they claimed it would take half as long to write and 10% of the time to debug it.[10]
It was during this period that Parker purchased an Atari computer for use at home. He was disappointed with the lack of development systems for it, which was the impetus for creating Action![11] Parker considered releasing the system himself, but decided to partner withOptimized Systems Software (OSS) for sales and distribution. OSS focused on utilities and programming languages likeBASIC XL, so this was a natural fit for Action![12] Sales were strong enough for Parker to make a living off the royalties for several years.[13]
TheIBM PC hadC compilers available, and Parker decided there was no point in porting Action! to that platform.[14] As the sales of the Atari 8-bit computers wound down in North America, OSS wound down as well. Late in its history Action! distribution moved from OSS toElectronic Arts, but they did little with the language and sales ended shortly after.[15] In a 2015 interview, Parker expressed his surprise in the level of interest in the language continued to receive, suggesting it was greater than it had been in the late 1980s.[16]
Brian Moriarty, in a February 1984 review forANALOG Computing, concluded that Action! was "one of the most valuable development tools ever published for the Atari." He cited the manual as the only weak point of the package, claiming it "suffers from lack of confidence, uncertain organization and a shortage of good, hard technical data."[17]
Leo Laporte reviewed Action in the May/June 1984 edition ofHi-Res. He began the review, "This is the best thing to happen to Atari sinceNolan Bushnell figured out people would playping-pong on a TV screen." Laporte praised the editor, noting its split-screen and cut and paste capabilities and describing it as a "complete word processing system that's very responsive." He said that Action! ran about 200 times as fast asAtari BASIC, concluding that "This language is like a finely tuned racing car."[18]
BYTE in 1985 praised the compilation and execution speed of software written in Action!. Using theByte Sieve benchmark as a test, ten iterations of the sieve completed in 18 seconds in Action!, compared to 10 seconds for assembly and 38 minutes in BASIC. The magazine also lauded the language's editor.BYTE reported that the language resembled C closely enough to "routinely convert programs between the two", and approved of its pointer support. The magazine concluded that "Action! is easy to use, quick, and efficient. It can exploit the Atari's full power. Action! puts programming for the Atari in a whole new dimension".[19]
Ian Chadwick wrote inMapping the Atari that "Action! is probably the best language yet for the Atari; it's a bit like C and Pascal, with a dash of Forth. I recommend it."[20]