# Oberon/ETH Oberon/newfaq

This document was originally hosted at the ETHZ. It remains under the ETH license and is in the WayBack archive.
From: ftp://ftp.ethoberon.ethz.ch/ETHOberon/Native/Update/Beta/ [expired]
Links
   * ETH Oberon Home Page
   * FAQ on the Oberon Language: specifically related to the Oberon language and the compiler.
   * FAQ on the current releases: Questions on the current Native Oberon release and on the other implementations.
   * FAQ on bluebottle
   * FAQ on Oberon for .net
Fixed errors
* When are files effectively deleted from a FS?
* Windows 2000 problem in conflict with Oberon
* Copying a file of a specific length causes the system to freeze
* The Buttons in System3.Tool have a wrong color
Known error
* Adaptec AIC-7861AHA-2940AU SCSI Controller hangs
* TRAP -7 during installation
Seemingly a problem, but not one
* Booting Oberon-0 on machine with 1024 Kb of extended memory
* "Incompatible version" error
* Boot virus on the Oberon-0 diskette
* Intel Pentium F0 0F bug
General questions
* Give an advice to a newbie on how to start with Oberon
* Explain the numbering schema of Oberon
* What is the historical background of the ETH Oberon System?
* Where do I find information about Oberon-0?
* How could one characterize Native Oberon in terms of multitasking?
* Is a new release of ETH Oberon planned?
* Is a version of ETH Oberon with an integrated development environment (IDE) more like CodeWarrior, Visual C++ or Visual Basic planned?
* How is Aos different from Native Oberon?
Hardware support
* Is a Native Oberon demo on a floppy diskette available?
* What hardware is supported?
* Is there an SDK for the purpose of writing drivers?
* Can I use ... Intel clone / non-US keyboard / 2-button mouse / AGP / USB / dot matrix printer ?
* Can I use ... EIDE and SCSI combined / ZIP / SCSI CD-ROM / recordable CD drive?
* Can I use ... Disk On Module / Disk On Chip?
* Can I install Oberon in flash memory?
* Is power management supported?
* Which of the devices installed in an older machine might work?
Installation
* How much time shall I have to invest to get a Native Oberon system running?
* How do I have to set up the BIOS on my machine?
* Can I boot Oberon from any partitition on a disk larger than 8GB?
* Can I install Oberon without repartitioning?
* Can I install Oberon from a hard disk?
* System hangs when selecting a HD driver
* Partitions.Show indicates read error on hard disk
* How does Oberon assign drive letters in Partitions.Show?
* How do I access a network service with user name, password, domain name?
* How do I install Oberon on a Sony VAIO?
* What does the strange, morse code-like beeping during startup mean?
Boot diskette
* Why does the creation an Oberon0 boot diskette end with an error?
* How to create a boot diskette for an existing Oberon
* How to create an image file of an existing Oberon (partition)
System start
* System hangs after displaying "OBE"
* System hangs after displaying "OBE" when booting from LILO
* How special is configuration file Oberon.Text?
* After customizing Oberon.Text the system fails to restart
* Oberon.Text errors at start-up
* System hangs with black screen when booting
System shutdown
Compiler (General)
* Can I get a disassembly of an object file?
* Is there an Oberon compiler for other development environments?
* How to write a back-end for a new architecture: ETH Oberon Compilers
File system
* How to organize a system with a minimum of two partitions
* Will a file search slow down with an increasing number of files?
* When does file garbage collection take place?
* How to direct a file to the proper FS
* How to mount a FAT16 partition
* How to access a backup diskette
* What is the maximum length of filenames?
* How to cache data in temporary files
* Can I process a *.zip archive in Oberon?
Software development
* What is the grammar of a module definition ( .Def) obtained with Watson?
* Where is the definition of module SYSTEM?
* Does Oberon expose enough system functionality in SYSTEM?
* How to force Oberon into "input mode"
* How to output a real value with the desired precision
* How to compare procedure variables
PCI detection
Oberon text
* How to distinguish an underscore from a hyphen
* Can the underscore be patched?
* How to use the cursor movement keys
* How to write Oberon source text using lower case characters only
2D graphics with Gfx
Hypertext documents
* How to save the source text of a browsed document
* How to clear the cache
Postscript files
* How to print out a postscript file
* Is there something like a viewer for postscript file?
I/O port control
* How to control a serial port
* How to control a sound card
* How to control a parallel port: Serial and parallel port support
* How to control an USB port: USB support
* How to make a simple sound on the loudspeaker: Speaker support
Gadgets
* How to break the 64 charaters limit in a gadget TextField
* How to insert images in a user interface
* How to add items to a drop-down menu in System3.Tool
* How to create a drop-down menu like the ones in System3.Tool
Linux Native Oberon
* TRAP when using the opcode OUT
* How to use the Linux sound drivers
* How can I reduce the screen size from the current 1024x768 pixels
Oberon for Linux (x86)
VNC client
* Alt-key does not work
* Arrow down key does not work
* When I delete files from an AosFS volume, this space is not made available until the volume is unmounted and then remounted. For example, if I have an AosFS formatted floppy that is full; I mount the volume and delete all its files, then I attempt to copy a file to this "empty" floppy - the result is a trap stating that the volume is full. If I unmount the floppy and then remount it, I can then copy to the volume. Is this an oversight, or done for good reason? A: This was inherited from the Ceres file system published in Project Oberon. That file system only does garbage collection at boot time, when we are sure there are no open files. This simplifies the garbage collector significantly. The old Native file system was the same. The current beta release does garbage collect anonymous files on-the-fly.
* Windows 2000 problem. If W2 is installed after one (or several) Native Oberon, it thinks it found a corrupted FAT32 partition and proceeds to fix it by writing in the first sectors and a bit later W2 hangs. Good bye Oberon partitions! This happens indifferently of the partition type, whether 76 (new) or 79 (old). If Oberon is installed after W2, at the next start W2 crashes with a "unhandled exception". No W2, no Oberon left intact. A: Partitions.Format is now fixed to work around the Windows 2000 Setup bug which causes it to "recognize" Native Oberon partitions as FAT partitions.
* Curious bug: Create a text file, call it "c11936", containing exactly 11936 bytes, and execute; DOS.CopyTo "c:/" c11936 ~ The system freezes but there is no trap. Ctrl-Break recovers. There is no problem if the file contains 11935 or 11937 characters. DOS.CopyTo has never failed with any other file. A: The problem is actually in the normal file system. It has existed from the very first Oberon system published in Project Oberon. When Files.ReadBytes reads past the end of a file that has size n*2048-352 (for any integer n > 0), then the .res field in the rider is set incorrectly. This causes DOS.Copy to loop endlessly. The same error occurs with the new AosFS, but with files of size n*4096-568. Both errors are fixed now.
* The Buttons in System3.Tool are sort of green with my new Voodoo card using the Vesa2 driver. Is this a new feature or a bug? A: It was a driver bug (until beta000526) which is fixed now.

