Handling boolean expressions


PL/M source code

oo: do;

/* This is a demo of context sensitive boolean expressions translations.
*/

declare v1 byte , v2 word , v3 dword ;

v1 = 0;

/* conversion of True and False conventions */
if v1 then v2 = 2;

/* context sensitive translations of the logical operations */

if v1 and v2 then
v3 = 1;

v3 = not (v1 and v2);

end;

 

Translated C source code

#include "..\C\builtin.h"

/* This is a demo of context sensitive boolean expressions translations.
*/

static BYTE v1;
static WORD v2;
static DWORD v3;

 

main()
{
v1 = 0;
/* conversion of True and False conventions */
if ( (v1) &1 )
v2 = 2;
/* context sensitive translations of the logical operations */
if ( (v1)&1 && (v2)&1 )
v3 = 1;
v3 = ~(v1 & v2);
}

 

About Company

Alternative Solutions provides a cost effective and reliable translator that is designed to provide good reability of generated C code by transforming simple definitions in PL/M to more precise and readable structures in C. The resultant C source code embodies the functionality of the original PL/M source code while adhering to modern C coding style.

About PL/M

The PL/M programming language is a high-level language developed by Gary Kildall in 1972 for Intel for its microprocessors. Today PL/M is no longer supported by INTEL and its successor is the C language which is widely used in embedded systems development.

Demo version

You can download a demo version of PLM2C which retains the full functionality of the product except that the source PL/M file length is limited to 100 lines and the number of INCLUDE files is limited to one. It can be activated to a fully functional version when you purchase a license.

Get in Touch

  • Email: