Sha256: 10925cacfb34a1d78bc051d25b389a7978544433035efb691d6987ee3e3daffe

Contents?: true

Size: 1.62 KB

Versions: 2

Compression:

Stored size: 1.62 KB

Contents

/*! \page subparexample1 Calling Subroutine with Parameters
 *
 *  This program shows how to call byte code subroutine with parameters
 *
 *  <hr size="1"/>
 *  \verbatim */

UBYTE     prg[] =                       //  p11
{                                       //
  PROGRAMHeader(0,2,2),                 //      VersionInfo,NumberOfObjects,GlobalBytes
  VMTHREADHeader(0,2),                  //      OffsetToInstructions,LocalBytes
  SUBCALLHeader(0,2),                   //      OffsetToInstructions,LocalBytes
                                        //
                                        //      VMTHREAD1
                                        //      {
  opMOVE8_8,LC0(1),LV0(0),              //        LV0  =  1
  opCALL,LC0(2),LC0(2),LV0(0),LV0(1),   //        SUBCALL(2,2,LV0,LV1)
  opUI_WRITE,LC0(VALUE8),LV0(1),        //        UI_WRITE(VALUE8,LV1)
  opUI_WRITE,LC0(PUT_STRING),LCS,'\r',  //        UI_WRITE(PUT_STRING,"\r\n")
    '\n',0,
  opUI_FLUSH,                           //        UI_FLUSH
  opOBJECT_END,                         //      }
                                        //
  2,IN_8,OUT_8,                         //      SUBCALL2(InDATA8,OutDATA8)
                                        //      {
  opUI_WRITE,LC0(VALUE8),LV0(0),        //        UI_WRITE(VALUE8,LV0)
  opUI_WRITE,LC0(PUT_STRING),LCS,'\r',  //        UI_WRITE(PUT_STRING,"\r\n")
    '\n',0,
  opUI_FLUSH,                           //        UI_FLUSH
  opMOVE8_8,LV0(0),LV0(1),              //        LV1  =  2
  opRETURN,                             //      }
  opOBJECT_END,                         //
};

/* \endverbatim \ref subpar "Parameter Encoding"
*/

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lignite-0.6.0 spec/data/p11.c
lignite-0.5.0 spec/data/p11.c