Oberon/A2

Links
Gitlab at ETHZ

Installing and Running A2
A2 can be installed and used on a bare PC, including desktop and laptop machines considered obsolete for commercial operating systems. A2 can also work as a subsystem on ARM, MS Windows and Unix-like systems.

Installing and Running UnixAOS
The original instructions for installing UnixAOS are in http://user.informatik.uni-bremen.de/fld/UnixAos/Readme.txt. Installation files are available from http://user.informatik.uni-bremen.de/fld/UnixAos/. The shell script installer assumes existence of a sys group in the host. For systems lacking this group, the script is easily adapted. For example, the line, chgrp -R sys ${aosdir} can be changed to this. chgrp -R bin ${aosdir} The UnixAOS working directory can have an ext2 or FAT filesystem on a removable flash store.

Releases Prior to 10272
The default directory for the system is /usr/aos. By default, install.UnixAos creates start script /usr/bin/aos. The aos script adjusts the operating system environment before starting aos.{solaris,linux,darwin}. As noted in Readme.txt, UnixAos can be started with these two commands. cd  aos  must be replaced with a specific directory name.

Release 10272
The default directory for the system is /usr/local/A2 and the default start script is /usr/local/bin/a2. A2 can be started with these commands. cd  a2 As for earlier releases,  represents a specific directory name.

User and Machine Specific Configuration of UnixAOS
UnixAos is configured by Configuration.XML. The Oberon subsystem is configured by Oberon.Text; refer to the ETH Oberon page and the original betadocu page.

If the working directory is on a removable store, the myaos script allows the storage device to be used in multiple machines with differing configurations. When the store is not already mounted, e2fsck is applied as a precaution. In case the filesystem has been corrupted, e2fsck will usually complete repairs. A reasonable location for the myaos script is the home directory of the user. For each host, create in the working directory, files Configuration. .XML. To use the Oberon subsystem, create Oberon. .Text. This can be done by copying the installed files and editing the copies. For example, a host named blunder requires Configuration.blunder.XML for A2 and Oberon.blunder.Text for the Oberon subsystem. The XML file contains ASCII text and can be edited with Geany, gedit or mousepad in Linux or with Edit > Text in A2. The installed Oberon.Text contains some binary information. In ETH Oberon it would usually be edited with Edit or ET. Nevertheless plain text will also work. After storing Oberon.Text with ET.StoreChar, it can be edited with Mousepad or Gedit in Linux, with Notepad in MS Windows and with Atom in MacOS. This can resolve the difficulty of a file name, Oberon..Text, exceeding the 32 character limit of the Oberon system. myaos copies Configuration.blunder.XML to Configuration.XML and Oberon.blunder.Text to Oberon.Text before starting UnixAos.

The A2 Repositories
The original repository for sources and executables for several platforms was Apache Subversion (SVN) based. The contemporary Git based repository began with files from SVN revision 10270. While the Git archive is current, the notes for SVN remain available.

The repository provides the latest version and allows ongoing updates. From the viewpoint of a user, the method is based upon a local copy of the repository. The local copy is created by cloning from ETHZ. WIthin the local copy, an A2 executable can be built for a targeted platform including a bare PC. Executables in subdirectories for Windows, Linux (Intel 32 and 64 bit) and ARM are available. The repository will occupy 0.5+&#160;GB depending upon inclusion of executables.

A user not affiliated with ETHZ can obtain a Github account. Github login will allow access to facilities including Issues.

Git in a Unix-like System
The Wikipedia article provides a useful overview. Official documentation is available as a Reference Manual, comprising manual pages, and the Pro Git book. git-lfs is documented separately.

