You are here: Home / OSADL / News / 
2019-06-17 - 07:33
2008-05-30 12:00 Age: 11 Years

Do you know what "Immediate C" is?

By: Carsten Emde

(immediate C = C + PLC-like control)

Immediate C and iClive in action

Thanks to John E. Wulff, who developed "immediate C" and made it available under the GPL v2, OSADL has a new and exciting project - C programmers can now develop PLC-like control applications without giving up the computer language they are familiar with. But let him speak for himself - a quote from the documentation:

immediate C - iC for short - is an extension of the language C. It utilizes the syntax of C to give meaning to statements that have no semantic support in C. In addition to standard variables, which are modified by the flow of instructions, iC provides so called 'immediate' variables, whose values are updated, whenever a change of input calls for an immediate change in output. An efficient Data Flow technique implements this strategy.

iC provides programmers with built in operators, whose function is closely modelled on integrated circuits. The name iC is a reminder of this fact. Logical AND, OR and NOT as well as D flip flops, SR flip flops and many others are implemented in such a way, that their use follows the same design rules, which apply to their hardware counterparts. These rules have led to a well-developed hardware technology, whose effectiveness is demonstrated by the success of today's complex computer hardware. Particularly the concept of clocked functions plays an important role in iC. It gives the same protection against timing races in iC programs, as it provides for hardware IC designs.

Writing programs in the language iC has the added quality, that many simple ideas and relationships, which should result in direct actions, can be written down immediately in one line. The coding of call back routines and other overhead is not required. It was this thought, which also prompted the name "immediate C".

An I/O simulation tool called iCbox allows the generation of inputs and the display of outputs while an application is running. The screen hardcopy on the left shows the iCbox window for the sample program demo.ic, which is written in the iC language and which is part of the software distribution. To start the program simply type "iClive Test0/demo.ic" and click "Build", "Run" and "Live". The documentation contains full instructions on how to install and use the software.

iClive is both a text editor and an online debugger, which can display the live state of variables as an iC program is running. This is shown on the right using the same demo.ic program as above.

The immediate C software can be downloaded from the OSADL Web site. In addition, the next version of the OSADL Live-CD will have immediate C preinstalled.