home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / unix_c / bnchmrks / dhryston.c < prev    next >
Encoding:
Text File  |  1989-03-21  |  15.1 KB  |  550 lines

  1. 23-Oct-85 13:09:32-MDT,15974;000000000001
  2. Return-Path: <unix-sources-request@BRL.ARPA>
  3. Received: from BRL-TGR.ARPA by SIMTEL20.ARPA with TCP; Wed 23 Oct 85 13:08:54-MDT
  4. Received: from usenet by TGR.BRL.ARPA id a010172; 23 Oct 85 13:44 EDT
  5. From: "R.RICHARDSON" <rer@vaximile.uucp>
  6. Newsgroups: net.sources
  7. Subject: Dhrystone source and 10/22/85 results
  8. Message-ID: <149@vaximile.UUCP>
  9. Date: 22 Oct 85 04:10:21 GMT
  10. To:       unix-sources@BRL-TGR.ARPA
  11.  
  12. /*
  13.  *    "DHRYSTONE" Benchmark Program
  14.  *
  15.  *    Version:    C/1
  16.  *    Date:        12/01/84, RESULTS updated 10/22/85
  17.  *    Author:        Reinhold P. Weicker,  CACM Vol 27, No 10, 10/84 pg. 1013
  18.  *            Translated from ADA by Rick Richardson
  19.  *            Every method to preserve ADA-likeness has been used,
  20.  *            at the expense of C-ness.
  21.  *    Compile:    cc -O dry.c -o drynr            : No registers
  22.  *            cc -O -DREG=register dry.c -o dryr    : Registers
  23.  *    Defines:    Defines are provided for old C compiler's
  24.  *            which don't have enums, and can't assign structures.
  25.  *            The time(2) function is library dependant; One is
  26.  *            provided for CI-C86.  Your compiler may be different.
  27.  *            The LOOPS define is initially set for 50000 loops.
  28.  *            If you have a machine with large integers and is
  29.  *            very fast, please change this number to 500000 to
  30.  *            get better accuracy.  Please select the way to
  31.  *            measure the execution time using the TIME define.
  32.  *            For single user machines, time(2) is adequate. For
  33.  *            multi-user machines where you cannot get single-user
  34.  *            access, use the times(2) function.  If you have
  35.  *            neither, use a stopwatch in the dead of night.
  36.  *            Use a "printf" at the point marked "start timer"
  37.  *            to begin your timings. DO NOT use the UNIX "time(1)"
  38.  *            command, as this will measure the total time to
  39.  *            run this program, which will (erroneously) include
  40.  *            the time to malloc(3) storage and to compute the
  41.  *            time it takes to do nothing.
  42.  *    Run:        drynr; dryr
  43.  *
  44.  *    Results:    If you get any new machine/OS results, please send to:
  45.  *            {ihnp4,vax135,..}!houxm!vaximile!rer
  46.  *            and thanks to all that do.  Space prevents listing
  47.  *            the names of those who have provided some of these
  48.  *            results.
  49.  *    Note:        I order the list in increasing performance of the
  50.  *            "with registers" benchmark.  If the compiler doesn't
  51.  *            provide register variables, then the benchmark
  52.  *            is the same for both REG and NOREG.  I'm not going
  53.  *            to list a compiler in a better place because if it
  54.  *            had register variables it might do better. No
  55.  *            register variables is a big loss in my book.
  56.  *    PLEASE:        Send complete information about the machine type,
  57.  *            clock speed, OS and C manufacturer/version.  If
  58.  *            the machine is modified, tell me what was done.
  59.  *            Otherwise, I won't include it in this list.  My
  60.  *            favorite flame on this subject was a machine that
  61.  *            was listed as an IBM PC/XT 8086-9.54Mhz.  That must
  62.  *            have been some kind of co-processor board that ran
  63.  *            the benchmark, not the XT.  Tell me what it was!
  64.  *
  65.  * MACHINE    MICROPROCESSOR    OPERATING    COMPILER    DHRYSTONES/SEC.
  66.  * TYPE                SYSTEM                NO REG    REGS
  67.  * --------------------------    ------------    -----------    ---------------
  68.  * IBM PC/XT    8088-4.77Mhz    PC/IX        cc         257     287
  69.  * Cosmos    68000-8Mhz    UniSoft        cc         305     322
  70.  * IBM PC/XT    8088-4.77Mhz    VENIX/86 2.0    cc         297     324
  71.  * IBM PC    8088-4.77Mhz    MSDOS 2.0    b16cc 2.0     310     340
  72.  * IBM PC    8088-4.77Mhz    MSDOS 2.0    CI-C86 2.20M     390     390
  73.  * IBM PC/XT    8088-4.77Mhz    PCDOS 2.1    Lattice 2.15     403      -  @
  74.  * PDP-11/34    -        UNIX V7M    cc         387     438
  75.  * Onyx C8002    Z8000-4Mhz    IS/1 1.1 (V7)    cc         476     511
  76.  * ATT PC6300    8086-8Mhz    MSDOS 2.11    b16cc 2.0     632     684
  77.  * IBM PC/AT    80286-6Mhz    PCDOS 3.0    CI-C86 2.1     666     684
  78.  * Macintosh    68000-7.8Mhz 2M    Mac Rom        Mac C 32 bit int 694     704
  79.  * Macintosh    68000-7.7Mhz    -        MegaMax C 2.0     661     709
  80.  * NEC PC9801F    8086-8Mhz    PCDOS 2.11    Lattice 2.15     768      -  @
  81.  * ATT PC6300    8086-8Mhz    MSDOS 2.11    CI-C86 2.20M     769     769
  82.  * ATT 3B2/300    WE32000-?Mhz    UNIX 5.0.2    cc         735     806
  83.  * IBM PC/AT    80286-6Mhz    PCDOS 3.0    MS 3.0(large)     833     847 LM
  84.  * VAX 11/750    -        Unix 4.2bsd    cc         862     877
  85.  * Fast Mac    68000-7.7Mhz    -        MegaMax C 2.0     839     904 +
  86.  * Macintosh    68000-7.8Mhz 2M    Mac Rom        Mac C 16 bit int 877     909 S
  87.  * IRIS-1400    68010-10Mhz    Unix System V    cc         909    1000
  88.  * IBM PC/AT    80286-6Mhz    VENIX/86 2.1    cc         961    1000
  89.  * IBM PC/AT    80286-6Mhz    PCDOS 3.0    b16cc 2.0     943    1063
  90.  * IBM PC/AT    80286-6Mhz    PCDOS 3.0    MS 3.0(small)    1063    1086
  91.  * VAX 11/750    -        VMS        VAX-11 C 2.0     958    1091
  92.  * ATT PC7300    68010-10Mhz    UNIX 5.2    cc        1041    1111
  93.  * ATT PC6300+    80286-6Mhz    MSDOS 3.1    b16cc 2.0    1111    1219
  94.  * Sun2/120    68010-10Mhz    Sun 4.2BSD    cc        1136    1219
  95.  * IBM PC/AT    80286-6Mhz    PCDOS 3.0    CI-C86 2.20M    1219    1219
  96.  * MASSCOMP 500    68010-10MHz    RTU V3.0    cc (V3.2)    1156    1238
  97.  * Cyb DataMate    68010-12.5Mhz    Uniplus 5.0    Unisoft cc    1162    1250
  98.  * PDP 11/70    -        UNIX 5.2    cc        1162    1250
  99.  * IBM PC/AT    80286-6Mhz    PCDOS 3.1    Lattice 2.15    1250      -  @
  100.  * IBM PC/AT    80286-7.5Mhz    VENIX/86 2.1    cc        1190    1315 *
  101.  * Sun2/120    68010-10Mhz    Standalone    cc        1219    1315
  102.  * ATT 3B2/400    WE32100-?Mhz    UNIX 5.2    cc        1315    1315
  103.  * HP-110    8086-5.33Mhz    MSDOS 2.11    Aztec-C        1282    1351 ?
  104.  * IBM PC/AT    80286-6Mhz    ?        ?        1250    1388 ?
  105.  * ATT PC6300+    80286-6Mhz    MSDOS 3.1    CI-C86 2.20M    1428    1428
  106.  * Cyb DataMate    68010-12.5Mhz    Uniplus 5.0    Unisoft cc    1470    1562 S
  107.  * VAX 11/780    -        UNIX 5.2    cc        1515    1562
  108.  * MicroVAX-II    -        -        -        1562    1612
  109.  * ATT 3B20    -        UNIX 5.2    cc        1515    1724
  110.  * HP9000-500    B series CPU    HP-UX 4.02    cc        1724    -
  111.  * IBM PC/STD    80286-8Mhz    ?        ?        1724    1785
  112.  * Gould PN6005    -        UTX 1.1(4.2BSD)    cc        1675    1964
  113.  * VAX 11/785    -        UNIX 5.2    cc        2083    2083
  114.  * VAX 11/785    -        VMS        VAX-11 C 2.0    2083    2083
  115.  * Pyramid 90x    -        OSx 2.3        cc        2272    2272
  116.  * Pyramid 90x    -        OSx 2.5        cc        3125    3125
  117.  * SUN 3/75    68020-16.67Mhz    SUN 4.2 V3    cc        3333    3571
  118.  * Sun 3/180    68020-16.67Mhz    Sun 4.2        cc        3333    3846
  119.  * MC 5400    68020-16.67MHz    RTU V3.0    cc (V4.0)    3952    4054
  120.  * SUN-3/160C    68020-16.67Mhz    Sun3.0ALPHA1 Un*x        3333    4166
  121.  * Gould PN9080    -        UTX-32 1.1c    cc        -    4629
  122.  * MC 5600/5700    68020-16.67MHz    RTU V3.0    cc (V4.0)    4504    4746 %
  123.  * VAX 8600    -        VMS        VAX-11 C 2.0    7142    7142
  124.  * Amdahl 470 V/8         ?        ?        -      15015
  125.  * Amdahl 580    -        UTS 5.0 Rel 1.2    cc Ver. 1.5    23076   23076
  126.  * Amdahl 5860             ?        ?        -      28355
  127.  *
  128.  *   *  15Mhz crystal substituted for original 12Mhz;
  129.  *   +  This Macintosh was upgraded from 128K to 512K in such a way that
  130.  *      the new 384K of memory is not slowed down by video generator accesses.
  131.  *   %  Single processor; MC == MASSCOMP
  132.  *   &  Seattle Telecom STD-286 board
  133.  *   @  vanilla Lattice compiler used with MicroPro standard library
  134.  *   S  Shorts used instead of ints
  135.  *   LM Large Memory Model. (Otherwise, all 80x8x results are small model)
  136.  *   ?  I don't trust results marked with '?'.  These were sent to me with
  137.  *      either incomplete information, or with times that just don't make sense.
  138.  *      If anybody can confirm these figures, please respond.
  139.  *
  140.  **************************************************************************
  141.  *
  142.  *    The following program contains statements of a high-level programming
  143.  *    language (C) in a distribution considered representative:
  144.  *
  145.  *    assignments            53%
  146.  *    control statements        32%
  147.  *    procedure, function calls    15%
  148.  *
  149.  *    100 statements are dynamically executed.  The program is balanced with
  150.  *    respect to the three aspects:
  151.  *        - statement type
  152.  *        - operand type (for simple data types)
  153.  *        - operand access
  154.  *            operand global, local, parameter, or constant.
  155.  *
  156.  *    The combination of these three aspects is balanced only approximately.
  157.  *
  158.  *    The program does not compute anything meaningfull, but it is
  159.  *    syntactically and semantically correct.
  160.  *
  161.  */
  162.  
  163. /* Accuracy of timings and human fatigue controlled by next two lines */
  164. #define LOOPS    50000        /* Use this for slow or 16 bit machines */
  165. /*#define LOOPS    500000        /* Use this for faster machines */
  166.  
  167. /* Compiler dependent options */
  168. #undef    NOENUM            /* Define if compiler has no enum's */
  169. #undef    NOSTRUCTASSIGN        /* Define if compiler can't assign structures */
  170. /* define only one of the next three defines */
  171. /*#define NOTIME        /* Define if no time() function in library */
  172. #define TIMES            /* Use times(2) time function */
  173. /*#define TIME            /* Use time(2) time function */
  174.  
  175. /* define the granularity of your times(2) function (when used) */
  176. #define HZ    60        /* times(2) returns 1/60 second (most) */
  177. /*#define HZ    100        /* times(2) returns 1/100 second (WECo) */
  178.  
  179.  
  180.  
  181. #ifdef    NOSTRUCTASSIGN
  182. #define    structassign(d, s)    memcpy(&(d), &(s), sizeof(d))
  183. #else
  184. #define    structassign(d, s)    d = s
  185. #endif
  186.  
  187. #ifdef    NOENUM
  188. #define    Ident1    1
  189. #define    Ident2    2
  190. #define    Ident3    3
  191. #define    Ident4    4
  192. #define    Ident5    5
  193. typedef int    Enumeration;
  194. #else
  195. typedef enum    {Ident1, Ident2, Ident3, Ident4, Ident5} Enumeration;
  196. #endif
  197.  
  198. typedef int    OneToThirty;
  199. typedef int    OneToFifty;
  200. typedef char    CapitalLetter;
  201. typedef char    String30[31];
  202. typedef int    Array1Dim[51];
  203. typedef int    Array2Dim[51][51];
  204.  
  205. struct    Record
  206. {
  207.     struct Record        *PtrComp;
  208.     Enumeration        Discr;
  209.     Enumeration        EnumComp;
  210.     OneToFifty        IntComp;
  211.     String30        StringComp;
  212. };
  213.  
  214. typedef struct Record     RecordType;
  215. typedef RecordType *    RecordPtr;
  216. typedef int        boolean;
  217.  
  218. #define    NULL        0
  219. #define    TRUE        1
  220. #define    FALSE        0
  221.  
  222. #ifndef REG
  223. #define    REG
  224. #endif
  225.  
  226. extern Enumeration    Func1();
  227. extern boolean        Func2();
  228.  
  229. #ifdef TIMES
  230. #include <sys/types.h>
  231. #include <sys/times.h>
  232. #endif
  233.  
  234. main()
  235. {
  236.     Proc0();
  237. }
  238.  
  239. /*
  240.  * Package 1
  241.  */
  242. int        IntGlob;
  243. boolean        BoolGlob;
  244. char        Char1Glob;
  245. char        Char2Glob;
  246. Array1Dim    Array1Glob;
  247. Array2Dim    Array2Glob;
  248. RecordPtr    PtrGlb;
  249. RecordPtr    PtrGlbNext;
  250.  
  251. Proc0()
  252. {
  253.     OneToFifty        IntLoc1;
  254.     REG OneToFifty        IntLoc2;
  255.     OneToFifty        IntLoc3;
  256.     REG char        CharLoc;
  257.     REG char        CharIndex;
  258.     Enumeration         EnumLoc;
  259.     String30        String1Loc;
  260.     String30        String2Loc;
  261.  
  262. #ifdef TIME
  263.     long            time();
  264.     long            starttime;
  265.     long            benchtime;
  266.     long            nulltime;
  267.     register unsigned int    i;
  268.     starttime = time(0);
  269.     for (i = 0; i < LOOPS; ++i);
  270.     nulltime = time(0) - starttime; /* Computes overhead of looping */
  271. #endif
  272. #ifdef TIMES
  273.     time_t            starttime;
  274.     time_t            benchtime;
  275.     time_t            nulltime;
  276.     struct tms        tms;
  277.     register unsigned int    i;
  278.     times(&tms); starttime = tms.tms_utime;
  279.     for (i = 0; i < LOOPS; ++i);
  280.     times(&tms);
  281.     nulltime = tms.tms_utime - starttime; /* Computes overhead of looping */
  282. #endif
  283.  
  284.     PtrGlbNext = (RecordPtr) malloc(sizeof(RecordType));
  285.     PtrGlb = (RecordPtr) malloc(sizeof(RecordType));
  286.     PtrGlb->PtrComp = PtrGlbNext;
  287.     PtrGlb->Discr = Ident1;
  288.     PtrGlb->EnumComp = Ident3;
  289.     PtrGlb->IntComp = 40;
  290.     strcpy(PtrGlb->StringComp, "DHRYSTONE PROGRAM, SOME STRING");
  291.  
  292. /*****************
  293. -- Start Timer --
  294. *****************/
  295. #ifdef TIME
  296.     starttime = time(0);
  297. #endif
  298. #ifdef TIMES
  299.     times(&tms); starttime = tms.tms_utime;
  300. #endif
  301. for (i = 0; i < LOOPS; ++i)
  302. {
  303.  
  304.     Proc5();
  305.     Proc4();
  306.     IntLoc1 = 2;
  307.     IntLoc2 = 3;
  308.     strcpy(String2Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
  309.     EnumLoc = Ident2;
  310.     BoolGlob = ! Func2(String1Loc, String2Loc);
  311.     while (IntLoc1 < IntLoc2)
  312.     {
  313.         IntLoc3 = 5 * IntLoc1 - IntLoc2;
  314.         Proc7(IntLoc1, IntLoc2, &IntLoc3);
  315.         ++IntLoc1;
  316.     }
  317.     Proc8(Array1Glob, Array2Glob, IntLoc1, IntLoc3);
  318.     Proc1(PtrGlb);
  319.     for (CharIndex = 'A'; CharIndex <= Char2Glob; ++CharIndex)
  320.         if (EnumLoc == Func1(CharIndex, 'C'))
  321.             Proc6(Ident1, &EnumLoc);
  322.     IntLoc3 = IntLoc2 * IntLoc1;
  323.     IntLoc2 = IntLoc3 / IntLoc1;
  324.     IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1;
  325.     Proc2(&IntLoc1);
  326.  
  327. /*****************
  328. -- Stop Timer --
  329. *****************/
  330. }
  331. #ifdef TIME
  332. benchtime = time(0) - starttime - nulltime;
  333. printf("Dhrystone time for %ld passes = %ld\n", (long) LOOPS, benchtime);
  334. printf("This machine benchmarks at %ld dhrystones/second\n",
  335.     ((long) LOOPS) / benchtime);
  336. #endif
  337. #ifdef TIMES
  338.     times(&tms);
  339.     benchtime = tms.tms_utime - starttime - nulltime;
  340. printf("Dhrystone time for %ld passes = %ld\n", (long) LOOPS, benchtime/HZ);
  341. printf("This machine benchmarks at %ld dhrystones/second\n",
  342.     ((long) LOOPS) * HZ / benchtime);
  343. #endif
  344.  
  345. }
  346.  
  347. Proc1(PtrParIn)
  348. REG RecordPtr    PtrParIn;
  349. {
  350. #define    NextRecord    (*(PtrParIn->PtrComp))
  351.  
  352.     structassign(NextRecord, *PtrGlb);
  353.     PtrParIn->IntComp = 5;
  354.     NextRecord.IntComp = PtrParIn->IntComp;
  355.     NextRecord.PtrComp = PtrParIn->PtrComp;
  356.     Proc3(NextRecord.PtrComp);
  357.     if (NextRecord.Discr == Ident1)
  358.     {
  359.         NextRecord.IntComp = 6;
  360.         Proc6(PtrParIn->EnumComp, &NextRecord.EnumComp);
  361.         NextRecord.PtrComp = PtrGlb->PtrComp;
  362.         Proc7(NextRecord.IntComp, 10, &NextRecord.IntComp);
  363.     }
  364.     else
  365.         structassign(*PtrParIn, NextRecord);
  366.  
  367. #undef    NextRecord
  368. }
  369.  
  370. Proc2(IntParIO)
  371. OneToFifty    *IntParIO;
  372. {
  373.     REG OneToFifty        IntLoc;
  374.     REG Enumeration        EnumLoc;
  375.  
  376.     IntLoc = *IntParIO + 10;
  377.     for(;;)
  378.     {
  379.         if (Char1Glob == 'A')
  380.         {
  381.             --IntLoc;
  382.             *IntParIO = IntLoc - IntGlob;
  383.             EnumLoc = Ident1;
  384.         }
  385.         if (EnumLoc == Ident1)
  386.             break;
  387.     }
  388. }
  389.  
  390. Proc3(PtrParOut)
  391. RecordPtr    *PtrParOut;
  392. {
  393.     if (PtrGlb != NULL)
  394.         *PtrParOut = PtrGlb->PtrComp;
  395.     else
  396.         IntGlob = 100;
  397.     Proc7(10, IntGlob, &PtrGlb->IntComp);
  398. }
  399.  
  400. Proc4()
  401. {
  402.     REG boolean    BoolLoc;
  403.  
  404.     BoolLoc = Char1Glob == 'A';
  405.     BoolLoc |= BoolGlob;
  406.     Char2Glob = 'B';
  407. }
  408.  
  409. Proc5()
  410. {
  411.     Char1Glob = 'A';
  412.     BoolGlob = FALSE;
  413. }
  414.  
  415. extern boolean Func3();
  416.  
  417. Proc6(EnumParIn, EnumParOut)
  418. REG Enumeration    EnumParIn;
  419. REG Enumeration    *EnumParOut;
  420. {
  421.     *EnumParOut = EnumParIn;
  422.     if (! Func3(EnumParIn) )
  423.         *EnumParOut = Ident4;
  424.     switch (EnumParIn)
  425.     {
  426.     case Ident1:    *EnumParOut = Ident1; break;
  427.     case Ident2:    if (IntGlob > 100) *EnumParOut = Ident1;
  428.             else *EnumParOut = Ident4;
  429.             break;
  430.     case Ident3:    *EnumParOut = Ident2; break;
  431.     case Ident4:    break;
  432.     case Ident5:    *EnumParOut = Ident3;
  433.     }
  434. }
  435.  
  436. Proc7(IntParI1, IntParI2, IntParOut)
  437. OneToFifty    IntParI1;
  438. OneToFifty    IntParI2;
  439. OneToFifty    *IntParOut;
  440. {
  441.     REG OneToFifty    IntLoc;
  442.  
  443.     IntLoc = IntParI1 + 2;
  444.     *IntParOut = IntParI2 + IntLoc;
  445. }
  446.  
  447. Proc8(Array1Par, Array2Par, IntParI1, IntParI2)
  448. Array1Dim    Array1Par;
  449. Array2Dim    Array2Par;
  450. OneToFifty    IntParI1;
  451. OneToFifty    IntParI2;
  452. {
  453.     REG OneToFifty    IntLoc;
  454.     REG OneToFifty    IntIndex;
  455.  
  456.     IntLoc = IntParI1 + 5;
  457.     Array1Par[IntLoc] = IntParI2;
  458.     Array1Par[IntLoc+1] = Array1Par[IntLoc];
  459.     Array1Par[IntLoc+30] = IntLoc;
  460.     for (IntIndex = IntLoc; IntIndex <= (IntLoc+1); ++IntIndex)
  461.         Array2Par[IntLoc][IntIndex] = IntLoc;
  462.     ++Array2Par[IntLoc][IntLoc-1];
  463.     Array2Par[IntLoc+20][IntLoc] = Array1Par[IntLoc];
  464.     IntGlob = 5;
  465. }
  466.  
  467. Enumeration Func1(CharPar1, CharPar2)
  468. CapitalLetter    CharPar1;
  469. CapitalLetter    CharPar2;
  470. {
  471.     REG CapitalLetter    CharLoc1;
  472.     REG CapitalLetter    CharLoc2;
  473.  
  474.     CharLoc1 = CharPar1;
  475.     CharLoc2 = CharLoc1;
  476.     if (CharLoc2 != CharPar2)
  477.         return (Ident1);
  478.     else
  479.         return (Ident2);
  480. }
  481.  
  482. boolean Func2(StrParI1, StrParI2)
  483. String30    StrParI1;
  484. String30    StrParI2;
  485. {
  486.     REG OneToThirty        IntLoc;
  487.     REG CapitalLetter    CharLoc;
  488.  
  489.     IntLoc = 1;
  490.     while (IntLoc <= 1)
  491.         if (Func1(StrParI1[IntLoc], StrParI2[IntLoc+1]) == Ident1)
  492.         {
  493.             CharLoc = 'A';
  494.             ++IntLoc;
  495.         }
  496.     if (CharLoc >= 'W' && CharLoc <= 'Z')
  497.         IntLoc = 7;
  498.     if (CharLoc == 'X')
  499.         return(TRUE);
  500.     else
  501.     {
  502.         if (strcmp(StrParI1, StrParI2) > 0)
  503.         {
  504.             IntLoc += 7;
  505.             return (TRUE);
  506.         }
  507.         else
  508.             return (FALSE);
  509.     }
  510. }
  511.  
  512. boolean Func3(EnumParIn)
  513. REG Enumeration    EnumParIn;
  514. {
  515.     REG Enumeration    EnumLoc;
  516.  
  517.     EnumLoc = EnumParIn;
  518.     if (EnumLoc == Ident3) return (TRUE);
  519.     return (FALSE);
  520. }
  521.  
  522. #ifdef    NOSTRUCTASSIGN
  523. memcpy(d, s, l)
  524. register char    *d;
  525. register char    *s;
  526. int    l;
  527. {
  528.     while (l--) *d++ = *s++;
  529. }
  530. #endif
  531.  
  532. /*
  533.  *    Library function for compilers with no time(2) function in the
  534.  *    library.
  535.  */
  536. #ifdef    NOTIME
  537. long    time(p)
  538. long    *p;
  539. {        /* CI-C86 time function - don't use around midnight */
  540.     long    t;
  541.     struct regval {unsigned int ax,bx,cx,dx,si,di,ds,es; } regs;
  542.  
  543.     regs.ax = 0x2c00;
  544.     sysint21(®s, ®s);
  545.     t = ((regs.cx>>8)*60L + (regs.cx & 0xff))*60L + (regs.dx>>8);
  546.     if (p) *p = t;
  547.     return t;
  548. }
  549. #endif
  550.