[Oberon] Standalone BootLoader format

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Tue May 12 21:08:21 CEST 2020


Sorry, the last part of the last message got scrambled somehow. It should read:


[…]

BACK TO YOUR Counter.Mod
-----------------------------------------

Unlike BootLoad.Mod, Counter.Mod does NOT write those values 0, 12, 16, 20, 24.

if you will, all it has is a single “BR 7” branch location from the very first location
(code[0]) to the eigth position (code[8]) within the code section.

So, if you load Counter.rsc to location 0, then you will have that “BR 7” branch at
absolute memory address 0, which jumps to address 32. And wenn you declare
global variables in Counter.Mod, these global variables will be placed at absolute
memory addresses 8, 12, 16, 20, 24, 28 (so, 6 words or 24 bytes). That’s it.

If, however, you load Counter.rsc to any other location, for example to location 
1024, then you will have that “BR 7” branch instruction at absolute memory
address 1024 and it will jump to address 1056, the first instruction of Counter.rsc.

And now you can declare ANY number of global variables. These will simply start
filling the memory area starting at address 8. PS: Don’t declare more than 1016
bytes worth of global variables though, otherwise these will overwrite the code
section of Counter.rsc, which starts at address 1024 (the BR instruction) :-)




More information about the Oberon mailing list