Oberon/A2
Links Edit
Installing and Running A2 Edit
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 Edit
The original instructions[1] 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, sys can be changed to bin.
chgrp -R sys ${aosdir}
vs.
chgrp -R bin ${aosdir}
The UnixAOS working directory can have an ext2 or FAT filesystem on a removable flash store.
The aos start script, installed by install.UnixAos, by default to /usr/bin/aos, adjusts the operating system environment before starting aos.{solaris,linux,darwin}. As noted in Readme.txt, UnixAos can be started with these two commands.[2]
cd <myWorkingDirectory> aos
Of course <myWorkingDirectory> must be replaced with a specific directory name.
User and Machine Specific Configuration of UnixAOS Edit
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.[3] 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.<host>.XML. To use the Oberon subsystem, create Oberon.<host>.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.[4] 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.<Host>.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 Edit
Originally, sources and executables for several platforms were maintained in an Apache Subversion (SVN) repository. The contemporary Git based repository began with files from SVN revision 10270.
The repository based method of installation provides the latest version and allows ongoing updates. In summary, the method is to establish a local working copy of the repository and to update when convenient. The repository is checked out from the ETHZ archive and A2 can be built for various platforms including a bare PC. As of 2022 January the repository contained completely working executables in subdirectories for Windows, Linux (Intel 32 and 64 bit) and ARM. The working copy of the repository will occupy 0.5+ GB depending upon inclusion of executables.
SVN in a Unix-like System Edit
Install Subversion. In Redhat, for example,
sudo yum install subversion
and in Debian.
sudo apt install subversion
Before attempting to create the local repository, check that UTF-8 character encoding is present in the system. An encoding failure will interrupt checkout with a report similar to this.
svn: E155009: Failed to run the WC DB work queue associated with '/home/me/a2', work item 15168 (file-install 44 UnixAos/DarwinA2 Installer/A2 64.app/Icon{U+ F00D} 1 0 1 1) svn: E000022: Can't convert string from 'UTF-8' to native encoding: svn: E000022: /home/me/a2/UnixAos/DarwinA2 Installer/A2 64.app/Icon{U+F00D}
If a locales package is available, it should be installed and configured according to instructions such as for Debian. Encoding "en_US.UTF-8 UTF-8" and several others will be effective.
At an arbitrary location, <somewhere>, in the user directory make a directory for the working copy of the repository. Eg.
mkdir <somewhere>/a2[5]
Clone the repository into the directory. In a graphical environment, a dialogue prompting for the password may appear. In that case, the password option should be omitted from the command.
cd <somewhere>/a2 svn checkout \ --username infsvn.anonymous \ --password anonymous \ https://svn-dept.inf.ethz.ch/svn/lecturers/a2/trunk .
Files will be reported as they are retrieved.
Redirecting to URL 'https://svn.inf.ethz.ch/svn/lecturers/a2/trunk': A UnixAos A UnixAos/buildtools A UnixAos/buildtools/Darwin.AMD64.Tool A UnixAos/buildtools/Solaris.I386.Tool A UnixAos/buildtools/Solaris.AMD64.Tool A UnixAos/buildtools/UnixAosBuild.Tool A UnixAos/buildtools/Linux.I386.Tool A UnixAos/buildtools/Linux.AMD64.Tool A UnixAos/buildtools/Darwin.I386.Tool A UnixAos/boot ...
If checkout is interrupted, by an encoding error or communication failure, this should recover.
cd <somewhere>/a2 svn cleanup . svn update .
Check that the local repository is complete.
svn status <somewhere>/a2
Subsequently, the local repository can be updated.
cd <somewhere>/a2 svn update \ --username infsvn.anonymous \ --password anonymous .
See what has changed (including every changed file) since this subversion repository was created. This will produce a very large output.
svn -v log <somewhere>/a2
For additional details refer to the svn manual.
Documentation predating the SVN archive is in A2Documentation.pdf available from http://cas.inf.ethz.ch/projects/a2/repository/show/trunk/ocp/Documentation. Also refer to the Wayback Machine.
Git in a Unix-like System Edit
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 official Web site. Release specific information is also available. For Debian Linux, refer to the UsingGit wiki page. These commands are used where apt is available.
apt install git apt install git-lfs
Choose a name for the repository directory; "myoberon" in this example. The ls command allows avoidance of name conflict.
ls -ld myoberon
If a "myoberon" file or directory exists, rename it or choose another name. Then create the repository.
git clone https://gitlab.inf.ethz.ch/felixf/oberon.git myoberon[6]
Use git-lfs to track some zip archives.
cd myoberon git lfs track "Linux*.zip" git add .gitattributes
Check which large files are tracked.
git lfs track
Retrieve a specific archive file.
git lfs fetch Linux64.zip
Verify existence of the zip archive.
ls -ld Linux64*
Unzip.
unzip Linux64
Execute the start script.
Linux64/a2.sh
A2 should appear.
The content of a2.sh can be displayed by executing "cat a2.sh" or by opening with an editor. The script performs two actions. "cd `dirname $0`" changes to the directory where a2.sh resides; ~/oberon/Linux64 for example. Then "./oberon 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 oberon.ini ~. oberon.ini also contains A2 commands. The last command is "FSTools.Mount WORK RelativeFileSystem .~" 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.
SVN in MS Windows Edit
While SVN is not distributed with Windows, third party softwares are available. TortoiseSVN is one possibility. Install an SVN client and proceed as for Unix-like system as described above. SVN commands are executed in Powershell or in the cmd console (instead of "mkdir" use "md"; don't include the Backslash indicating continuity of the svn command), both available in Windows 10. The executable script for Windows is named a2.bat rather than a2.sh. If using PowerShell change "oberon" in a2.bat to "./oberon" or ".\oberon".
Git in MS Windows Edit
Git is available directly from the official Web site.
Module Naming Edit
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 Edit
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.
Target System | Generic[7] Object File Name Extension | Symbol File Name Extension |
---|---|---|
Unix, x86, 32 bit | .GofU | .SymU |
Unix, AMD64, 64 bit | .GofUu | .SymUu |
Windows, x86, 32 bit | .GofW | .SymW |
Windows, AMD64, 64 bit | .GofWw | .SymWw |
ARM, 32 bit[8] | .GofA | .SymA |
ARM, 64 bit | .GofAa | .SymAa |
Object and Symbol File Names Edit
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 Edit
With the A2 repository in place according to the preceding section, A2 can run.
Identify supported architectures.
cd <somewhere>/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 Edit
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 Edit
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 Edit
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.
Oberon Subsystem Edit
Opening the Oberon Sub-system Edit
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.
<Section name="Autostart"> ... <Setting name="OberonDisplay" value="OberonDisplay.Install Oberon 1100x704 0 74 ~"/> <Setting name="OberonStart" value="Oberon.Call System.Init Oberon"/>
This in more recent revisions[9].
<Section name="Autostart"> ... <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 Edit
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 <Esc> key is used to interrupt a task. For example it can interrupt a long running FTP.GetFiles. <F1> sets the * marker. <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 Edit
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 Edit
The instructions for ETH Oberon are applicable in the Oberon subsystem.
News Reader Edit
Notes pending.
Text Edit
TextDesc is an extension of Objects.ObjDesc. The fields added to make TextDesc are distinguished from the fields inherited from ObjDesc by differing background colors.
Type | Fields of TextDesc |
Types of Fields | Notes |
---|---|---|---|
Texts.Text, a pointer to a Texts.TextDesc | stamp | LONGINT | Integer |
dlink | Objects.Object | Pointer | |
slink | Objects.Object | Pointer | |
lib | Objects.Library | Pointer | |
ref | INTEGER | ||
handle | Objects.Handler | Pointer | |
len | LONGINT | Length of text. | |
obs | Objects.Library | Pointer | |
trailer | Texts.Piece | Pointer to Sentinel node in list of pieces. | |
org | LONGINT | Offset in [0,len) of first character in last found piece. | |
pce | Texts.Piece | Last found piece. |
Type | Fields of LibDesc | Types of Fields | Notes |
---|---|---|---|
Objects.Library, a pointer to a LibDesc | next | Objects.Library | Pointer |
ind | Objects.Index | Pointer | |
f | Files.File | Pointer | |
R | Files.Rider | Pointer | |
name | Objects.Name | ||
dict | Objects.Dictionary | Pointer | |
maxref | INTEGER | ||
GName | POINTER |
Type | Fields of PieceDesc | Types of Fields | Notes |
---|---|---|---|
Texts.Piece, a pointer to a Texts.PieceDesc | f | Files.File | Pointer |
off | LONGINT | Integer | |
len | LONGINT | ||
obj | Objects.Object | Pointer | |
lib | Objects.Library | Pointer | |
ref | INTEGER | ||
col | SHORTINT | ||
voff | SHORTINT | ||
prev | Piece | Pointer | |
next | Piece | Pointer |
Module Sources, Tools and Configuration Texts Edit
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.
ETHZ Repository | Wikibook[10] | Notes |
---|---|---|
BIOS.V24.Mod | BIOS.V24.Mod | |
BootManager.Asm | BootManager.Asm | BootManager source written in Network Assembler by André Fischer. |
BootManager.Mod | BootManager.Mod | Module containing one command Split.[11] |
BootManager.Text | BootManager | Instructional document written by André Fischer. In the repository and in MediaWiki representation. |
BootManager.Tool | BootManager.Tool | Tool file summarizing the instructional document. |
Oberon.Configuration.Mod | ||
Configuration.XML | ||
Oberon.Desktops.Mod | ||
Oberon.Documents.Mod | Oberon.Documents.Mod | |
Oberon.ET.Mod | ||
Oberon.Files.Mod | ||
Oberon.Gadgets.Mod | Oberon.Gadgets.Mod | |
Oberon.HTML.Mod | Oberon.HTML.Mod | Revisions for conformance to HTML5. |
HTML.Tool | No "preview" in the ETH Repository. | |
Oberon.HTMLDocs.Mod | Oberon.HTMLDocs.Mod | InitEntities() expanded to support more characters. |
Oberon.ISO9660Files.Mod | ||
Oberon.ISO9660Volumes.Mod | ||
Oberon.MIME.Mod | Oberon.MIME.Mod | |
Oberon.Mail.Mod | Oberon.Mail.Mod | Deviation from SMTP corrected. Wrap() added. Names of types revised. Show() revised. Calculation of cont.len corrected. |
Oberon.MultiMail.Mod | Oberon.MultiMail.Mod | |
Oberon.News.Mod | Oberon.News.Mod | Authentication added to allow access to contemporary servers. |
Oberon.MediaWiki.Mod | Not in A2 repository. | |
Oberon.Objects.Mod | ||
Oberon.Out.Mod | Oberon.Out.Mod | Allow delay of execution of Append, using a flag variable. |
Oberon.Out1.Mod | Allow delay of execution of Append, using a procedure variable. | |
Oberon.OutStub.Mod | Oberon.OutStub.Mod | |
Oberon.QuotedPrintable.Mod | Oberon.QuotedPrintable.Mod | Variant from LinuxA2 Gen. 32-bit, rev.9527. |
Oberon.RFC3986.Mod | Percent encoding and decoding of URL. Not in A2 repository. | |
Oberon.Sort.Mod | Oberon.Sort.Mod | Better presentation of output. Revisions incomplete. |
Oberon.Streams.Mod | ||
Oberon.Strings.Mod | ||
Oberon.TFTPTool.Mod | Oberon.TFTPTool.Mod | |
Oberon.TextDocs.Mod | ||
Oberon.TextFrames.Mod | Oberon.TextFrames.Mod | LOOPs removed. |
Oberon.Texts.Mod | ||
Oberon.V24.Mod | Oberon.V24.Mod | |
Release.Oberon.Text | Oberon.Text | Usually Oberon.Text is customized to a user. |
TFTP.Mod | TFTP.Mod | |
Unix.Oberon.NetSystem.Mod | Unix.Oberon.NetSystem.Mod | Handling of "@" characters in parameter of SetUser improved. |
myaos | Start script allowing use of a removable working store on multiple machines. Adaptable to requirements of user. Not in A2 repository. |
Footnotes Edit
- ↑ The Git repository, described subsequently, is a more recent method of installation and release tracking.
- ↑ The command line prefix in a Unix-like system is user configurable and can be configured to the empty string. For simplicity, the prefix is omitted in most of the commands shown here.
- ↑ A filesystem can become corrupted if not unmounted before the system is shut down. The directory can also be damaged by natural degradation of the storage media. If the filesystem is intact, the execution time for e2fsck is negligible.
- ↑ See Oberon/Text.
- ↑ In a Unix like system, many variations are available.
cd ~ ; mkdir a2
for example. - ↑ git clone document.
- ↑ "Generic" refers to applicability of the loader and linker to all target systems, independent of change in language and runtime system.
- ↑ Allowing A2 on the Raspberry Pi.
- ↑ The Oberon subsystem is invoked with MenuPage30.XML. The change from two commands to one is reported by
svn diff -r 5253:5254 .../MenuPage30.XML
- ↑ In some cases the Wikibook copy differs from the latest file in the ETHZ repository. For an exact comparison, use a file comparator; Diff.Do in Oberon, comm in Linux. Some sources have a discussion page. Oberon.Mail.Mod discussion for example.
- ↑
BootManager.Split BootManager.Bin
is executed to divide BootManager.Bin into BootManagerMBR.Bin and BootManagerTail.Bin. For additional details, refer to the instructional document of André Fischer.