home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s038 / 11.ddi / SSCOPE.LIF / PUTILS.LST < prev    next >
Encoding:
File List  |  1992-07-02  |  5.5 KB  |  140 lines

  1. PL/M-386 COMPILER    putils                                                                  09/05/90 12:14:32  PAGE   1
  2.  
  3.  
  4. iRMX III PL/M-386 V3.1  COMPILATION OF MODULE PUTILS
  5. OBJECT MODULE PLACED IN PUTILS.obj
  6. COMPILER INVOKED BY:  :LANG:PLM386 PUTILS.P38
  7.  
  8.  
  9.  
  10.               $title ('putils')
  11.               $optimize(0) word16
  12.               $large
  13.               $debug
  14.  
  15.    1          putils: do;
  16.               $include(/rmx386/inc/common.lit)
  17.           =   $SAVE NOLIST
  18.               $include(/rmx386/inc/rmxplm.ext)
  19.           =   $Save Nolist
  20.  
  21.  670   1      declare UINT_8      literally 'byte';
  22.  671   1      declare UINT_16     literally 'dword';
  23.  672   1      declare UINT_32     literally 'word';
  24.  673   1      declare NIL_SEL     literally 'selectorof(NIL)';
  25.  
  26.  674   1      plm_data: procedure public;
  27.               /**********************************************************************/
  28.               /* Demonstrates PLM data references.                                  */
  29.               /**********************************************************************/
  30.  
  31.  675   2          declare array1(12)      byte data(30,31,32,33,34,35,36,37,38,39,40,41);
  32.  676   2          declare excep           word;
  33.  677   2          declare i               byte;
  34.  
  35.  678   2          declare CUSTOMER_TYPE   literally 'structure(
  36.                               tag         byte,
  37.                               name(8)     byte,
  38.                               phone(7)    byte,
  39.                               linkfor     pointer)';
  40.  
  41.  679   2          declare customerlist(3) CUSTOMER_TYPE;
  42.  
  43.  680   2          declare customer_ptr    pointer,
  44.                           customer        based customer_ptr  CUSTOMER_TYPE;
  45.  
  46.  681   2          declare oldcust_ptr     pointer,
  47.                           oldcust         based oldcust_ptr  CUSTOMER_TYPE;
  48.  
  49.  682   2          declare name_init(3)    pointer data(
  50.                                                      @('Beth    ', 0),
  51.                                                      @('Steve   ', 0),
  52.                                                      @('Becky   ', 0));
  53.  683   2          declare phone_init(3)   structure(
  54.                           number(7)       byte)   data(   '5551234',
  55.                                                           '5555678',
  56.                                                           '5554321'   );
  57.  
  58.  684   2          declare struc1          structure(
  59.                               xbyte       byte,
  60.                               xword       word,
  61. PL/M-386 COMPILER    putils                                                                  09/05/90 12:14:32  PAGE   2
  62.  
  63.  
  64.                               xint        integer,
  65.                               xdword      dword,
  66.                               xptr        pointer);
  67.  
  68.                   /* Initialize STRUC1 to test variable types.                      */
  69.  685   2          struc1.xbyte    = '*';                               /* byte      */
  70.  686   2          struc1.xword    = 65535;                             /* word      */
  71.  687   2          struc1.xint     = -32000;                            /* integer   */
  72.  688   2          struc1.xdword   = 4000000000;                        /* dword     */
  73.  689   2          struc1.xptr     = @array1;                           /* pointer   */
  74.  
  75.                   /* Initialize CUSTOMERLIST structures to test based variables.    */
  76.  690   2          customer_ptr = NIL;
  77.  691   2          do i = 0 to 2;
  78.  692   3              oldcust_ptr = customer_ptr;
  79.  693   3              customer_ptr = @customerlist(i);
  80.  694   3              call movb(name_init(i),@customer.name, 8 );
  81.  695   3              call movb(@phone_init(i).number, @customer.phone, 7);
  82.  696   3              if ( NIL <> oldcust_ptr ) then
  83.  697   3                  oldcust.linkfor = customer_ptr;
  84.  698   3              do case (i);
  85.  699   4                  customer.tag = '0';
  86.  700   4                  customer.tag = '1';
  87.  701   4                  customer.tag = '2';
  88.  702   4                  end;
  89.  703   3              end;
  90.  704   2          end plm_data;
  91.  
  92.  
  93.  705   1      delay: procedure(msecs) reentrant public;
  94.  706   2          declare msecs       word;
  95.  
  96.  707   2          declare i           word;
  97.  708   2          declare sleep100    word;
  98.  
  99.  709   2          sleep100 = msecs / 100;
  100.  
  101.  710   2          do i = 1 to sleep100;
  102.  711   3              call delay_fine (10);   /*  delay_fine(10) delays for 100 msecs. */
  103.  712   3              end;
  104.  
  105.  713   2          end delay;
  106.  
  107.  714   1      delay_fine: procedure(count) reentrant public;
  108.  715   2          declare count   word;
  109.  
  110.  716   2          declare exception   word;
  111.  
  112.  717   2          if count <> 0 then do;
  113.  719   3              call rqsleep (1, @exception);   /*  One rqsleep unit is 10 msecs. */
  114.  720   3              call delay_fine (count - 1);    /*  Call self recursively.        */
  115.  721   3          end;
  116.  
  117.  722   2          end delay_fine;
  118.  
  119.  723   1      end putils;
  120. PL/M-386 COMPILER    putils                                                                  09/05/90 12:14:32  PAGE   3
  121.  
  122.  
  123. MODULE INFORMATION:
  124.  
  125.      CODE AREA SIZE     = 000001F6H        502D
  126.      CONSTANT AREA SIZE = 0000004EH         78D
  127.      VARIABLE AREA SIZE = 00000060H         96D
  128.      MAXIMUM STACK SIZE = 0000001CH         28D
  129.      2731 LINES READ
  130.      0 PROGRAM WARNINGS
  131.      0 PROGRAM ERRORS
  132.  
  133. DICTIONARY SUMMARY:
  134.  
  135.      1413KB MEMORY AVAILABLE
  136.      58KB MEMORY USED   (4%)
  137.      0KB DISK SPACE USED
  138.  
  139. END OF PL/M-386 COMPILATION
  140.