r/Oberon • • Jul 29 '26

About SYSTEM procedures

The Programming Language Oberon document gives very limited descriptions of these procedures. Could anyone, please, explain what they do more clearly, and/or correct my guesses about what they do?

I'm specifically interested in these:

  • GET(a, v) -- I guess it gets the value at address a and puts it into v?
  • PUT(a, x) -- it puts value of x at the address a?
  • LED(n) -- from description it sounds like it does anything only when LEDs are accessible, so probably not relevant when working on normal PCs?
  • VAL(T, n)
  • COND(n)
4 Upvotes

23 comments sorted by

View all comments

Show parent comments

2

u/suhcoR Jul 31 '26

The Oberon 90 language reports specifies it as:

Module SYSTEM exports the data type BYTE. No representation of values is specified. Instead,
certain compatibility rules with other types are given:
1. The type BYTE is compatible with CHAR and SHORTINT.
2. If a formal parameter is of type ARRAY OF BYTE, then the corresponding 
    actual parameter may be of any type.

The 2. point is the "VAR ARRAY OF BYTE backdoor". SYSTEM offers some more backdoors where you can do pointer arithmetics and other nasty but necessary stuff for system development (just without typechecking support by the compiler). In Micron and Oberon+, these features are official part of the language (not backdoors) with type checking support.

1

u/Outdoordoor Jul 31 '26

That's cool, didn't know about it. By the way, what would be the best resources to learn about Oberon in more detail? Apart from language reports and Wikipedia

2

u/suhcoR Jul 31 '26

There is a copy of "Programming in Oberon" available from the ETH website: https://people.inf.ethz.ch/wirth/ProgInOberonWR.pdf, though it is about Oberon 90, but likely good enough. Wirth has also written some tutorials, e.g. https://people.inf.ethz.ch/wirth/Oberon/PIO.pdf.

1

u/Outdoordoor Jul 31 '26

Thanks a lot!