[Oberon] SYSTEM.PTR vs SYSTEM.ADDRESS

Joerg joerg.straube at iaeth.ch
Fri Oct 28 04:58:29 CEST 2022


I can only guess what SYSTEM.PTR and SYSTEM.ADDRESS are; I assume these are TYPEs with special compatibility rules. As those are not defined in Oberon but by your compiler, please consult your compiler’s manual for details.

SYSTEM.PUT and SYSTEM.GET are low level procedures used to directly manipulate memory or HW registers. Typically used in device drivers.
SYSTEM.GET(adr, w) is the same as
w := adr^ „adr“ being an absolute memory address.
How your memory layout and your memory mapped IO registers look like depends on your HW system you run Oberon on.

br
Jörg

> Am 27.10.2022 um 18:23 schrieb Deadmarshal <adeadmarshal at gmail.com>:
> 
> 
> Hi,
> 
> What is the difference between SYSTEM.PTR and SYSTEM.ADDRESS? As far as I've read they both seem to be void pointers? How does one cast a void pointer in Oberon? for example in C we have: 
> void *ptr;
> casting and dereferencing: 
> *(int*)ptr;
> Do you also have a small example of how to use SYSTEM.Get() and SYSTEM.Put() functions?
> 
> regards
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon


More information about the Oberon mailing list