Und hier der zuvor beschriebene Programmblock nach Bearbeitung durch den Megalock-Compiler.
void EXAMPLE() {
ushort Status;
long a,b;
 
if (MEGALOCK11(0x020022c9L,0x00002d89L) == -1)  /* ##BEGIN */
{                                     
* MODUL=EXAMPLE,PROGNO=0,MODULNR=31,STATUS=Status*/
                                               /* LONG a,b */
   MEGALOCK1(0x0040c8d9L);                     /* mclr */
   
MEGALOCK3(0x0240ca4bL,0x00000000L);         /* for (LR4 = 0; LR4 < LR3; LR4 += 1 ) */
   for (;;) {
     MEGALOCK1(0x0040e65dL);
     if (MEGALOCK10(0x00402378L) != -1) break;
    
 MEGALOCK1(0x0040bc86L);                   /*   if LR4 < 2 */
     if (MEGALOCK10(0x00402378L) == -1)
     {
        MEGALOCK1(0x004073f1L);                 /*     Addition (LR1,LR4) */
     } else {                                   /*   else */
        MEGALOCK1(0x0040b096L);                 /*     Subtract (LR2,LR1) */
     }                                          /*   endif */
     MEGALOCK1(0x0040b162L);                    /* next */
   }
   MEGALOCK1(0x0040799bL);                      
/* Clear(LR1) */
   MEGALOCK3(0x02401fe0L,0x00000032L);          
/* Move (LR0,50) */
   for (;;) }                                   
/* do */
     MEGALOCK3(0x0240d737L,a);                  /*   Addition (LR1,a) */
     MEGALOCK1(0x0040c6c6L);                    /*   Increment (LR2) */
     MEGALOCK3(0x02401e7eL,b);                  /*   if LR1 > b */
     if (MEGALOCK10(0x00404bdaL) == -1)
     {
        MEGALOCK1(0x00408133L);                 /*     Move (LR0,1) */
        MEGALOCK5(0x20401aacL,&a);              /*     Getreg (a,LR1) */
     }                                          /*   endif */
     MEGALOCK1(0x00407da9L);                    /* loop LR0 */
     MEGALOCK3(0x0240f5dcL,0x00000000L);
     if (MEGALOCK10(0x004040c6L) != -1) break;
   }
   MEGALOCK1(0x00402c26L);
}
   MEGALOCK4(0x30800000L,&Status);              
/* ##END */
}