[Oberon] FPGA - Two BYTE entities
Tomas Kral
thomas.kral at email.cz
Mon Sep 25 09:42:28 CEST 2017
On Mon, 25 Sep 2017 08:58:57 +0200
Jörg <joerg.straube at iaeth.ch> wrote:
Hi,
> There are two changes in Oberon-07 you have to be aware of when
I have studied `Oberon-07.report.pdf'. My FPGA Oberon on boot
greets as `Oberon V5', should it not be `Oberon V7' instead? I am sorry
for being slightly confused here.
I use `Oberon at a glance.pdf' (one page document!) as a quick guide on
porting from earlier versions of Oberon.
> So, if you want to port the statement
> ReadBytes(r, i, 2)
> to Oberon-07 you would have to write
> TYPE A = ARRAY 4 OF BYTE;
> i := 0;
> ReadBytes(r, SYSTEM.VAL(A, i), 2)
Looks good, I will try in my code.
> In short, you still can use ReadBytes in Oberon-07. But the portable
> way to read two byte entities is read two bytes independently and
> calculate the value with i := b1 + b2*100H.
This is what I use at the moment, also { DIV | MOD } 100H gives us
some flexibility on endianess.
Many thanks
--
Tomas Kral <thomas.kral at email.cz>
More information about the Oberon
mailing list