[Oberon] Left / Right vs Positive / Negative shifts
Jörg Straube
joerg.straube at iaeth.ch
Sat Dec 9 05:38:57 CET 2017
You’re right. But as «voff» is not used nobody discovered it so far 😊
Jörg
Von: Chris Burrows
Gesendet: Samstag, 9. Dezember 2017 10:16
An: ETH Oberon and related systems
Betreff: [Oberon] Left / Right vs Positive / Negative shifts
>
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Jorg Straube
> Sent: Saturday, 9 December 2017 1:57 PM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] Project Oberon color
>
> From Texts.Load:
> q.voff := ASR(LSL(bt, -24), 24);
>
> Thats the "standard" way to upscale a signed 8bit vale to a signed
> 32bit value??
> It's equivalent to
> IF bt<127 THEN q.voff := bt ELSE q.voff := bt-256 END;
>
That may well have been the intention but that is not the result. The problem is that
LSL(bt, -24)
should be
LSL(bt, 24)
or, possibly,
ROR(bt, -24)
if that was what the author was thinking of.
Regards,
Chris Burrows
CFB Software
http://www.astrobe.com/RISC5
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20171209/43132b18/attachment.html>
More information about the Oberon
mailing list