Numeric CASE has now been implemented

General discussions about using the Astrobe IDE to program the FPGA RISC5 cpu used in Project Oberon 2013
Post Reply
Site Admin
Posts: 443
Joined: Fri Dec 31, 2010 12:30 pm

Numeric CASE has now been implemented

Post by cfbsoftware » Thu Dec 22, 2016 12:21 pm

We have now implemented the traditional numeric version of the CASE statement that can be used with BYTE, CHAR and INTEGER expressions in the Astrobe for FPGA RISC5 Oberon compiler. This is in addition to the existing form of CASE that is used with pointers and records to select type extensions.

The numeric CASE statement uses a very efficient (both time and space) jump table that can result in more than 3x better performance than the equivalent IF-THEN-ELSE sequence once there are more than a few cases. If the cases occur with equal probability, the more cases there are, the better the performance gain will be.

To aid portability, the implementation is compatible with the CASE statement in the Astrobe Oberon for ARM Cortex-M compilers. For more information see Section 6.2 Numeric CASE Statements in the ARM Cortex-M Oberon Programmers Guide. Download a copy from the Astrobe Oberon Language web page.

Numeric CASE is supported in v6.2 of Astrobe for FPGA RISC5 which is available now. Request your copy via download.

Post Reply