[Oberon] Easter eggs in Oberon

Hans Klaver hklaver at dds.nl
Sun Apr 12 17:14:38 CEST 2020


Jörg, you wrote:

> A)
> below an example of a module that can be used as boot loader. Two special things of boot modules: 1) you can’t IMPORT stuff, 2) when reaching the END the code jumps to address 0
> 
> MODULE* BootLoad;
> BEGIN
> END BootLoad.
> 
> boot modules run on reset and have to be stored into the RISC-5 processor‘s ROM at address -8192.

Yes, Andreas explained a lot about these modules in his post. I have listed this use case of * as 'stand-alone MODULE*'
As said this one qualifies as most beautiful Easter Egg in Oberon! 
But it is not the one I had in mind for 'extra credit'...

> B)
> As you mentioned symbol/operator I had ORP symbols in mind. Comments are strictly speaking no ORP symbols as they are treated in ORS. But from the outside (non compiler) view you are right: * is part of comments in Oberon-07.

My original post spoke of 'one operator/symbol ... in Oberon'. 
Keep in mind that in this mailing list 'Oberon' is a heavily overloaded word.

> C)
> There is no „byte multiplication“; the type BYTE modifies the assignment not the multiplication;
> After these statements
>    b := -2;
>    b := b * 256;
> b is 0 although the multiplication results in 65024. Can be verified by these statements
>    b := -2;
>    i := b * 256;

OK. But this is for the RISC-5 processor. Does another processor exist with in its instruction set special machine instructions for byte arithmetic? If that would be the case then one could argue that * can be overloaded for 'byte multiplication' when Oberon were used for that architecture. Or is that too far fetched...?

So the list of Easter Eggs now is as follows:

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...

--
Hans Klaver



More information about the Oberon mailing list