[Oberon] FPGA - Oberon-0 program
paulreed at paddedcell.com
Wed Oct 18 23:52:03 CEST 2017
> I could not resist, and compiled initial version of `Oberon-0' on
> ARM at RPI. Oberon-0 puts its code into memory, it can take up to 8192
> opcodes, is this maximum of BRAM area in FPGA chip?
No, it's just a static array with a reasonable length. Prof. Wirth's
compilers tend to use a static array to deposit code so that they can
easily go back and fix forward jumps when the offset is known.
>> But how do I communicate with underlying hardware registers and
>> memory, I need PUT, GET etc? These are flagged as error by
>> the Oberon-0 compiler.
> The answer probably lies here in the parser,
> enter("ReadInt", OSG.SProc, 0, NIL);
> It defines what vocabulary it understands, perhaps time to read
> `Compiler construction' books.
> It would be interesting to add new vocab as an exercise, e.g.
Right, it would be a very good idea to read this book, it's not very long
by compiler-book standards.
And PUT and GET are very good exercises to do (PUT is slightly easier).
LED(x) is just PUT(-60, x).
Chapter 12's exercise 2 (add ABS, INC, DEC) is similar.
More information about the Oberon