[Oberon] RISC emulator

Chris Burrows chris at cfbsoftware.com
Fri Mar 28 12:31:30 CET 2014

> -----Original Message-----
> From: Jan Verhoeven [mailto:jan at verhoeven272.nl]
> Sent: Friday, 28 March 2014 9:43 PM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] RISC emulator
> Jörg wrote:
> > Hi
> > To take the variable "n" into account even for MIN(INTEGER) I would
> > change it to:
> >
> >      IF ROR(x, 31) = 1 THEN i:=10; DEC(n); a:="8463847412"
> Now, ROR sounds nice to assembly language programmers but many HLL people
> will be on the wrong leg, whereas Oberon does have a native command to
> it, which is fully understandable by all. I would rewrite to
> IF  31 in x  THEN bla; bla; bla
> with the proper type conversion for 'x'.

  IF 31 IN x ...

is an incorrect translation of 
  IF ROR(x, 31) = 1 ...

The test should only return true if bit 31 of x is 1 *and* all the other
bits of xare zero. 

When you are doing low-level bit-manipulation operations like this,
low-level bit-manipulation operators like ROR are quite suitable. 

Being able to mix low-level operations with high-level code without having
to resort to inline assembler is what makes today's Oberon ideal for
programming embedded systems,


Chris Burrows
CFB Software

More information about the Oberon mailing list