## My computer equipped with an Adaptec AIC-7861AHA-2940AU SCSI Controller hangs. Can you help? - Alan Freed

    A: No clue at this time. The problem is being investigated.

## TRAP -7 during installation.

    A: TRAP -7 is the "device not available" exception of the processor. It means a floating-point instruction was encountered, and floating-point is not implemented in the processor. The Cyrix Cy486SLC, mentioned, does not have floating-point. This is actually a bug in Native since we switched to the zip format for the boot disk compression. Previously it was possible to boot the system without using floating-point, and the floating-point emulator was loaded by the System module. To fix it, the floating-point operations have to be removed from the Zip module procedures used during booting, or the floating-point emulation module has to be linked with the boot file.
    1. Booting my 486 laptop, which has 1024 Kb of extended memory, from the Oberon-0 diskette ends with:
          A: A 2Mb RAM disk is created by default by Oberon-0. That means at least 3Mb or so are needed for the installation. Technically, Oberon can run with less, but it would require a bit of effort to update the installation program to use less memory.
    2. Execution of Diff.Do Empty.Display.Mod GD54xx.Display.Mod ~ ends with:
       Also happens with other files.
          A: Looks like you have an old version of Diff running on a new system. The new object files have keys incompatible with the old system. The difference is related to open arrays, which seems to be confirmed by the two procedures listed above.
          ==> Did you reinstall the apps package on the new system?
    3. I found a parity.b boot virus on the boot diskette created from beta000320 version. Is this a potential thread?
          A: This is a false alarm. Virus checkers often use heuristics to "detect" viruses. In this case the boot sector does not look like a normal DOS boot sector, so the virus checker assumes that it was infected by a virus. The diskette image file is not touched by a non-Oberon machine during its production. Some checkers will detect a Bloodhound.Boot virus.
    4. When I ran dmesg under Linux to help trace down my SCSI problem, I noticed the following line:
       It seems as if my computer has the Pentium bug. I don't know if the kernel detects this, and if found, imposes a workaround like that of Linux?
          A: It is probably not necessary to fix the Pentium bug in Oberon. From the description of the bug at https://en.wikipedia.org/wiki/Pentium_F00F_bug it seems that the only effect of the bug is to hang the machine. This is serious in multiuser operating systems, because any non-privileged user can hang the machine (and not just the root or administrator user).
          In Oberon it is not a problem, because it is a cooperative single-user environment. If you do not stick to the safe part of the Oberon language, there are many other ways to hang the machine.

## Give an advice to a newbie on how to start with Oberon

    A: Assuming that you are interested in programming in Oberon, start with the book "Programming in Oberon" by N. Wirth and M. Reiser, to learn the language proper. Depending on your background this could take you little time, especially if you have some experience with Pascal. Have a try at these tutorials:
*   * An Introduction to Oberon by Günther Sawitzki - http://www.statlab.uni-heidelberg.de/projects/oberon/Ito/ A german version Einführung in die Programmiersprache Oberon is also available. Both tutorials include an appendix entitled "Oberon for Pascal Programmers".
*   * Pedro G. Gonnet's quick-and-dirty tutorial written (in German) for first year computer science students.

## Explain the numbering schema of Oberon.

    A: Historically, there has been two independently maintained "branches" of Oberon: V4 and System 3. System 3 is the ETH branch, which is still actively maintained by Prof. Gutknecht's group and external collaborators like Günter Feldmann at the University of Bremen. V4 was maintained by the University of Linz in Austria.
    To try and reduce the confusion, we have renamed "Oberon System 3" to "ETH Oberon" a couple of years ago.
    The latest official release of ETH Oberon for various platforms is always available by anonymous ftp at Sourceforge. Formerly at ftp://ftp.ethoberon.ethz.ch/ETHOberon/.

## What is the historical background of the ETH Oberon System?

    A: Read the ETH Oberon System White Paper.

## Where do I find information about Oberon-0?

    A: Oberon-0 can refer to one of three things:
