Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!mcnc!gatech!cuae2!ihnp4!ihlpe!daryl From: daryl@ihlpe.UUCP Newsgroups: comp.sys.atari.8bit Subject: ACTION! summary Message-ID: <1513@ihlpe.UUCP> Date: Fri, 6-Feb-87 22:59:44 EST Article-I.D.: ihlpe.1513 Posted: Fri Feb 6 22:59:44 1987 Date-Received: Sun, 8-Feb-87 05:55:38 EST Organization: Engineering Design Process Department, AT&T Bell Labs Lines: 225 Someone locally asked me for ACTION detail information. I ended up with something detailed that I thought should be shared with the net. Daryl Monge UUCP: ...!ihnp4!iheds!dlm AT&T CIS: 72717,65 Bell Labs, Naperville, Ill AT&T 312-979-3603 ******************************************************************************* ******************************************************************************* ACTION! is an OSS super-cartridge. You get a text editor which is general enough to use on any text file, a monitor for running programs, dumping variables, etc, and the compiler itself (which is accessed from the monitor) The big linkup between the compiler and the editor is going into the editor immediately after a compiler error will place the cursor at the offending line. Useful, since the compiler stops after ANY error (the only annoying deficiency.) EDITOR summary: Insert/delete line/character with the normal keyboard keys for them tab, set tab, clear tab, using normal keyboard keys Forward/back screen Find characters Set/Goto tag home/end of buffer replace/insert mode (the editor is like gmacs - modeless) paste deleted lines read/write files clear buffer create/delete split screen windows -- can do 2 windows, a different file in each. Substitute string (no regular expressions) undo last delete shift window left/right. Useful when indenting becomes a problem on a 40 column screen. The MONITOR: compile /edit/return to dos commands Proceed from either a break key or library break() function run a program set a memory location (poke) write a compiled program to disk execute an immediate command (any one line meaningful to the compiler) display a memory location (peek) dump memory (bulk dump) set system options: display turn off display will compute bound. On atari's this can improve compiler performance 30% or more. bell on/off an audible bell on errors case sensitive on/off trace on/off, trace each subroutine call, not including library functions. list on/off list program while compiling window 1 size size in lines of the top window when using split screen mode line size Max line size, must be <240 left margin Default of 2, can be 0 if you have a decent TV or monitor. EOL character The visible end of line character, useful if you want to know if the file has lines with trailing blanks. -------------------- Of course you really want to language details, since the above is really sugar for the development environment. identifiers are arbitrary length, must start with an alphabetic, and the remainder must be alphanumeric or underline (_) Constants are digits decimal $digits hex 'letter a single character constant "string" a character string. ACTION! strings are [1 byte count]characters Fundamental Data types: (by the way - all ACTION! variables are static) BYTE obvious. CHAR is treated the same CARD 16 bit unsigned INT 16 bit signed POINTER to any of the above Variable declarations: BYTE name1,name2 simple storage allocation BYTE x=[1] initialization BYTE y=$8000 declares y as residing at memory loc $8000 Expressions (in priority): - unary minus * mult / divide MOD remainder + add - binary subtract (= is not an operator in ACTION!, hence z=(x=y) is not legal) Bit wise: & and % or ! xor XOR same as ! LSH logical (vs arithmetic) left shift RSH logical right shift relational: = equality # inequality <> same as # > >= < <= obvious AND logical and, not the same as & OR logical or, not the same as % expressions are cast in the order of BYTE->INT->CARD Assignment: = simple assign == where is any binary operator, including LSH, RSH etc., just like += in C. Statements: IF THEN ELSE FI IF THEN ELSEIF THEN ELSEIF THEN ... FI DO OD FOR TO STEP DO OD WHILE DO OD DO UNTIL OD There is no case and no GOTO in ACTION!!!!!!! Functions and subroutines: They are separated as in Fortrash. PROC name(BYTE arguments INT arguments ...) FUNC name(...) and most interesting PROC name=
(arguments) where address is an address in memory. Makes it real easy to call OS routines in ROM, etc directly from action without any assembler language non-sense. There is a RETURN statement. IT IS THE ONLY WAY TO KNOW WHERE THE END OF A ROUTINE IS!! It is a simple minded compiler and probably only generates a RTS instruction when it encounters a RETURN. RETURN's are legal anywhere in a functions or procedure. --------- Scoping rules in ACTION! are virtually identical to C, except there is no concept or AUTOMATIC in ACTION!, making recursion more difficult. -------- Preprocessor (sort of) DEFINE name="anything" INCLUDE "filename" is the only two things. the quotes must always be in the DEFINE statement, even if is just a number. You can have POINTERS to objects and ARRAYS. There is also a struct like concept called records and are declared as TYPE name = [ BYTE stuff INT stuff ...] It is C struct and typedef roled into one statement. To use the above the declaration would be name myvariable ARRAYS work just like C. Passing them to a procedure or function just passes the base address of the array. RESTRICTION: You cannot have ARRAYs of records or records with embedded ARRAYS. There are ways to hack your way around this, however, and the manual does a fairly good job of documenting it. Special note: Anywhere in a program you can start inserting assembly language for speed. You simply enter [ $00 $00 ... ] where you would normally enter ACTION! statements. VERY handy. Of course most people use DEFINE and an INCLUDE file to set up mnemonics for the hex instructions. You are even allowed to embed program variable names. For example: DEFINE LDA="$94" ;or whatever it is DEFINE CMP="$44" [ LDA variable CMP 'T ] would load into the A register and compare it against the literal character T ---------------------------------------------------------------------- ---------------------------------------------------------------------- The manual fully documents the operation of the compiler, how it handles allocating variables during compile time, etc. ---------------------------------------------------------------------- The run time library: Print BYTEs, INTs, CARDs, and strings to standard out, or any other file descriptor. The I/O subsystem is very similar to UNIX in that you have a character stream interface based on file descriptors. Input the above items. PrintF !!(not all of it of course) All the normal graphics functions the BASIC(K) has, but as function calls of course String copy, compare, substring, etc. Random numbers Zero, Set, Move blocks of memory (very fast) Open, Close, XIO, Point(as in fseek(3)), Tell(as in ftell(3)) ---------------------------------------------------------------------- ---------------------------------------------------------------------- ---------------------------------------------------------------------- There it is. In my opinion, there is no better development environment for the ATARI 8 bits. (I have never tried KYAN PASCAL). I have been working with ACTION! for a while and am totally satisfied. Contrary to recent NETNEWS traffic, it IS!!! better to have the system on ROM, since the hardware offers your compiler, etc, no protection at all.