[Oberon] Bit manipulation in Oberon-07
Jörg
joerg.straube at iaeth.ch
Wed Oct 24 22:57:30 CEST 2018
Yes, I did.
Normally you are right: bit manipulation is easiest with SET, eg my color display driver is full of SET manipulations. But for the Wiznet, INTEGER arithmetic was easier. For the interrupt masks SETs would come handy, but I decided for all INTEGERs in the end.
Basically, it‘s a matter of taste.
Jörg
> Am 24.10.2018 um 22:49 schrieb Skulski, Wojciech <skulski at pas.rochester.edu>:
>
> Joerg:
>
>> For the Wiznet case, I never used SET for my implementation. Did all with pure INTEGER arritmetic.
>
> Are you saying that you have implemented Wiznet drivers? This would be interesting.
>
> We (the students) used Arty-A7 with the W5500 Arduino "wing" which fits into Arty-A7 pin sockets. This hardware is cheaper (about $130) than the RiskFive system (about $1k). Using Arty-A7 with the W5500 "wing" makes it possible to implement Internet with Astrobe. We are limited to Astrobe because we only use the internal FPGA memory at this point. We did not attempt to handle the DDR3 memory on Arty after realizing the magnitude of that effort. In fact, avoiding the DDR3 was the major motivation for developing RiskFive with ZBT RAM.
>
>> I defined INTEGER constants for all those ‚bits’ definitions (shifted to the right place) and just added them...
>
> Yeah, I can understand. I told the students that SET is the preferred method for bit manipulation in Oberon. But the C-style integer constants are of course a good alternative, as demonstrated by Tomas in a series of his e-mails in this thread and also in his bitmap code.
>
> I will forward this message to the students and let them decide what they like more. Comparing the two approaches will be a good exercise for them.
>
> Thank you,
> Wojtek
> --
> 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