*   * The subset of the Oberon programming language presented in Wirth's most recent book Compiler Construction. German version. Oberon-0 comprises a minimal set of necessary programming language features such as value assignment, statement sequences, if and while constructs as well as the concept of procedures. Hence, the language is simple to learn and expressive enough for specifying application processes. Further, the simplicity of the language keeps the compiler small and efficient which is important with respect to runtime compilation and evaluation.
*   * The subset of the classic Oberon system, in object-oriented style presented in Prof. Mössenböck's Object-Oriented Programming in Oberon-2 book. German version
*   * The minimal Oberon system used to boot an Intel machine for the purpose of installing Native Oberon. Produced from Oberon0.Dsk.
    Finally, the Oberon-00 programming language is a subset of Oberon, which is translated to a Lola data structure with programs written by Niklaus Wirth.

## How can one characterize Native Oberon in terms of multitasking?

    A: Native Oberon is a single-threaded multitasking system. It has two kinds of tasks: interactive and background. Interactive tasks consist of short-running "commands" initiated with the mouse by the user and background tasks consist of "handlers" that are called periodically by the system's idle loop. In a conventional operating system sense, the Oberon system has only one thread of execution residing in a single process. The procedure call in Oberon is the indivisible unit of execution (excepting procedures installed as interrupt handlers). The system-wide central loop (the Oberon.Loop) cycles between:
*   * farming out events to on-screen viewers by broadcasting message records to the viewers on screen. Such a broadcast is nothing more than calling the installed handler procedure in each display frame with a record (passed by reference) containing information about the event that occurred.
*   * Invoking background tasks, which are nothing more than objects (on the heap) containing a procedure pointer. The object can hold local state for the procedure between invocations. It is up to the installed task not to hog the processor (i.e. to return control to the Oberon.Loop promptly) so that the responsiveness of the system can be maintained.
    The original Oberon system has been extended in various ways to allow more tasks run with equal priority. See Wirth's "Tasks vs. Threads" paper, Concurrent Oberon, ETHOS, Aos.

## Is a new release of the current alpha ETH Oberon planned?

    A: The system is being maintained by volunteers. The ETH developers are now working on the Bluebottle system, so there is no fixed release schedule. A new release is planned for the end of 2002. It will mostly be a bugfix and consolidation release.

## Is a version of ETH Oberon with an integrated development environment (IDE) more like CodeWarrior, Visual C++ or Visual Basic planned?

    A: The Oberon operating system was originally developed in the late eighties, and predates all the integrated development environments mentioned. It was intended as a minimalist OS that could be studied and used at all levels of detail. For a rationale, refer to the "Project Oberon" book by Wirth and Gutknecht. The Oberon operating system is much more than an IDE! Other groups have made Oberon-like environments that integrate closely with Windows, and might work more like conventional Windows-based development environments. The following can be cited:
*   * The BlackBox system from Oberon Microsystems in Switzerland. Free educational version available at: www.oberon.ch
*   * The POW! system from the University of Linz in Austria. http://www.fim.uni-linz.ac.at/pow/pow.htm
    At the ETH, the preference is given to the system's original textual-user interface for teaching, not the GUI desktop or Windows embeddings. If presented correctly as a minimalist system without distractions, this can be very successful in teaching programming. The operation of the TUI (edit, compile, test) can be taught in one tutorial session.

## How is Aos different from Native Oberon?

    A: In Aos, activities are mapped to active objects, which are scheduled preemptively on multiple processors.

## Is a Native Oberon demo on a floppy diskette (or 2 floppies or a CD image) available, like the QNX demo diskette, for testing Oberon out and checking how good my hardware is supported?

    A: Download Oberon0.Dsk and rawrite.exe at ftp://ftp.ethoberon.ethz.ch/ETHOberon/Native/Update/Alpha/ Write Oberon0.Dsk to a formatted 1.44MB diskette using rawrite.exe and boot it.

## What hardware is supported? From looking at some of the documentation there needs to be more hardware support. Is something in the pipeline?

    A: Consult the Hardware Compatibility List, which contains indications on how to writer drivers for disk and graphic controllers in particular. For display controllers, we have a couple of accelerated drivers with truecolor support (Permedia 2, S3Trio64) and some without truecolor (S3C805, W32, GD54xx) and then some generic drivers (VGA, VESA 2.0, VESA 3.0) that work on many cards. More display drivers are added all the time.

## Is there an SDK for the purpose of writing drivers?

    A: No. The best source of information is the source code of existing "model" drivers. The intention is to identify the best among the drivers, and let those be examples.

## Can I use ...?

    A:
*   * an Intel clone machine: yes - Hardware Compatibility List
*   * a non-US keyboard: yes - Keyboard support
*   * a 2-button mouse: yes - Mouse support
*   * an AGP graphic card: yes - Hardware Compatibility List
*   * USB devices: yes - USB support
*   * a dot matrix printer: no - Printer support

## Can I use ...?

    A:
*   * EIDE and SCSI combined: yes - Disk support
*   * a ZIP drive with parallel interface: no - Disk support
*   * a SCSI CD-ROM: no - Disk support
*   * a recordable CD drive: no - Disk support

## Can I use ...?

    A:
*   * a Disk On Module - DOM: yes - Disk support Michael A. McGaw reports the following on this subject: I have been using Disk On Modules, model DOM-4-40V by ADLink Technology, Inc. These modules have an IDE connector as part of the module itself, and therefore are plugged directly into the motherboard IDE connector (no IDE cable required, nor any special mounting hardware/location). There is a Molex power connector that must be connected to one of the PC supply Molex connectors. That's all. They work fine; I have a great many in use with Tyan and DFI motherboards (these are used for DOS-based applications at this time). They also appear to work well with Oberon. I have the stable Native release (not beta nor alpha; I have not tried these, although I suspect they will be fine as well) running on a 4 MB version of this module. For this system, I have a very compact and efficient complexion of modules, enabling me to do development even though this is intended as a run-time only target environment, remotely controlled by a Windows application communicating with the target via UDP over ethernet. Your recommendation of using an 8 MB module is well taken.
*   * a Disk On Chip - DOC: no - Disk support

## Can I install Oberon in flash memory?

    A: No, not with the downloadable version. But Radiar has developed a custom solution for an Intel DA28F640JS flash PROM memory used on their C2 board, including an OBL. This board was built for the Colortronic company. In that industrial system, the lower level application without Gadgets uses a file system with 1.3 MB. A simple application with Gadgets use less than 4 MB.

## Is power management supported? With reference to notebooks.

    A: Simple power management is supported. During the idle loop, Oberon executes the HLT instruction, which stops the processor until the next interrupt (e.g. timer, mouse or keyboard interrupt). This saves a significant amount of power. Native Oberon uses the Advanced Power Mangement (APM) specifications already to switch off the machine during shutdown. In the future, we might look at ACPI.

## Which of the devices installed in an older machine might work? I am thinking in terms of making it a dedicated Native Oberon machine.

    A: The machine has:
*   * two IDE hard drives: the Standard ATA/EIDE driver might be used successfully. Otherwise, the standard IDE driver included in earlier versions might be revived/refreshed for a real old controller. Only one drive could be used though.
*   * an Adaptec AVA-1505: will probably not work. An AHA-1520 is supported.
*   * an ATI Mach 64 graphic card: will not work in 1024 x 768 x 8 mode as one would like to have it. vesainfo.exe informs:
       VESA 1.2 512kb ATI MACH64
          100 C000:4DC9 A000 W A000 R 64K 64K 640x400x8
          101 C000:4DC9 A000 W A000 R 64K 64K 640x480x8
       But even so, read on Display Support.
    More generally, consult the Hardware Compatibility List.

## How much time shall I have to invest to get a Native Oberon system running?

    A: The time it takes to:
*   * optional: organize your machine to accept Oberon to coexist in a dedicated partition with the already installed operating system(s). Consider to purchase commercial software to complete this step. Among others, PartitionMagic is a good investment.
*   * download the files of the implementation of your choice. A minimum of 3 MB and a maximum of 10 MB.
*   * unpack the software on your platform, sometimes it requires creating a boot diskette. This is the effective installation procedure which should take approximately 10 minutes.
*   * customize the Oberon system by editing the Oberon.Text, following the instructions in System.Text.
*   * optional: install Oberon packages above the already fully functional programming environment. Each package requires no more than a fraction of a minute to install.

## How do I have to set up the BIOS on my machine?

    A: How to set up the BIOS.

## Can I boot Oberon from any partition on a disk larger than 8GB?

    A: 8.4GB hard disk capacity barrier.

## Can I install Oberon without repartitioning?

    A: Yes, in these cases:
*   * The Native Oberon version for Dummies can be installed in a FAT16 partition having 40Mb and more free space. FAT32 support is being implemented. Documentation.
*   * Linux Native Oberon can be installed in an existing ext2 partition.
*   * An existing and totally free partition of at least 40MB can be dedicated to Oberon.

## Is it possible to boot and install Oberon from a hdd? I have a laptop here, I would like to put Oberon on, but it does not have a floppy drive, and I don't have an ide<->mini-ide cable (can't find suppliers).

    A: Yes, but only with the last release version, not with the new beta version. See:
       ftp://ftp.ethoberon.ethz.ch/ETHOberon/Native/DosBased/ [expired]
    Later the beta version will also support installing from non-floppy media.

## When I attempt to choose the Adaptec driver from within Oberon-0 the system freezes.

    A: Sometimes initializing the driver can take quite long, as the SCSI bus is scanned. Try waiting up to a minute for this to finish.

## I tried installing the new beta and when I boot up from Oberon-0 and use Partitions.Show, my first IDE hard drive reads with read error 2, the second drive reads ok, but I had freed up space using Partition Magic 4.0 on the first drive to install it. Why isn't it being read correctly?

    A: Do System.OpenKernelLog in Oberon-0, before configuring the disk driver. After configuring it and running Partitions.Show, store the Kernel.Log and transfer it to a diskette (see Appendix C of Install.Tool), and mail the text to me. ATA disks errors are documented at the end of the ATADisks.Mod module.

## How does Oberon assign drive letters in Partitions.Show?

    A: Since the introduction of the mountable file systems, drive letters are not used anymore. In a version predating the current Alpha / Beta version, drive letters are assigned to FAT partitions by starting at C: and sequentially scanning all partition tables for partitions of type 1, 4 or 6. If multiple disks are available, IDE disks are scanned first, in the order primary master, primary slave, secondary master and then secondary slave. Then all Adaptec SCSI disks are scanned, in the bus order, and then USB devices are scanned, in initialization order.

## How do I access a network service with user name, password, domain name?

    A: The communication adapter must be configured in the NetSystem section of Oberon.Text. The NetSystem.SetUser command is used to access a service. There are many ways to customize the access procedure: from occasional access to a more permanent set up. In the following explanations, we assume that the password is always entered in an invisible mode under the control of a system prompt.
*   * Specify a document by its URL and open it - e.g. ftp://user@server.domain.tld ~
       The following will appear in the System log:
       NetSystem.SetUser ftp:user@server ~
       - no password or username specified
       ftp://user@server.domain.tld loading document failed
       Now, execute the NetSystem.SetUser command and enter the password after the prompt. Finally, open the document.
*   * Execute a NetSystem.SetUser prior to attempting to open a document by its URL. Here also, a prompt message asking for the password will appear in the log. Now, open the desired document.
       One can specify a list of URLs after the SetUser command to set several passwords in one go. Delimit the passwords with at least one blank. If the number of URLs exceeds the number of passwords, the last password applies to the remaining URLs.
       Execute NetSystem.Show to show the state of NetSystem including for which users a password was entered. The password is never revealed.
       Execute NetSystem.ClearUser to clear all the passwords.
*   * Edit Oberon.Text, adding a NetSystem.SetUser command in the System.InitCommands section. Here also, one can specify a list of URLs after the SetUser command.For all the procedures presented up to now, the password may be included in the URL (e.g. ftp://user:password@server), but be conscious of the dreadful security breach!!! Additional information on the command syntax is found in NetSystem.Tool .

## How do I install Oberon on a Sony VAIO?

    A: The difficulty comes from the fact that PCMCIA is not supported by Oberon yet. Assuming that a free partition and a FAT167FAT32 partition under Windows exist, the difficulty can be circumvented.
*   * In Windows, install Oberon Dummy (from the VIS CD-ROM or downloading it) and produce a bootable diskette with a diskette drive attached via USB.
*   * Copy the Aos installation files, obtained by ftp, to a directory in the FAT partition.
*   * Boot Oberon from the diskette just created. It may be necessary to deactivate the Plug'n'Play option of the VAIO BIOS, in order that Oberon recognizes the USB disktte drive.
*   * Mount the FAT partition containing the Aos installation files.
*   * Open AosInst.Tool (found among these installation files).
*   * Follow the instructions in AosInst.Tool.

## What does the strange, morse code-like beeping during startup mean?

    A: Older versions of Native Oberon generate the morse code when an unrecoverable error occurs during booting. The morse can actually provide useful information on the location of the error, but in later versions this acoustic signal was removed, since very few people can decypher the code, and most people seem to be startled by it. The problem might be related to the lack of a coprocessor, as in the reported case of an i486SX on-board of an old laptop Compaq Conture 4/25CX. Some versions of Native do not include the floating point emulator in the boot file. Please try with the latest Alpha version downloadable at Sourceforge.

## Why does the creation an Oberon0 boot diskette end with an error? The last block cannot be written. The diskette capacity is exceeded.

    A: Make sure to transfer the Oberon0.Dsk file in BINARY mode. Some FTP clients default to ASCII mode, which converts CR to CR-LF's. Compare the size of the downloaded file with that of the file on the server. If you have an Oberon system running, use it. The ftp viewer clearly distinguishes between "binary" and "ascii".

## How do I create a boot diskette for an existing Oberon system.?

    A: If a bootable diskette was not created during the installation, you must boot the Oberon-0 system and execute a small selection of commands listed in the .Tool texts.
*   * Execute the Config.Disk command corresponding to your disk controller
*   * Execute: Partitions.Show and select the partition in question
*   * Mount that partition by executing: OFSTools.Mount DST AosFS ^
*   * Open Configure.Tool to configure the system (display card and keyboard at least)
*   * Create the diskette by executing: Config.BootDiskette

## How to create an image file of an existing Oberon (partition).

    A: An image file of an Oberon partition, including a partition on a diskette, is created with the command Partitions.PartitionToFile as described in the Introduction to the ETH Oberon. The partition is restored using the counterpart command Partitions.FileToPartition. Example: the Oberon0.Dsk diskette image file which is at the base of the installation is created and restored to diskette in this way.

## My boot manager was set up to start Oberon but at start-up my system freezes after displaying the characters "OBE". What is wrong?

    A: That means the second block of the OBL boot loader did not load correctly.

## I installed the latest beta successfully in a logical partition of a hard disk installed as MASTER on the IDE controller 2. Under Linux, I have then updated /etc/lilo.conf and invoked lilo which confirms added linux * oberon. But when I want to boot from LILO, all I get is "OBE" and my system hangs. What is causing that?

    A: Booting Native from the second hard disk is only possible:
*   * using a boot manager supporting chaining (e.g. LILO)
*   * using a BIOS supporting this
*   * using a Native boot diskette
*   * using noboot.exe
    If your boot loader does not support "chaining" to boot a partition from the second drive, you can try "patching" the boot sector of the Oberon partition using a sector editor like Norton Disk Editor. The byte at offset 24h in the boot sector should be set to 81h instead of 80h, to boot from the second hard disk. To make sure you are modifying the correct sector, check that the string "OBERON" appears at offset 3 in the sector.

## Is Oberon.Text, which must be customized to a user's requirements, an abnormal / special / spooky file?

    A: No, it is a quite normal text, but embedding gadgets in it, will induce the system to load many more system resources than expected, right from the start of Oberon. It must be customized during the installation and only occasionally later on. The InitCommands section, at the top, is the most likely part which might need some editing, e.g. to add a command which should be executed automatically at system start.

## I have customized the InitCommands section of Oberon.Text and now when I restart my system no viewer appears. How do I recover?

    A: You have made a typo error in the text. Press Ctrl-Break to get a Trap viewer. Now, you can type commands to open Oberon.Text again and to fix the error. Check if all { and } characters are matched.

## After bootup my System.Log looks like

       System.Time 21.03.2000 16:14:52
       ETH Oberon / PC Native 20.03.2000
       Oberon.Text - Gadgets.Aliases not found
       Oberon.Text - Gadgets.Documents not found
       Oberon.Text - Gadgets.DocumentServices not found
    A: This looks like a syntax error in Oberon.Text . Here also, check that all { and } characters are matched.

## I tried to install the new beta on my old 386SX. It has an IDE disk and an additional old Adaptec SCSI controller with a disk and a CD. The black screen with the white frame appeared but then nothing happened, the system hangs.

    A: Did it say "OBERON loading..."? Did the OBL> prompt appear? Did the diskette light go on? If the OBL> prompt appeared, try "Init=9090" before "c" to see if some useful error message appears on the display.

## Can I get a disassembly of an object file? I am interested in looking at the code that is generated by the Oberon compiler. In particular, I am interested in the PowerPC and the Intel code generators.

    A: Use the Decoder tool to disassemble Native Oberon or Linux Native Oberon object files. Syntax: Decoder.Decode some.Obj opens a text viewer "Decoder.Dec" presenting the disassembled code. You can call the command from the "Browser" popup menu in System3.Tool.
    The Native Oberon Object File Format (OFF) is an evolution of the Windows Oberon OFF with only minor differences. The Symbol File information, which had the file extension .Sym, is now included in the object file and has been extended to include the Active Oberon and OberonX language extensions. Documentation (html, pdf, ps available).

## Is there an Oberon compiler for other development environments?

    A: The Oberon-2 compiler from the Oxford University in UK can be cited:
*   * http://spivey.oriel.ox.ac.uk/mike/obc/
*   * http://spivey.oriel.ox.ac.uk/mike/obc/obcman.pdf
*   * http://spivey.oriel.ox.ac.uk/mike/obc/labman.pdf
    Also look at the BlackBox and POW! systems.

## I would like to create, as a minimum, two separate partitions: SYS and USR. It would be useful to also have an APPS partition. How would I go about doing this?

    A: Read the Multiple Oberon partitions on a machine section in the "Introduction to ETH Oberon".

## What happens to an Oberon system when very many (>10000) files are created in a file system? Will a file search become too slow, so a user will have to wait opening a file? If not, why?

    A: No. Read the detailed explanation in the File directory section in the "Introduction to ETH Oberon".

## I know that the Native Oberon garbage collector is mark-and-sweep, not copying, but does it ever move objects, for instance to compact memory if it becomes excessively fragmented?

    A: No, objects are never moved by the Mark/Sweep collector. To avoid fragmentation with a program that continuously allocates memory, call the Garbage collector (Oberon.Collect) from time to time to free unused memory. Avoid calling it too much though, because it does take some milliseconds to run, depending on the number of reachable objects on the heap.

## I have a large number of .Arc files to port over. I've placed them in the volumes I want, but when I extract them they write to the SYS: volume.

    A: Use OFSTools.SetDefault.

## How do I mount a FAT16 partition?

    A: Starting from the beta release of Dec. 8, 2000, it is possible to embed an Oberon system in a FAT16 file system. This makes it possible to install an Oberon system without creating a dedicated Oberon partition. This facility, which existed in earlier releases, was abandoned temporarily and is now revived. Full support for mounting a FAT12, FAT16 or FAT32 partition is now available.

## I have a lot of floppies initialized as Native Oberon floppies. When I put one in drive A and execute OFSTools.Mount A NatFS Diskette0 ~ the System.Log reads "A: OFSDiskVolumes: Device Diskette0 not found". What am I doing wrong?

    A: The Backup.Format is not compatible with Partitions.Format. Use the Backup tool to access Backup-format floppies. Perhaps someone could integrate the Backup tool as a file system.

## What is the maximum length of filenames and what characters are allowed?

    A: It depends on the specific file system mounted. The original Oberon file system has the following: 31 characters maximum per name (excluding the trailing 0X). The name must start with an alphabetic character, and may contain only alphanumeric characters and ".".

## How to cache data in temporary files.

    A: In Native Oberon, we use the convention that all temporary files start with "Temp". If one needs a lot of temporary files, we suggest calling temporary files TempApplicNNNNNNNN, where Applic identifies the application uniquely and NNNNNNNN is a unique number in hexadecimal (perhaps initialized to the date/time at startup and then incremented sequentially). Of course, you will have to check if a file exists before overwriting it. Using anonymous files (Files.New("")) is preferable though, if practicable.

## Can I process a *.zip archive in Oberon?

    A: An extensive support for opening zip archives and extracting the files is in preparation. The Unzip tool which existed for some time was removed since it showed intermittent problems. Traditional Oberon *.Arc files will be replaced by space saving zip archives. Documented in ZIP.Tool.

## What is the grammar of a module definition ( .Def) obtained with Watson?

    A: See the EBNF definition of the language.

## I have tried Watson.ShowDef SYSTEM, but that fails with the error message 'no info available' -- where is the complete description on all functions exported by SYSTEM?

    A: See SYSTEM

## Does Oberon expose enough system functionality in SYSTEM to allow the kind of memory manipulation I want?

    A: Yes. Be careful to make the distinction between the modules SYSTEM and System. SYSTEM is a pseudo-module whose calls are compiled in-line by the compiler. System is a system "toolbox" module providing basic system functions like Directory, ShowModules, etc.The module SYSTEM exposes the complete memory, and allows unsafe type-casts to be made. It should be used with care, because if misused it can easily crash the whole system. It is a bit like programming in C :-)
    4. How to force Oberon into "input mode".
          A: In essence, Oberon is non-modal. One may want to force it into a mode, but in exceptional situations only. For instance, "input mode" may be required for entering a password or a set of values, as is suggested in the Prompt module below. The commands NetSystem.SetUser and EditKeys.GetKeyCode feature an input mode.
    5. How to output a real value with the desired precision (e.g. not 1.E+03 but 1037).
          A: Use the procedure Out.RealFix (x: REAL; n, f: INTEGER); to output a real x in n field positions in fixed point notation with f fraction digits. Also LongRealFix exists. In Oberon for Windows or Linux, one must open a viewer and write the edited value under program control.
    6. How to compare procedure variables. Oberon only allows comparison of a procedure variable to NIL.
          A: Procedure variables can be compared in this manner:
