Action! (programming language)

From Wikipedia, the free encyclopedia
  (Redirected from Action programming language)
Jump to: navigation, search
This article is about the programming language. For other uses, see Action! (disambiguation).
Action! editor
Action! editor
Original author(s) Clinton Parker[1]
Developer(s) Optimized Systems Software
Last release
v3.6 / 1983; 33 years ago (1983)
Platform Atari 8-bit family
Size 16K bank-switched cartridge

Action! is a programming language and development environment with an integrated editor, compiler, and debugger for the Atari 8-bit family of computers. It was created by Clinton Parker, who had previously developed the Micro SPL language with Henry Baker,[2] and released on cartridge by Optimized Systems Software in 1983. Action! was used to develop at least two commercial products—the Homepak productivity suite and Games Computers Play client program—and numerous programs in ANALOG Computing and Antic magazines. The language was never ported to other systems.

The Action! language syntax is similar to that of ALGOL 68. Constructs were designed to map cleanly to 6502 opcodes, to provide the high performance necessary for game and graphics demos without needing complex optimizations in the compiler. Unlike the integrated Atari BASIC and Atari Assembler Editor environments, the Action! editor is full-screen, so it does not use line numbers. Action! is a one-pass compiler, which compiles the source code entirely in memory or from a file.[3] This allows great speed, but limits the amount of code that may be compiled.

The library routines used by Action! programs are stored in the cartridge itself. To distribute standalone applications requires a separate run-time package.[4] A development library was sold by OSS as a separate product called the Action! Toolkit.

The 6502 assembly language source code for Action! was made available under the GNU General Public License by the author in 2015.[5]

Data Types[edit]

Action! has three fundamental data types, all of which are numeric.


Internally represented as an unsigned 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 and store it at address 82


Internally represented as an unsigned 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


Internally represented as a signed 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. No floating point support was provided.

An example of a user-defined TYPE:

 CORD point


A "keyword" is any word 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       !        @


Programming in Action! requires working with the editor and compiling/debugging in the monitor. The editor features a full-screen, scrolling display capable of displaying two windows. The editor also includes block operations and global search and replace. Compiling takes place in the monitor, a mode that allows compiling and debugging.

Local variables are assigned fixed addresses in memory, instead of being allocated on the stack. This enables tight code to be generated for the 6502, but precludes the use of recursion.

Example code[edit]

The following is example code for Sieve of Eratosthenes written in Action!. In order to increase performance, it disables the ANTIC graphics co-processor, preventing its DMA engine from "stealing" CPU cycles during computation.

BYTE RTCLOK=20, ; addr of sys timer
     SDMCTL=559 ; DMA control




  SDMCTL=0 ; shut off Antic
  RTCLOK=0 ; only one timer needed

  COUNT=0         ; init count
  FOR I=0 TO 8190 ; and flags
    FLAGS(I)='T ; "'T" is a compiler-provided constant for True

  FOR I=0 TO 8190 ; and flags
      WHILE K<=8190
        FLAGS(K)='F ; "'F" is a compiler-provided constant for False
  TIME=RTCLOK ; get timer reading
  SDMCTL=34   ; restore screen



BYTE in 1985 praised the compilation and execution speed of software written in Action!—ten iterations of the Sieve of Eratosthenes ran in less than 18 seconds, compared to 10 seconds for assembly and 38 minutes in BASIC—and its editor. The magazine reported that the language resembled C closely enough to "routinely convert programs between the two", and approved of its pointer support. BYTE 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."[6]

Action! today[edit]

Several people in the Ataris community today created new games and other applications in this language. The reason is the high performance of this language. Allows fast accesses to hardware registers and manipulate 100% identical to the assembler. For example, all discovered Ataris new graphics modes are possible to program, even without assembler. This makes the language unique even today.


  1. ^ Clinton Parker, Action!, ANTIC Interview 111, 31 December 2015, hosts: Randy Kindig, Kevin Savetz, Brad Arnold, ANTIC The Atari 8-bit Podcast
  2. ^ Baker, Henry; Parker, Clinton. "Micro SPL". CiteSeerX: 
  3. ^ ACTION! in Atariki (PL)
  4. ^ Moriarty, Brian. "Review - Action!". ANALOG Computing (16). 
  5. ^ Action! Source Code - Page 2, Alfred (Chopper Commander) Posted Mon Feb 2, 2015 1:38 PM, AtariAge Forums, This is the original Action! source as I received it from ICD. It uses the ICD cross assembler which is not included in the zip. It can be easily converted to other formats
  6. ^ Schneeflock, Ed (March 1985). "Action! A Poor Man's C?". BYTE. p. 273. Retrieved 19 March 2016. 

External links[edit]