[Oberon] FPGA - Boot over serial line

Tomas Kral thomas.kral at email.cz
Thu Oct 12 17:42:34 CEST 2017


On Tue, 10 Oct 2017 23:18:14 +1030
Chris Burrows <chris at cfbsoftware.com> wrote:

> See Paul Reed's message in this mailing list:
> 
> 'Boot procedure FPGA Oberon' (23 Jan 2014)

Yes, thank you.
Now I am a bit closer, but not quite there in understanding.

I tried compiling simple Oberon-0 program, in full Oberon compiler in
RISC0 (asterisked) mode. 

I also wish to build Oberon-0 compiler under OLR for ARM, that's my host
system, but I am getting some incompatible assignment errors in module
OSG. 

I leave it as is for the time being as I wish to concentrate on learning
how to extract the code for `prom.mem' file. 

This program compiles in RISC0 mode.

MODULE* TestLEDs;
IMPORT SYSTEM;

CONST
  ledAdr = -60;

VAR
  x, y, z: INTEGER;

BEGIN z := 0;
  REPEAT
    PUT(ledAdr, z); x := 1000;
    REPEAT y := 1000;
      REPEAT y := y-1 UNTIL y = 0;
      x := x-1
    UNTIL x = 0;
    z := z+1
  UNTIL FALSE
END TestLEDs.

Hexdump of TestLEDs.rsc gives...

00000000  54 65 73 74 4c 45 44 73  00 00 00 00 00 00 a4 00 |TestLEDs........|
00000010  00 00 00 00 00 00 00 0c  00 00 00 00 00 00 00 23 |...............#|
00000020  00 00 00 07 00 00 e7 00  00 00 00 00 00 00 00 00 |................|
...
000000c0  00 00 00 00 00 00 00 00  20 00 00 00 4f          |........ ...O|

Question is where the code starts, where it ends, how can I produce `prom.mem' from it?
I may possibly learn by comparing with the output from Oberon-0 compiler, but I do not have that functional yet on my host system.

I assume the trick is done with these commands (as hinted in BootLod.Mod.txt)
ORP.Compile @ ORG.Decode ORX.WriteFile BootLoad.rsc "prom.mem"

ORX seem the tool producing 8 hex digits, one opcode per line for `prom.mem'.
But what is ORG.Decode?


-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list