* Working with Unix filenames it is really a pain to see the difference between hyphen "-" and underscore "_". Any chance to fix that in a next release? Or give at least a reason why it has to be like that? A: It is not known why the short hyphen was mapped to the underscore ASCII character. As a quick workaround for this kind of problem, keep a bit of Courier10 text in your system tool, which you can use to reformat and reveal the underscores in any other text quickly: Select target text with MR drag ML-MR interclick on the Courier10 text
* If the underscore is here to stay, can somebody give us a tool to patch the font files to give us a real underscore? This should not take more than some hours I suppose. A: Try the FontEditor in the Apps package. Documentation; formerly at http://www.ethoberon.ethz.ch/ethoberon/tutorial/FontEditor.htm [expired]. Perhaps someone can also generate a new set of Oberon fonts mapping the ISO Latin-1 character set. This could be done with a program, and we would suggest renaming the new font to avoid conflicts. See the Fonts.Internalize procedure in Source1.Arc for the font file format.
* Native Oberon is running well but the cursor cannot be controlled with the cursor movement keys. What do I need to adjust/setup to enable these keys? A: The default text editor only supports positioning using the mouse. To install a more advanced editor, execute ET.ReplaceSystemEditor . You can also place this command in the System.InitCommands section of Oberon.Text, to have it executed automatically. If you have installed the Gadgets package, execute TextDocs.ReplaceSystemEditor command to install an even better editor.
* How to write Oberon source text using lower case characters only. Persons affected by RSI may wish that. A1: Modify the compiler module OPS (scanner). Make a procedure "Check" PROCEDURE Check(ident, keyword: ARRAY OF CHAR): BOOLEAN; BEGIN i := 0; WHILE ident[i] # 0X DO ident[i] := CAP(ident[i]) END; RETURN ident = keyword END Check; In OPS.Get, for each letter change | "B": Identifier(s); IF name = "BEGIN" THEN s := begin ELSIF name = "BY" THEN s := by END to | "B", "b": Identifier(s); IF Check(name, "BEGIN") THEN s := begin ELSIF Check(name, "BY") THEN s := by END Recompile OPS.Mod. Note that the built-in types (CHAR, INTEGER, ...) are not defined as keywords. If you want to rename them too, you will find their declaration in OPT.Mod (symbol table). The proposal is to have both uppercase and lowercase versions, so that you still will be able to compiler the release programs. In OPT.Mod module body, for every type declaration add an alias like this: EnterTyp("CHAR", Char, OPM.CharSize, chartyp, SFtypChar); EnterTypAlias("char", chartyp); A2: Use the RX regular expressions tool to convert lower case keywords in a source text to upper case ones. RX.SetSearch "begin" RX.SetReplace "BEGIN" RX.ReplaceAll filename | * Make a script with an entry for each keyword. Then, execute it with Configuration.DoText scriptname ~ A3: Use the EditKeys tool, allowing someone to define personal shortcuts. For example, if you type "XYZ:M" and press the Insert key, EditKeys substitutes it with MODULE XYZ; .... END XYZ. You may add your own macros to EditKeys.Text, like integer ("INTEGER" write). Pressing "Insert" after "integer" will change it to "INTEGER". A final remark: it would be nice if someone would submit such scripts as a contribution.

