[Oberon] Bit manipulation in Oberon-07

Skulski, Wojciech skulski at pas.rochester.edu
Sun Oct 28 01:15:38 CEST 2018


> The reasoning behind SYSTEM.UBFX and SYSTEM.BFI was not to make use of spare instructions. It was motivated by the need it was to be able to manipulate bitfields by bit number (as usually specified in datasheets) without having to do mental gymnastics. 

I came to this topic along the exact same path. In our project we will need to access dozens of registers defined in the FPGA firmware, as well as registers memory mapped in the external chips. 

> perhaps we should have given it a different name to avoid confusion.

Not using ARM I would prefer some other names, but at this point it is probably wise to go with the flow, adopt the same names, and get used to them.

> You'll like the UBFX and BFI instructions in RISC6 then ;-)

NW paper "An Update of the RISC5 Implementation Niklaus Wirth, 15.6.2018" mentions RISC6 in Section 2: module RISC6(. It is the only such place, though. Otherwise he is still using the name RISC5.

>Portability is not a realistic aim when working with hardware-defined interfaces,

Same here. Meanwhile we will adopt your example procedures in our code.

Thank you for clarifying the issue.


More information about the Oberon mailing list