Action! programming Compiler, Source code and Tutorial

Action! programming is is an artificial language designed to express computations that can be performed by a machine, particularly a computer. ABAP (Advanced Business Application Programming, originally Allgemeiner Berichts-Aufbereitungs-Prozessor, German for “general report creation processor” [1]) is a high-level programming language created by the German software company SAP. It is currently positioned, alongside the more recently introduced Java, as the language for programming the SAP Application Server, part of its NetWeaver platform for building business applications. The syntax of ABAP is somewhat similar to COBOL.

Compiler

Download Action! programming compiler.

Source code

Action! programming Hello world sample source code.

Tutorial

Action! programming tutorial.

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

An example of a user-defined TYPE:

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

Keywords

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

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.

Action! is a one-pass compiler, which compiles the source code entirely in memory or from a file This allows great speed, but limits the amount of code that may be compiled.

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

Author: programming on October 21, 2010
Category: Action!
Tags: , , , , ,

Leave a Reply

Last articles