ArticleslgStudy

computer science

ARexx

ARexx is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ARexx rather than just read about it. In short: ARexx is a Rexx interpreter for Amiga, written in 1987 by William S. Hawes, with a number of Amiga-specific features beyond standard Rexx.

Key takeaways

  • ARexx belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ARexx to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ARexx from memory before moving on to harder problems.

Reference excerpt

ARexx is a Rexx interpreter for Amiga, written in 1987 by William S. Hawes, with a number of Amiga-specific features beyond standard Rexx. An ARexx script can communicate with software that implements an ARexx port. An Amiga application can define a set of commands and functions for ARexx to address, thus making the capabilities of the software available to an ARexx script. Several applications support running an ARexx script as a macro. An ARexx script can execute commands and functions in multiple applications which allows a script to integrate the functionality of the applications. For example, an ARexx script could extract data from a database, insert the data into a spreadsheet to perform calculations on the data, then insert tables and charts based on the results into a word processor document. ARexx allows a script to communicate with applications that are "ARexx compatible" – able to receive commands from ARexx and execute them. Notable examples include: the MicroFiche Filer database application provides extensive ARexx commands, the Textra editor supplied with JForth provides an integrated programming environment, and the AmigaVision multimedia presentation application can control other programs via ARexx. As in standard Rexx, ARexx uses typeless data representation. Other programming languages distinguish types such as integer, floating point, string, but Rexx treats all data as text (string). This makes writing code easier, but leads to runtime inefficiency and errors. As is often the case in dynamically scoped languages, variables are not declared before using them. They are created on first use. ARexx provides built-in commands and access to its host Amiga library (rexxsyslib.library) as well as other libraries and functions. An Amiga program with an ARexx port can serve its functionality to an ARexx script. An ARexx script can invoke other ARexx scripts.

History ARexx was created in 1987, developed for Amiga by William S. Hawes. It is based on the Rexx language described by Mike Cowlishaw in the book The REXX Language: A Practical Approach to Programming. ARexx was included by Commodore with AmigaOS 2.0 in 1990, and has been included with all subsequent AmigaOS releases. This later version of ARexx follows the official Rexx language closely; Hawes was later involved in drafting the ANSI standard for Rexx.

From the ARexx manual: ARexx was developed on an Amiga 1000 computer with 512k bytes of memory and two floppy disk drives. The language prototype was developed in C using Lattice C, and the production version was written in assembly-language using the Metacomco assembler. The documentation was created using the TxEd editor, and was set in TeX using AmigaTeX. This is a 100% Amiga product.

As ARexx is written in 68000 assembly language, it cannot function at full speed with PPC CPUs of MorphOS, a more modern descendant of Amiga. ARexx has not been rewritten for them and is still missing from MorphOS. William Hawes is no longer involved in development of Amiga software and no firm is financing new versions of ARexx. Notwithstanding, the existing version of ARexx continues to be used, although not distributed with MorphOS.

Examples

Implement new capabilities If a user is using a program which builds animations by joining various bitmap image files but which lacks image processing capabilities, they could write an ARexx script which performs these actions:

ARexx locates the image files in their directories ARexx loads first image ARexx loads paint program The image is loaded into paint program which performs modifications to file The modified image is stored into another directory ARexx repeats procedure on any image in the directory The paint program is closed and the animation program is loaded The animation is built The animation is saved in its directory The animation program is closed

Automate repetitive tasks EqFiles.rexx is a well-known example of a simple ARexx script written to automate repetitive and boring procedures. This script uses the ALeXcompare program to compare files, and then finds all duplicates in a set of files and returns output by highlighting any results in a different color.

Extend AmigaOS A significant value of ARexx is extending AmigaOS by adding capabilities it lacks. For example, a ARexx program could display a warning message or play an audio alert sound if a certain Amiga program stops, faults or has finished its scheduled job. The following script is a ARexx script that displays warnings depending on events:

See also

References

Notes Callaway, Merrill. (1992). The ARexx cookbook. Albuquerque, NM: Whitestone. ISBN 0-9632773-0-8. Zamara, Chris; Sullivan, Nick (1991). Using Arexx on the Amiga. Abacus Software Inc. ISBN 1-55755-114-6.

External links Beginning ARexx Tutorial Command and Function Reference Design Tool

Worked examples

Example 1 — a first encounter with ARexx

Start with the simplest possible case. Write down what ARexx claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ARexx before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ARexx ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ARexx

In research
ARexx appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ARexx in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ARexx is common in secondary-school and first-year university syllabi. It links to neighbouring topics AmigaOS, AmigaOS 4 software, Amiga APIs, so understanding it makes those chapters shorter.
In everyday life
Look for ARexx outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ARexx” →

How to study ARexx in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ARexx means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ARexx out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ARexx in simple terms?

ARexx is a Rexx interpreter for Amiga, written in 1987 by William S. Hawes, with a number of Amiga-specific features beyond standard Rexx.

Why does ARexx matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ARexx?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ARexx.

Tags

  • AmigaOS
  • AmigaOS 4 software
  • Amiga APIs
  • Amiga development software
  • Commodore software
  • Inter-process communication
  • MorphOS
  • Rexx
  • Scripting languages
  • Software programmed in assembly language

Keep exploring