Each Linux has an installation procedure for Git with the various procedures summarized in the Git Web site. Release specific information is also available. For Debian Linux, refer to the UsingGit wiki page. If apt is available these commands suffice. The name of the repository directory is arbitrary. "A2" serves for this example. The ls command allows avoidance of name conflict. drwxr-xr-x 12 me mygroup 4096 Dec 5 09:22 A2 Create the local repository. Update the local repository from the origin, main branch. Use git-lfs to track some zip archives. Check which large files are tracked. Listing tracked patterns ARM/ARM.A2/*.bin (ARM/ARM.A2/.gitattributes) Linux32.zip (.gitattributes) Linux64.zip (.gitattributes) LinuxARM.zip (.gitattributes) Win32.zip (.gitattributes) Win64.zip (.gitattributes) *.bin (.gitattributes) Linux*.zip (.gitattributes) Listing excluded patterns Retrieve a specific archive file. fetch: Fetching reference refs/heads/main Verify existence of the zip archive. -rw-r--r-- 1 root root 23712521 Dec 5 09:19 Linux64.zip Unzip. Archive: Linux64.zip creating: Linux64/ creating: Linux64/work/ inflating: Linux64/oberon.ini creating: Linux64/bin/ inflating: Linux64/Kernel.GofU inflating: Linux64/OpenTypeScan.SymU inflating: ... Execute the start script.
 * 1) apt install git
 * 2) apt install git-lfs
 * 1) ls -ld A2
 * 1) git clone https&#58;//gitlab.inf.ethz.ch/felixf/oberon.git A2
 * 1) git pull origin main
 * 1) cd A2
 * 2) git lfs track "Linux*.zip"
 * 3) git add .gitattributes
 * 1) git lfs track
 * 1) git lfs fetch Linux64.zip
 * 1) ls -ld Linux64*
 * 1) unzip Linux64
 * 1) Linux64/a2.sh

The content of a2.sh can be displayed by "cat&#160;a2.sh" or with an editor. The script performs two actions. "cd&#160;`dirname&#160;$0`" changes to the directory where a2.sh resides; ~/A2/Linux64 for example. Then "./oberon&#160;run a2.txt" executes Linux command "oberon" with arguments "run" and "a2.txt". a2.txt contains A2 commands and can be displayed by cat and by an editor. The first command is System.DoFile&#160;oberon.ini&#160;~. oberon.ini also contains A2 commands. The last command is "FSTools.Mount&#160;WORK&#160;RelativeFileSystem&#160;.~" which mounts pseudo-volume WORK at the current directory. Using an editor, the current directory symbol, ".", can be replaced with the fully qualified Linux name chosen by the user to be the working directory. WORK and contents are visible via the UnixA2 menu, Files > Files.

Git in MS Windows
Git is available directly from the official Web site.

Module Naming
In A2, identifiers "A2" and "Oberon" in a source module denote context. This is the syntax in the Oberon (2019) Language Report, section "5 Modules". Module := 'MODULE' [TemplateParameters] Identifier 'IN' Identifier ';' ... Within the scope of a module, the name of an imported module can be aliased with this syntax also in the section referred to above. Import = Identifier [':=' Identifier] ... Hence this example. IMPORT ... Out := OutStub ...

Target Systems and File Name Extensions
Compilation, loading, linking and associated terminology is discussed in https://people.inf.ethz.ch/felixf/pdfs/2011_UnifiedStaticDynamicLoading.pdf. As in all Oberon systems, the name of a file specifying a module can differ from the name of the module. These file name extensions are conventional in A2.

Object and Symbol File Names
Object and symbol file names contain the context separated from the module name by a Minus-Sign. The Minus-Sign prevents use as a proper name in Oberon. Hence the object and symbol files for the Oberon System module are named Oberon-System.GofU and Oberon-System.Sym.

Startup from the Repository
With the A2 repository in place according to the preceding section, A2 can run.

Identify supported architectures. cd /a2/ In MS Windows. dir /ad * In Linux. ls -d * The output should be similar to this. AosVM LanguageReport  Linux32  source  UnixAos  Win64 ARM   license.txt     Linux64  tools   Win32    WinAos Review the startup process. In MS Windows. dir /ad Win32/* In Linux 64. ls -ld Linux64/* The oberon file must be executable. If necessary, adjust permission as in these examples. chmod u+x Win32/oberon chmod u+x Linux64/oberon Execute the appropriate start script. This for a 32 bit machine running MS Windows. ./Win32/a2.bat For a 64 bit machine running Linux. ./Linux64/a2.sh A window as at the right should appear.

User Level Applications
Various documents and applications are available via the menu at the lower left of the A2 display. Note Demos and Docu > Program Demos.

Secure Shell Console
In the target system, localhost or an external system, install a SSH server. This is one possibility. sudo apt install openssh-server In the A2 menu invoke Tools > Secure Shell. For Host specify "localhost" or "127.0.0.1" (without the quote marks) or the name or address of the external machine. Specify your user id. Click on Connect. Provide your password when prompted.

Email
A mail client using IMAP is at Apps > MailClient. The Oberon subsystem described in the subsequent section has Mail.Panel supporting POP, POP3 and SMTP.

Opening the Oberon Sub-system
At the lower left of the A2 screen, menu Tools > Oberon and Develop > Oberon FullScreen allow interactive startup of an Oberon subsystem.

The subsystem can also be opened with a command or commands in the Autostart section of Configuration.XML. In UnixAos, revision 4929, these lines in Configuration.XML. &#60;Section name="Autostart"> &#9;... &#9;&#60;Setting name="OberonDisplay" value="OberonDisplay.Install Oberon 1100x704 0 74 ~"/> &#9;&#60;Setting name="OberonStart" value="Oberon.Call System.Init Oberon"/> This in more recent revisions. &#60;Section name="Autostart"> &#9;... &#9;&#60;Setting name="Start an Oberon" value="Oberon.Start Oberon 1100x704 0 74 ~"/> The dimensions, 1100x704, can be adjusted for satisfactory proportioning of text in a viewer. If the Oberon window is stretched, by grabbing the lower right corner with the mouse, the proportionality of text to viewer is preserved.

Usage Tips, Keyboard and Mouse
Mouse usage is unusual but efficient. Definitely worth the small effort to learn. A mouse with three buttons or two buttons and a wheel is almost essential. The &#60;Esc> key is used to interrupt a task. For example it can interrupt a long running FTP.GetFiles. &#60;F1> sets the * marker. &#60;F2> clears all marks. If a mouse button is pressed unintentionally, all mouse buttons pressed together before releasing any will have no effect. Comprehensive details of mouse and keyboard input and usage are in Mouse support, Mouse tutorial and Keyboard support pages.

Telnet Console
Telnet is an insecure protocol but provides a host console within the Oberon sub-system. The instructions for ETH Oberon are applicable in the Oberon subsystem.

Email
The instructions for ETH Oberon are applicable in the Oberon subsystem.

News Reader
Notes pending.

Module Sources, Tools and Configuration Texts
A tiny sample of the approximately 2000 sources in A2.

A contemporary Firefox browser attempts to infer "Content type" from the name extension. By default Firefox infers wrongly that source file *.Mod contains "Amiga SoundTracker audio" and fails to open it. This difficulty is resolved by adjusting the "Action" Firefox associates with "Content Type". Open hamburger menu > Settings > General > Applications. For "Amiga SoundTracker audio" choose an editor such as /usr/bin/mousepad or /usr/bin/gedit. Most sources in A2 have been converted to plain ASCII text; some remain as Oberon Text. Gedit will open all of these. Mousepad and several other editors will not open Oberon Text. Content type "plain text document" should also be set to the chosen editor. With these adjustments Firefox should open most of the files in the repository.

In some contexts the user may fail to find a configuration of a browser to open files in the repository. In any case a browser should open the Wikibook copy.