[Oberon] Easter eggs in Oberon

Hans Klaver hklaver at dds.nl
Sun Apr 12 12:19:07 CEST 2020

Andreas, thanks for your enlightening explanation. That certainly makes this use case the most beautiful Easter Egg!
I will call it 'standalone MODULE*'.

So now we have found:

1. integer multiplication operator
2. real multiplication operator
3. byte multiplication operator
4. set intersection operator
5. export mark
6. interrupt procedure
7. part of comment bracket
8. standalone MODULE*

Still four to go...

> Op 12 apr. 2020, om 10:26 heeft Andreas Pirklbauer <andreas_pirklbauer at yahoo.com> het volgende geschreven:
>> you mention one that I don't know: boot module: could you give an example and a place where we can find it?
> This is an undocumented feature and not officially part of the Oberon-07 language. It is however briefly described at the end chapter 14.1. on p.77 of the book Project Oberon 2013 Edition.
> In sum, when the programmer compiles a module with the "RISC-0" option of the regular Oberon compiler (which is achieved by inserting an asterisk “*” immediately after the keyword MODULE), the compiler generates a so-called "standalone program” rather than a module that can be loaded by the regular module loader. Standalone programs are completely self-contained, relocatable instruction streams for inclusion directly in the hardware, i.e. they can run on the bare metal even when no module loader is present.
> As compared with regular Oberon modules, such standalone programs have different starting and ending sequences: The first location contains an implicit branch instruction to the initialization code of the standalone program, and the last instruction is a branch instruction to absolute memory location 0. In addition, the processor register holding the stack pointer SP (R14) is also initialized to a fixed value in the initialization sequence of a standalone program. These modified starting and ending sequences are generated in ORG.Header and ORG.Close, respectively.
> An example of a standalone program is the Oberon boot loader (module BootLoad.Mod) itself:
>   MODULE* BootLoad;    (*the asterisk (=RISC-0 option) indicates that the compiler will generate a standalone program*)
>      ...
>   END BootLoad.
> The Oberon boot loader is typically loaded to a fixed memory location once using proprietary tools provided by the FPGA manufacturer, such as the Xilinx downloader tools. Once the boot loader is started, its task is to load the pre-linked Oberon inner core from a valid boot source to absolute memory location 0 and then to just branch location 0 (where the branch instruction itself is generated by the compiler, not the programmer).
> Note that standalone are not allowed to import other modules (as the module loader is not assumed to be present). In Extended Oberon, this rule is somewhat relaxed as follows: standalone programs can import other modules. so long as only constants are imported from them. In the future, pre-linked standalone programs will also be supported, allowing one to write a boot loader consisting of multiple modules.
> -ap
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20200412/0836dd02/attachment.html>

More information about the Oberon mailing list