[Oberon] Question on ORG.SaveRegs / ORG.RestoreRegs in the FPGA Oberon compiler
andreas_pirklbauer at yahoo.com
Wed Dec 19 12:25:07 CET 2018
> I would not expect a student to grok this even in an exercise, without a lot of help.
Correct. If one does not already know the compiler in some reasonable depth,
it’s borderline incomprehensible for a newcomer.
> 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.
This is certainly true. But here is where I (slightly) disagree. I believe that code,
just like a good book, should be so clear, that one always almost instantly "gets it”.
Of course, that’s not always possible - some things just *are* so intricate that only
the code tells the full story - but I prefer writing a few lines more code than having
the most compact possible representation which contains all the intricacies in a
single ingenious line of source code. In the example of SaveRegs/RestoreRegs,
this is certainly possible. See the Ceres-version for example..
In any case, we are scraping the bottom here! You have helped clarify the question -
it’s settled. Now I’ll just create a visual or two and file it .. so that *in* 25 years, when
I bump into this question next time (hopefully not before..), I’ll still instantly get it ;-)
More information about the Oberon