## How to save the source text of a browsed document.

    A1: Execute HTMLDocs.ShowHTML * . A text document viewer will be opened showing the HTML source text, which can then be saved with [Store]. The document must be completely downloaded before it can be stored. Cfr. HTTP.Tool
    A2: Select a hyperlink and execute HyperDocsTools.Fetch localname ~ . The document with the selected URL will be fetched and stored in a local file "localname". Cfr. HyperDocs.Tool
    A3: The two commands are found in the GUI HyperDocs.Panel .

## How do I clear the hypertext documents cache? If I re-fetch a document without rebooting, the document is not retrieved from the network.

    A: Use either of:
*   * Execute HyperDocs.ClearCache
*   * Open the HyperDocs.Panel and click on the [Clear Cache] Button
*   * Open the document and click on the [Reload] Button

## How do I print out a PostScript file?

    A: To send files directly to a PostScript printer use (in Miscellaneous.Tool): Miscellaneous.PrintFiles LPT1 {file} ~

## Is there something like a viewer for Postscript files for Oberon (an equivalent of ghostview for windows)?

    A: No.

## How to control a serial port RS-232.

    A1: Oberon includes all that is required to control a serial port without further ado. See Applications.Tool -> V24Terminal in Native Oberon. Use the V24.Panel to control a serial port with great ease and without programming. Ideal for exercising AT commands against a modem or to set-up a router, via a serial control port (console port), as explained in the Native Oberon Installation document (Connectivity section).
    The undocumented V24Log.Mod is a little application that copies everything arriving on the serial port to the System.Log. Examples for using it are found at the end of the source text.
    A2: Use the procedures in module V24.Mod in your own program.
    A3: The current V24 module only supports two "standard" fixed ports:
    COM1: 3F8H / IRQ 4 and COM2: 2F8H / IRQ 3. The alpha release was extended to support COM3 and COM4 too. See Serial and parallel port support.

