[Oberon] FPGA - ASR shift operator
Jörg
joerg.straube at iaeth.ch
Mon May 1 21:28:35 CEST 2017
Ah I see.
For bit manipulations I recommend making a drawing, where you try to understand how many bits have to be shifted left and right depending on "x" and "w".
Remind: for shift operations this holds true -(x MOD 32) = 32 - (x MOD 32)
Jörg
> Am 01.05.2017 um 19:49 schrieb Tomas Kral <thomas.kral at email.cz>:
>
> Aha, 2^5 = 32, so I can shift max 32 bits around, that makes sense.
> But I am also seeing this in the code, Display.Mod : CopyPattern.
>
> ASR(pwd, -(x MOD 32))
>
> and that I do not understand.
> Tomas
>
>
> On Mon, 1 May 2017 16:52:56 +0200
> Tomas Kral <thomas.kral at email.cz> wrote:
>
>> Hi,
>>
>> Looking at shift operators (functions) on Oberon system code, I do not
>> understand why ASR(m, -n) takes a negative argument?
>>
>> Tomas
>>
>
>
>
> --
> Tomas Kral <thomas.kral at email.cz>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
More information about the Oberon
mailing list