[Oberon] Question on ORG.SaveRegs / ORG.RestoreRegs in the FPGA Oberon compiler

Paul Reed paulreed at paddedcell.com
Wed Dec 19 10:57:31 CET 2018

Hi Andreas,

>> Right. If the procedure variable was not actually loaded before the
>> parameters were evaluated (ie the procedure was not the result of an
>> expression), no registers needed to be saved, so the save is explicitly
>> avoided.
> I presume you mean this is how the compiler distinguishes between regular
>  procedures and function procedures (which are part of an expression)?

No.  It distinguishes that based on the type, not the mode.

I think we may have been talking at cross-purposes, I'm sorry if I've
confused things for you further.  I would not expect a student to grok
this even in an exercise, without a lot of help.

I think it's a good illustration of how a badly-placed comment might be
worse than no comment at all - some things are so intricate it's just
better to try to understand the code, since as Wirth says, that alone
contains the ultimate explanation.


More information about the Oberon mailing list