[Oberon] Hennessy.Mod

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Tue Feb 18 01:06:05 CET 2020


    > When removing a few tests and/or reducing their variable size so that
    > the module variables are below 64KB in size, it works.
    >
    > Is that a known limitation of Project Oberon? It surprises me that the
    > compiler does not warn about it, but compiles it fine.


In FPGA Oberon, the 2-instruction sequence to load the address of a global variable is:

    LD RH, MT, mno*4    ; RH := static base of accessed module determined via MT
    ADD RH, RH, offset  ; RH := address of the global variable within the module

This instruction is encoded by the compiler as follows (see ORG.loadAdr):

    | LD (4) | RH (4) | mno (4) | pc-fixorgD (20)    |
    | F1 (4) | RH (4) | RH (4)  | ADD (4) | vno (16) |

which the module loader fixes up to (see the fixup code at the end of Modules.Load):

    | LD (4) | RH (4) | MT (4)  | offset for imported module in MT table (20) |
    | F1 (4) | RH (4) | RH (4)  | offset from static base (16) |

Thus, the maximum offset within the data section of a module is 2^16 bytes = 64KB.

 

 


More information about the Oberon mailing list