On Wed, 13 May 2020 09:33:56 +0200 Andreas Pirklbauer <andreas_pirklbauer@yahoo.com> wrote:
Because you have not generated a standalone program,
Compiled by OSP.Compile, Oberon-0 compiler, which according to docs, should produce standalone module, to be loaded by BRAM loader. But I know there was a change so this may be why, eventhough it says in red. "Preface to the Revised Edition of 2017 ...The compiler therefore now generates code in the format required by the regular Oberon loader." But in fact, does not. I have older Oberon=0, compiler, too. That starts with B (PC+off+1), but I seem to miss in the code an instruction setting SB to a reasonable value. For the same Counter.Mod example, with older Oberon-0, I got 0 E7000000 B 0 1 40000000 MOV R0 R0 0 2 A0D00008 STW R0 SB 8 3 80D00008 LDW R0 SB 8 But I may need 0 5D00FFB4 MOV SB R0 -76 1 40000000 MOV R0 R0 0 2 A0D00008 STW R0 SB 8 3 80D00008 LDW R0 SB 8 Which sets SB to some sensible value, as addr -64 and on are reserved by H/W (counter, leds, etc) This may reserve some 10 words of globals' worth. Correct???? Most confusion arises here, that in PO2013, I cannot clearly see how SB is handled, for me is rather obscured. -- Tomas Kral <thomas.kral@email.cz>