[Oberon] FPGA - Two BYTE entities
chris at cfbsoftware.com
Sun Sep 24 01:49:26 CEST 2017
> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Tomas Kral
> Sent: Sunday, 24 September 2017 4:57 AM
> To: Oberon@
> Subject: [Oberon] FPGA - Two BYTE entities
> On FPGA Oberon we have (long) WORDS and BYTES, reading SHORTS(two
> bytes), requires some coding.
> (* this works *)
> Files.ReadByte(R, bt0); Files.ReadByte(R, bt1); short := bt0 +
> (* this does not *)
> Files.ReadBytes(R, short, 2);
> I saw above in ETH Oberon code frequently.
I suspect you have declared short as INTEGER which is a four-byte entity.
You should declare it as ARRAY 2 OF BYTE if you want to treat it as a
two-byte entity and control how it behaves.
More information about the Oberon