[Oberon] FPGA - Oberon-0 program
thomas.kral at email.cz
Wed Oct 18 23:29:00 CEST 2017
> Oberon-0 program is a selfcontained executable that cannot import
> symbols from other modules.
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?
The code can be executed in RISC emulator, which is very simple, has
only a few processor instructions to emulate. Nice!
> 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);
enter("WriteInt", OSG.SProc, 1, NIL);
enter("WriteChar", OSG.SProc, 2, NIL);
enter("WriteLn", OSG.SProc, 3, NIL);
enter("ORD", OSG.SFunc, 0, OSG.intType);
enter("BOOLEAN", OSG.Typ, 0, OSG.boolType);
enter("INTEGER", OSG.Typ, 1, OSG.intType);
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.
There must also be part that outputs code patterns somewhere.
Tomas Kral <thomas.kral at email.cz>
More information about the Oberon