Action programming language
Categories: Historical programming languages | Procedural programming languages | Atari 8-bit family software | Computer language stubs
| Action! | |
| Developer: | Optimized Systems Software |
| Latest Release: | 3.6 |
| Release date: | 1983 |
| Platform: | Atari 400/800/XL/XE |
| Genre: | Programming Language |
| Media: | cartridge |
| License: | Copyright © 1994 Fine Tooned Engineering |
Action! was a programming language, editor and in-memory 6502 compiler created by Clinton Parker working for Optimized Systems Software and running on the Atari 8-bit family of microcomputers. Its syntax was similar to that of ALGOL 68, and it was well-known for its speed. A library was available as a separate product called the Action! Toolkit.
It was released in 1983 and officially sold as a cartridge and later "cracked" to disk. "ATR" format files containing a version which may be run on modern systems under emulation are available on some websites.
Contents |
Data Types
Action! has three numerical datatypes BYTEs, CARDinals and INTegers. The BYTE datatype is a single unsigned 8-bit byte, CARD is unsigned and two bytes long, and INT is signed and two bytes. Action! also has CHARs, ARRAYs, POINTERs and user defined TYPEs.
Unfortunately, no floating point support was available, and all data types were static. This meant variables had to be declared ahead of time and no dynamic memory management.
An example of a user-defined TYPE:
TYPE CORD=[CARD x,y] CORD point point.x=42 point.y=23
Reserved keywords
AND F1 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
Programming in Action! required working with the editor and compiling/debugging in the monitor. The ATASCII-style editor was a full-screen, scrolling display capable of displaying two windows. Features were block editing, global search and replace, and full-screen cursor control. Compiling took place in the monitor, a mode that allowed compiling and debugging.
Action! was a one-pass compiler. It compiled the source code entirely in memory. This allowed great speed, but limited the amount of code that could be compiled.
All arithmetic calculations were done in signed integer math, especially multiplication and division. Initializing variables to negative values didn't work, they needed to be in two's complement form (Example: 65535 instead of -1).
No inline assembly. Machine code had to be inputted directly, in hexadecimal.
Because data types were static, Action! did not support recursion.
Example code
The following is example code for Sieve of Eratosthenes written in Action:
BYTE RTCLOK=20, ; addr of sys timer
SDMCTL=559 ; DMA control
BYTE ARRAY FLAGS(8190)
CARD COUNT,I,K,PRIME,TIME
PROC SIEVE()
SDMCTL=0 ; shut off Antic
RTCLOK=0 ; only one timer needed
COUNT=0 ; init count
FOR I=0 TO 8190 ; and flags
DO
FLAGS(I)='T
OD
FOR I=0 TO 8190 ; and flags
DO
IF FLAGS(I)='T THEN
PRIME=I+I+3
K=I+PRIME
WHILE K<=8190
DO
FLAGS(K)='F
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)
RETURN
External links
- Action! info at Retrobits.com
- Action! Programming Wiki
- Hi-Res Vol. 1, No. 4 - May/June 1984 Lights, Camera, Action!