请输入您要查询的百科知识:

 

词条 Action! (programming language)
释义

  1. Development environment

  2. Data types

      BYTE    CARDinal    INTeger  

  3. Reserved words

  4. Example code

  5. Reception

  6. See also

  7. References

  8. External links

{{about|the programming language|other uses|Action (disambiguation)}}{{Infobox software
| name = Action!
| logo =
| logo caption =
| logo size =
| logo alt =
| screenshot = actionscr.png
| caption = Action! editor
| screenshot alt = Action! editor
| author = Clinton Parker[1]
| developer = Optimized Systems Software
| discontinued = yes
| released =
| latest release version = v3.6
| latest release date = {{Start date and age|1983}}
| platform = Atari 8-bit family
| size = 16K bank-switched cartridge
}}

Action! is a procedural programming language similar to ALGOL 68 that is intended to produce high-performance programs for the Atari 8-bit family. The language was written by Clinton Parker and distributed on ROM cartridge by Optimized Systems Software starting 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 system was not ported to any other platforms.

Parker had previously developed Micro-SPL with Henry Baker, a similar programming language for the Xerox Alto.[2] The 6502 assembly language source code for Action! was made available under the GNU General Public License by the author in 2015.[3]

Development environment

Action! consists of the editor, the compiler, a monitor 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[4] which was sold by OSS as the Action! Toolkit.

Action! constructs were designed to map cleanly to 6502 opcodes, to provide high performance without needing complex optimizations in the one-pass compiler.[5] For example, local variables are assigned fixed addresses in memory, instead of being allocated on the stack. This enables tight code for the 6502, but precludes the use of recursion.

Unlike the integrated Atari BASIC and Atari Assembler Editor environments, the Action! editor is full-screen, so it does not use line numbers. It features a full-screen, scrolling display capable of displaying two windows, as well as block operations and global search and replace.

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.[4]

Data types

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

BYTE

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

CARDinal

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

INTeger

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 is provided.

An example of a user-defined TYPE:

  TYPE CORD=[CARD x,y]  CORD point  point.x=42  point.y=23

Reserved words

A reserved 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       !        @

Example code

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  BYTE ARRAY FLAGS(8190)  CARD COUNT,I,K,PRIME,TIME  PROC 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 ; and flags     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) RETURN

Reception

Brian Moriarty, in a February 1984 review for ANALOG Computing, cited the manual as the weak point of the package: "[it] suffers from lack of confidence, uncertain organization and a shortage of good, hard technical data." He concluded by calling Action! "one of the most valuable development tools ever published for the Atari."[4]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]

Ian Chadwick wrote in Mapping 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."[7]

See also

  • PaperClip - Atari 8-bit word processor from a different author and company, but based on the Action! editor.

References

1. ^Clinton Parker, Action!, ANTIC Interview 111, 31 December 2015, hosts: Randy Kindig, Kevin Savetz, Brad Arnold, ANTIC The Atari 8-bit Podcast
2. ^{{cite paper|authorlink1=Henry Baker (computer scientist) |last1=Baker|last2=Parker |first1=Henry|first2=Clinton |title=Micro SPL |citeseerx = 10.1.1.126.6877}}
3. ^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
4. ^{{cite journal|last1=Moriarty|first1=Brian|title=Review - Action!|journal=ANALOG Computing|issue=16|url=http://www.cyberroach.com/analog/an16/action.htm}}
5. ^ACTION! in Atariki (PL)
6. ^{{cite news | url=https://archive.org/stream/byte-magazine-1985-03-rescan/1985_03_BYTE_10-03_Bargain_Computing#page/n283/mode/2up | title=Action! A Poor Man's C? | work=BYTE | date=March 1985 | accessdate=19 March 2016 | author=Schneeflock, Ed | pages=273}}
7. ^{{Cite book |title=Mapping the Atari |last=Chadwick |first=Ian |publisher=Compute! Publications, Inc. |year=1985 |isbn=0-87455-004-1 |location=Greensboro, North Carolina |pages=v-vi |chapter=Author's Preface To The Revised Edition |chapter-url=http://www.atariarchives.org/mapping/revisedpreface.php}}

External links

  • {{sourceforge|atari-action}}
  • [https://archive.org/details/ActionVersion36_SourceCode Action! Programming Language Version 3.6 - Source Code], by Optimized Systems Software at archive.org
  • [https://www.webcitation.org/65qkEtV1k?url=http://retrobits.net/atari/action.shtml Action! info at Retrobits.com]
  • The ACTION! Archive
  • Action! language reference
  • Effectus cross-compiler

8 : Atari 8-bit family software|ALGOL 68 dialect|Optimized Systems Software|Procedural programming languages|Programming languages created in 1983|Statically typed programming languages|Free and open-source software|Formerly proprietary software

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/14 15:12:31