[Oberon] FPGA - SET initialisation

Tomas Kral thomas.kral at email.cz
Sun Apr 30 11:44:24 CEST 2017


Hi,

Reading `SET - neglected data type',  
I was wondering, how I could best initialise a SET variable.

VAR b: BYTE, i: INTEGER, s: SET;
...
SYTEM.GET(adr, s); (* reading 4 bytes from adr, easiest but adr MOD 4!
*)
...
SYTEM.GET(adr, i); s := {i}; (* same result as above? *)
... 
(* provided adr MOD = 0 *) 
SYTEM.GET(adr+0, b); s := {b}; (* same result as above? *)
SYTEM.GET(adr+1, b); ASL(s,8); s := s + {b};
SYTEM.GET(adr+2, b); ASL(s,8); s := s + {b};
SYTEM.GET(adr+3, b); ASL(s,8); s := s + {b};

Tomas


More information about the Oberon mailing list