## How to control a sound card.

    A: Get some inspiration by looking at the source text of module Sound.Mod in PC Native Oberon. Win.Audio.Arc is the place to look for in ETH Oberon for Windows. Watch this: some of the modules of the Windows implementation are not portable(compile with option \N).

## When I define the Command field of a Button, I soon reach the maximum length of 64 characters available in the TextField of Columbus. Would it be possible to increase MaxLen to 96 or to 128?

    A: Whatever number is used, it will always be too small for somebody. Rather solve the problem in another way, e.g. by having the command read your arguments directly from the relevant objects. Use Gadgets.FindObj(Gadgets.context, "ObjName") to find the object and then use Attributes.GetXXX to read the attribute value. Then you have 64 characters per argument, not for all the arguments together. If you really need more characters in a command, replace the gadget's Cmd text field by up to 10 fields and insert the following command procedure in one of your modules: (** Glue together the attributes Cmd0 to at most Cmd9 of the gadget and execute the resulting string. Macros are expanded. This helps when the Cmd attribute limited to 64 characters is too short. *) PROCEDURE ExecAttrCmds*; VAR cmd, cmdN: ARRAY 1024 OF CHAR; cmdName: ARRAY 8 OF CHAR; BEGIN cmd := ""; cmdName := "Cmd0"; LOOP Attributes.GetString(Gadgets.executorObj, cmdName, cmdN); IF (cmdN = "") OR (cmdName[3] > "9") THEN EXIT; END; Strings.Append(cmd, cmdN); cmdName[3] := CHR(ORD(cmdName[3])+1); END; Gadgets.Execute(cmd, Gadgets.executorObj, Gadgets.context, NIL, NIL); END ExecAttrCmds;

## I am trying to give the user interface in development a good look and would like to import some images to put them into my interface (for example) as a background image. What is the best way to achieve this within Oberon?

    A: If your user interface resides on a Panel, you need to set the "Picture" link of the Panel to a picture. here is a concrete example:
*   * Open Clown.Pict and select the frame
*   * Columbus.Inspect ~ (you should see a Rembrandt.New generator)
*   * Press the Link button to see the "Model" link.
*   * Select your panel and do another Columbus.Inspect ~ (Panels.NewPanel generator)
*   * Press the Link button to see the "Picture" link (with a cross in it).
*   * MM-MR interclick on the "Model" link of the Rembrandt.New and drag and drop it on the "Picture" link of the Panels.NewPanel. The cross should turn to a box with a little circle.
*   * Press the Apply button. Your Panel should now have a Clown backdrop.

## How to add items to a drop-down menu in System3.Tool.

    A:
*   * Make a deep copy of the Iconizer with the drop-down menu in question to a work area.
*   * Select the copied Iconizer and set the caret in the work area.
*   * Execute Icon.Break to break the Iconizer apart. The two sides are inserted at the caret.
*   * Using Columbus, edit the "Open" side, adding new entries. The list container is usually locked.
*   * Reconstruct the Iconizer by dropping the "Close" component in it, then flip the Iconizer and finally drop the "Open" component in it.
*   * Copy the finished Iconizer to System3.Tool .

## How to create a drop-down menu like the ones in System3.Tool.

    A: Example LayLa.OpenAsDoc { Example of drop-down menu Iconizer à la System3.Tool. } (CONFIG (DEF width 60) (DEF height 24) (DEF ClosedSide (VLIST Panel (w=width h=height hjustify=CENTER vjustify=CENTER) (ATTR Locked=TRUE) (NEW Caption (ATTR Value="Menu")) ) ) (DEF OpenSide (VLIST Panel (w=width h=100 border=1 dist=1) (ATTR Locked=TRUE) (NEW Button (w= h=height) (ATTR Caption="Text1" Cmd="...")) (NEW Button (w= h=height) (ATTR Caption="Text2" Cmd="...")) (NEW Button (w= h=height) (ATTR Caption="Text3" Cmd="...")) (NEW Button (w= h=height) (ATTR Caption="Text4" Cmd="...")) ) ) (NEW Iconizer (w=60 h=24) (ATTR Popup=TRUE Menu=TRUE) (LINKS Closed=ClosedSide Open=OpenSide)) )
*   * Interactively, in a work area, with the combined use of Columbus and of Gadgets.Panel.
*   * Writing a LayLa description of the Iconizer and its components. Cfr. Chapter 6 in The Oberon Companion - Chapter6.Text in Oberon.

## How do I use the Linux sound drivers?

    A: Sound is currently not implemented. Volunteers are welcome.

## How can I reduce the screen size from the current 1024x768 pixels?

    A: Edit the width and height in oberon.cnf.
          and replace them by:

## Some of the more important keys, like left Alt, do not seem to work. Why?

    A: The Input module does not return all possible key combinations. E.g. in Oberon, Alt-a generates the german "ä". But the VNC client has a workaround for this. If you press and release Alt, VNC remembers it and adds "Alt" to the next key. E.g. to switch my virtual X desktop I press and release Alt and then press Ctrl-Left/Right/Up/Down. The VNC viewer must have focus first, so you must left click somewhere in the viewer first. We hope to fix the Input module later.

## The arrow down key doesn't work reliably. This is not a mechanical issue, as I have tested it with three different keyboards. However, it seems to be "fixed" when closing the VNC client window and opening a new one.

    A: Perhaps this is because the focus is lost. Unfortunately, there is no visual indication when the viewer has focus. Try pressing the left mouse button in the viewer to give it focus.
23 jan 2003 - Copyright © 2003 ETH Zürich. All rights reserved. E-Mail: oberon at lists.inf.ethz.ch Homepage: http://www.ethoberon.ethz.ch/