* Changed timing support to work directly of ConsoleZ80's tick count
[fw/sdcc] / support / tests / dhrystone / dhry.c
1 /** Sanatised version of the dhrystone-2.1 test.
2
3     Modifications Michael Hope <michaelh@earthling.net>
4
5     This is derrived from the dhrystone-2.1.tar.gz tarball available
6     all over the net.  I sourced it from the Red Hat src rpm.
7
8     Modifications:
9     * Made it more ANSI compliant.
10     * Changed any array function arguments to pointers to make my 
11       compiler work.
12     * Removed malloc's for a couple of static arrays.
13     * Into one file.
14     * Proc_8 is a bit messy.  It originally took a 2 dim array, but
15       sdcc doesnt support this.  So the offsets are hard coded...
16
17     Notes:
18     * The comment at the start of Func_1 about the input being
19       H, R on the first call is wrong - Func_1 is first called
20       from Func_2 where the input is R, Y.  The test still succeeds.
21       
22     I couldnt find a copyright in the original - the most relevent
23     part follows:
24
25     A SPECIAL THANKS
26     I didn't write the DHRYSTONE benchmark.  Rheinhold Weicker did. He has
27     certainly provided us with a useful tool for benchmarking, and is
28     to be congratulated.
29
30     Rick Richardson
31     PC Research, Inc.
32     (201) 389-8963 (9-17 EST)
33     (201) 542-3734 (7-9,17-24 EST)
34     ...!uunet!pcrat!rick        (normal mail)
35     ...!uunet!pcrat!dry2        (results only)
36 */
37
38 #include "dhry.h"
39
40 /* Temporary definitions.  Remove soon :) */
41 #if SDCC
42 void *memcpy(void *dest, const char *src, int wLen);
43 #endif
44 char *strcpy(char *dest, const char *src);
45 int strcmp(const char *s1, const char *s2);
46
47 Rec_Pointer     Ptr_Glob,
48                 Next_Ptr_Glob;
49 int             Int_Glob;
50 Boolean         Bool_Glob;
51 char            Ch_1_Glob,
52                 Ch_2_Glob;
53 int             Arr_1_Glob [50];
54 int             Arr_2_Glob [50] [50];
55
56 /* Used instead of malloc() */
57 static Rec_Type _r[2];
58
59 void Proc_1 (REG Rec_Pointer Ptr_Val_Par);
60 void Proc_2 (One_Fifty *Int_Par_Ref);
61 void Proc_5 (void);
62 void Proc_4 (void);
63 void Proc_7 (One_Fifty Int_1_Par_Val, One_Fifty Int_2_Par_Val, One_Fifty *Int_Par_Ref);
64 void Proc_8 (int *Arr_1_Par_Ref, int *Arr_2_Par_Ref,
65              int Int_1_Par_Val, int Int_2_Par_Val);
66 void Proc_6 (Enumeration Enum_Val_Par, Enumeration *Enum_Ref_Par);
67 void Proc_3 (Rec_Pointer *Ptr_Ref_Par);
68 Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val);
69 Boolean Func_2 (char *Str_1_Par_Ref, char *Str_2_Par_Ref);
70 Boolean Func_3 (Enumeration Enum_Par_Val);
71
72 void printf(const char *format, ...);
73 void exit(int val);
74 unsigned _clock(void);
75
76 /*#define DPRINTF(_a)  printf _a*/
77 #define DPRINTF(_a)
78
79 unsigned getsp(void);
80
81 #if SDCC
82 int _main(void) 
83 #else
84 int main(void)
85 #endif
86 {
87     One_Fifty       Int_1_Loc;
88     REG   One_Fifty       Int_2_Loc;
89     One_Fifty       Int_3_Loc;
90     REG   Capital_Letter Ch_Index;
91     Enumeration     Enum_Loc;
92     Str_30          Str_1_Loc;
93     Str_30          Str_2_Loc;
94     REG   int             Run_Index;
95     REG   int             Number_Of_Runs;
96     unsigned endTime;
97
98     printf("[dhry]\n");
99
100     Next_Ptr_Glob = &_r[0];
101     Ptr_Glob = &_r[1];
102
103     Ptr_Glob->Ptr_Comp                    = Next_Ptr_Glob;
104     Ptr_Glob->Discr                       = Ident_1;
105     Ptr_Glob->variant.var_1.Enum_Comp     = Ident_3;
106     Ptr_Glob->variant.var_1.Int_Comp      = 40;
107
108     strcpy (Ptr_Glob->variant.var_1.Str_Comp, 
109             "DHRYSTONE PROGRAM, SOME STRING");
110     strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
111
112     Arr_2_Glob [8][7] = 10;
113     /* Was missing in published program. Without this statement,    */
114     /* Arr_2_Glob [8][7] would have an undefined value.             */
115     /* Warning: With 16-Bit processors and Number_Of_Runs > 32000,  */
116     /* overflow may occur for this array element.                   */
117
118     Number_Of_Runs = 32766;
119
120     /* Main test loop */
121     for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index) {
122         DPRINTF(("Run_Index = %d\n", Run_Index));
123         Proc_5();
124         Proc_4();
125         /* Ch_1_Glob == 'A', Ch_2_Glob == 'B', Bool_Glob == true */
126         DPRINTF(("Ch_1_Glob '%c' == 'A', Ch_2_Glob '%c' == 'B', Bool_Glob %d == 1\n", Ch_1_Glob, Ch_2_Glob, Bool_Glob));
127
128         Int_1_Loc = 2;
129         Int_2_Loc = 3;
130         strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
131         Enum_Loc = Ident_2;
132         Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
133         /* Bool_Glob == 1 */
134         DPRINTF(("Bool_Glob %d == 1, Int_1_Loc %d == 2, Int_2_Loc %d == 3\n", Bool_Glob, Int_1_Loc, Int_2_Loc));
135         while (Int_1_Loc < Int_2_Loc)  /* loop body executed once */
136             {
137                 DPRINTF(("m.1 Executes once.\n"));
138                 Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
139                 /* Int_3_Loc == 7 */
140                 DPRINTF(("Int_3_Loc %d == 7\n", Int_3_Loc));
141                 DPRINTF(("Proc_7\n"));
142                 Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
143                 /* Int_3_Loc == 7 */
144                 Int_1_Loc += 1;
145             } /* while */
146         DPRINTF(("m.2 Check above executed once.\n"));
147         /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
148         DPRINTF(("Int_1_Loc %d == 3, Int_2_Loc %d == 3, Int_3_Loc %d == 7\n",
149                Int_1_Loc, Int_2_Loc, Int_3_Loc));
150
151         DPRINTF(("Proc_8\n"));
152         Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
153         /* Int_Glob == 5 */
154         DPRINTF(("Int_Glob %d == 5\n", Int_Glob));
155         DPRINTF(("Proc_1\n"));
156         Proc_1 (Ptr_Glob);
157         for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
158             /* loop body executed twice */
159             {
160                 DPRINTF(("Func_1\n"));
161                 if (Enum_Loc == Func_1 (Ch_Index, 'C'))
162                     /* then, not executed */
163                     {
164                         DPRINTF(("Proc_6\n"));
165                         Proc_6 (Ident_1, &Enum_Loc);
166                         strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
167                         Int_2_Loc = Run_Index;
168                         Int_Glob = Run_Index;
169                     }
170             }
171         /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
172         DPRINTF(("Int_1_Loc %d == 3, Int_2_Loc %d == 3, Int_3_Loc %d == 7\n",
173                Int_1_Loc, Int_2_Loc, Int_3_Loc));
174
175         Int_2_Loc = Int_2_Loc * Int_1_Loc;
176         Int_1_Loc = Int_2_Loc / Int_3_Loc;
177         Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
178         /* Int_1_Loc == 1, Int_2_Loc == 13, Int_3_Loc == 7 */
179         DPRINTF(("Int_1_Loc %d == 1, Int_2_Loc %d == 13, Int_3_Loc %d == 7\n",
180                Int_1_Loc, Int_2_Loc, Int_3_Loc));
181         DPRINTF(("Proc_2\n"));
182         Proc_2 (&Int_1_Loc);
183         /* Int_1_Loc == 5 */
184         DPRINTF(("Int_1_Loc %d == 5\n", Int_1_Loc));
185         DPRINTF(("Looping.\n"));
186     } /* loop "for Run_Index" */
187
188     printf("Run_Index = %d\n", Run_Index);
189
190     endTime = _clock();
191
192     printf ("Execution ends\n");
193     printf ("\n");
194     printf ("Final values of the variables used in the benchmark:\n");
195     printf ("\n");
196     printf ("Int_Glob:            %d\n", Int_Glob);
197     printf ("        should be:   %d\n", (int)5);
198     printf ("Bool_Glob:           %d\n", Bool_Glob);
199     printf ("        should be:   %d\n", (int)1);
200     printf ("Ch_1_Glob:           %c\n", Ch_1_Glob);
201     printf ("        should be:   %c\n", 'A');
202     printf ("Ch_2_Glob:           %c\n", Ch_2_Glob);
203     printf ("        should be:   %c\n", 'B');
204     printf ("Arr_1_Glob[8]:       %d\n", Arr_1_Glob[8]);
205     printf ("        should be:   %d\n", (int)7);
206     printf ("Arr_2_Glob[8][7]:    %d\n", Arr_2_Glob[8][7]);
207     printf ("        should be:   Number_Of_Runs + 10\n");
208     printf ("Ptr_Glob->\n");
209     printf ("  Ptr_Comp:          %d\n", (int) Ptr_Glob->Ptr_Comp);
210     printf ("        should be:   (implementation-dependent)\n");
211     printf ("  Discr:             %d\n", (int)Ptr_Glob->Discr);
212     printf ("        should be:   %d\n", (int)0);
213     printf ("  Enum_Comp:         %d\n", (int)Ptr_Glob->variant.var_1.Enum_Comp);
214     printf ("        should be:   %d\n", (int)2);
215     printf ("  Int_Comp:          %d\n", (int)Ptr_Glob->variant.var_1.Int_Comp);
216     printf ("        should be:   %d\n", (int)17);
217     printf ("  Str_Comp:          %s\n", (char *)Ptr_Glob->variant.var_1.Str_Comp);
218     printf ("        should be:   DHRYSTONE PROGRAM, SOME STRING\n");
219     printf ("Next_Ptr_Glob->\n");
220     printf ("  Ptr_Comp:          %d\n", (int) Next_Ptr_Glob->Ptr_Comp);
221     printf ("        should be:   (implementation-dependent), same as above\n");
222     printf ("  Discr:             %d\n", Next_Ptr_Glob->Discr);
223     printf ("        should be:   %d\n", (int)0);
224     printf ("  Enum_Comp:         %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
225     printf ("        should be:   %d\n", (int)1);
226     printf ("  Int_Comp:          %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
227     printf ("        should be:   %d\n", (int)18);
228     printf ("  Str_Comp:          %s\n",
229             Next_Ptr_Glob->variant.var_1.Str_Comp);
230     printf ("        should be:   DHRYSTONE PROGRAM, SOME STRING\n");
231     printf ("Int_1_Loc:           %d\n", Int_1_Loc);
232     printf ("        should be:   %d\n", (int)5);
233     printf ("Int_2_Loc:           %d\n", Int_2_Loc);
234     printf ("        should be:   %d\n", (int)13);
235     printf ("Int_3_Loc:           %d\n", Int_3_Loc);
236     printf ("        should be:   %d\n", (int)7);
237     printf ("Enum_Loc:            %d\n", Enum_Loc);
238     printf ("        should be:   %d\n", (int)1);
239     printf ("Str_1_Loc:           %s\n", Str_1_Loc);
240     printf ("        should be:   DHRYSTONE PROGRAM, 1'ST STRING\n");
241     printf ("Str_2_Loc:           %s\n", Str_2_Loc);
242     printf ("        should be:   DHRYSTONE PROGRAM, 2'ND STRING\n");
243     printf ("\n");
244
245     printf("Time: %u ticks\n", endTime);
246     printf("Dhrystones/tick = %u\n", Number_Of_Runs / (endTime/100));
247 }
248
249 void Proc_1 (REG Rec_Pointer Ptr_Val_Par)
250 /* executed once */
251 {
252     REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;  
253     /* == Ptr_Glob_Next */
254     /* Local variable, initialized with Ptr_Val_Par->Ptr_Comp,    */
255     /* corresponds to "rename" in Ada, "with" in Pascal           */
256   
257     structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob); 
258     Ptr_Val_Par->variant.var_1.Int_Comp = 5;
259     Next_Record->variant.var_1.Int_Comp 
260         = Ptr_Val_Par->variant.var_1.Int_Comp;
261     Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
262     Proc_3 (&Next_Record->Ptr_Comp);
263     /* Ptr_Val_Par->Ptr_Comp->Ptr_Comp 
264        == Ptr_Glob->Ptr_Comp */
265     if (Next_Record->Discr == Ident_1)
266         /* then, executed */
267         {
268             Next_Record->variant.var_1.Int_Comp = 6;
269             Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp, 
270                     &Next_Record->variant.var_1.Enum_Comp);
271             Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
272             Proc_7 (Next_Record->variant.var_1.Int_Comp, 10, 
273                     &Next_Record->variant.var_1.Int_Comp);
274         }
275     else /* not executed */
276         structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
277 } /* Proc_1 */
278
279
280 void Proc_2 (One_Fifty *Int_Par_Ref)
281     /******************/
282     /* executed once */
283     /* *Int_Par_Ref == 1, becomes 4 */
284 {
285     One_Fifty  Int_Loc;  
286     Enumeration   Enum_Loc;
287
288     DPRINTF(("-> Proc_2\n"));
289
290     Int_Loc = *Int_Par_Ref + 10;
291     do {
292         DPRINTF(("1\n"));
293         /* executed once */
294         if (Ch_1_Glob == 'A')
295             /* then, executed */
296             {
297                 DPRINTF(("2\n"));
298                 Int_Loc -= 1;
299                 *Int_Par_Ref = Int_Loc - Int_Glob;
300                 Enum_Loc = Ident_1;
301             } /* if */
302         DPRINTF(("3\n"));
303     } while (Enum_Loc != Ident_1); /* true */
304     DPRINTF(("Proc_2 done.\n"));
305 } /* Proc_2 */
306
307
308 void Proc_3 (Rec_Pointer *Ptr_Ref_Par)
309     /******************/
310     /* executed once */
311     /* Ptr_Ref_Par becomes Ptr_Glob */
312 {
313     if (Ptr_Glob != Null)
314         /* then, executed */
315         *Ptr_Ref_Par = Ptr_Glob->Ptr_Comp;
316     Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
317 } /* Proc_3 */
318
319 void Proc_4 (void) /* without parameters */
320     /*******/
321     /* executed once */
322 {
323     Boolean Bool_Loc;
324
325     DPRINTF(("-> Proc_4\n"));
326     Bool_Loc = Ch_1_Glob == 'A';
327     Bool_Glob = Bool_Loc | Bool_Glob;
328     Ch_2_Glob = 'B';
329     DPRINTF(("Expect Ch_1_Glob '%c' == 'A'\n", (char)Ch_1_Glob));
330     DPRINTF(("       Ch_2_Glob '%c' == 'B'\n", (char)Ch_2_Glob));
331     DPRINTF(("       Bool_Loc %d == 1\n", (unsigned)Bool_Loc));
332     DPRINTF(("       Bool_Glob %d == 1\n", (unsigned)Bool_Glob));
333 } /* Proc_4 */
334
335
336 void Proc_5 () /* without parameters */
337     /*******/
338     /* executed once */
339 {
340     Ch_1_Glob = 'A';
341     Bool_Glob = false;
342 } /* Proc_5 */
343
344 void Proc_6 (Enumeration Enum_Val_Par, Enumeration *Enum_Ref_Par)
345     /*********************************/
346     /* executed once */
347     /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
348
349 {
350     *Enum_Ref_Par = Enum_Val_Par;
351     if (! Func_3 (Enum_Val_Par))
352         /* then, not executed */
353         *Enum_Ref_Par = Ident_4;
354     switch (Enum_Val_Par)
355         {
356         case Ident_1: 
357             *Enum_Ref_Par = Ident_1;
358             break;
359         case Ident_2: 
360             if (Int_Glob > 100)
361                 /* then */
362                 *Enum_Ref_Par = Ident_1;
363             else *Enum_Ref_Par = Ident_4;
364             break;
365         case Ident_3: /* executed */
366             *Enum_Ref_Par = Ident_2;
367             break;
368         case Ident_4: break;
369         case Ident_5: 
370             *Enum_Ref_Par = Ident_3;
371             break;
372         } /* switch */
373 } /* Proc_6 */
374
375
376 /*************************************************/
377 /* executed three times                                         */
378 /* first call:      Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R'    */
379 /* second call:     Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C'    */
380 /* third call:      Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C'    */
381 Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val)
382 {
383     Capital_Letter        Ch_1_Loc;
384     Capital_Letter        Ch_2_Loc;
385
386     DPRINTF(("-> Func_1\n"));
387     DPRINTF(("  Inputs: Ch_1_Par_Val '%c' == { H, A, B }\n", (char)Ch_1_Par_Val));
388     DPRINTF(("          Ch_2_Par_Val '%c' == { R, C, C }\n", (char)Ch_2_Par_Val));
389
390     Ch_1_Loc = Ch_1_Par_Val;
391     Ch_2_Loc = Ch_1_Loc;
392     if (Ch_2_Loc != Ch_2_Par_Val) {
393         /* then, executed */
394         return (Ident_1);
395     }
396     else  /* not executed */
397         {
398             Ch_1_Glob = Ch_1_Loc;
399             return (Ident_2);
400         }
401 } /* Func_1 */
402
403 Boolean Func_3 (Enumeration Enum_Par_Val)
404     /***************************/
405     /* executed once        */
406     /* Enum_Par_Val == Ident_3 */
407 {
408     Enumeration Enum_Loc;
409
410     Enum_Loc = Enum_Par_Val;
411     if (Enum_Loc == Ident_3)
412         /* then, executed */
413         return (true);
414     else /* not executed */
415         return (false);
416 } /* Func_3 */
417
418 void Proc_7 (One_Fifty Int_1_Par_Val, One_Fifty Int_2_Par_Val, One_Fifty *Int_Par_Ref)
419     /**********************************************/
420     /* executed three times                                      */ 
421     /* first call:      Int_1_Par_Val == 2, Int_2_Par_Val == 3,  */
422     /*                  Int_Par_Ref becomes 7                    */
423     /* second call:     Int_1_Par_Val == 10, Int_2_Par_Val == 5, */
424     /*                  Int_Par_Ref becomes 17                   */
425     /* third call:      Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
426     /*                  Int_Par_Ref becomes 18                   */
427 {
428     One_Fifty Int_Loc;
429
430     Int_Loc = Int_1_Par_Val + 2;
431     *Int_Par_Ref = Int_2_Par_Val + Int_Loc;
432 } /* Proc_7 */
433
434 /*void Proc_8 (Arr_1_Dim Arr_1_Par_Ref, Arr_2_Dim Arr_2_Par_Ref, 
435   int Int_1_Par_Val, int Int_2_Par_Val)*/
436 void Proc_8 (int *Arr_1_Par_Ref, int *Arr_2_Par_Ref,
437              int Int_1_Par_Val, int Int_2_Par_Val)
438 {
439     REG One_Fifty Int_Index;
440     REG One_Fifty Int_Loc;
441
442     DPRINTF(("-> Proc_8\n"));
443     Int_Loc = Int_1_Par_Val + 5;
444     Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
445     DPRINTF(("Int_Loc %d == 8\n", Int_Loc));
446
447     Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
448     Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
449     for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
450         Arr_2_Par_Ref [Int_Loc*50 + Int_Index] = Int_Loc;
451     Arr_2_Par_Ref [Int_Loc * 50 + Int_Loc-1] += 1;
452     Arr_2_Par_Ref [(Int_Loc+20 *50) + Int_Loc] = Arr_1_Par_Ref [Int_Loc];
453     Int_Glob = 5;
454 }
455
456 /*********************************************************************/
457 /* executed once      */
458 /* Int_Par_Val_1 == 3 */
459 /* Int_Par_Val_2 == 7 */
460 Boolean Func_2 (char *Str_1_Par_Ref, char *Str_2_Par_Ref)
461     /*************************************************/
462     /* executed once */
463     /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
464     /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
465 {
466     REG One_Thirty        Int_Loc;
467     Capital_Letter    Ch_Loc;
468
469     DPRINTF(("-> Func_2\n"));
470     DPRINTF(("  Inputs Str_1_Par_Ref \"%s\" = \"DHRYSTONE PROGRAM, 1'ST STRING\"\n", Str_1_Par_Ref));
471     DPRINTF(("         Str_2_Par_Ref \"%s\" = \"DHRYSTONE PROGRAM, 2'ND STRING\"\n", Str_2_Par_Ref));
472
473     Int_Loc = 2;
474
475     while (Int_Loc <= 2) {
476 #if BROKEN_SDCC
477         char a, b;
478         DPRINTF(("  2.1 Runs once Int_Loc %u = 2.\n", (unsigned)Int_Loc));
479         /* loop body executed once */
480         a = Str_1_Par_Ref[Int_Loc];
481         b = Str_2_Par_Ref[Int_Loc+1];
482         if (Func_1 (a, b) == Ident_1)
483 #else
484         if (Func_1 (Str_1_Par_Ref[Int_Loc],
485                     Str_2_Par_Ref[Int_Loc+1]) == Ident_1)
486 #endif
487             /* then, executed */
488             {
489                 DPRINTF(("  2.3 Then OK.\n"));
490                 Ch_Loc = 'A';
491                 Int_Loc += 1;
492             } /* if, while */
493         else {
494             DPRINTF(("  2.2 Error.\n"));
495         }
496     }
497     if (Ch_Loc >= 'W' && Ch_Loc < 'Z') {
498         /* then, not executed */
499         DPRINTF((" 2.4 Error\n"));
500         Int_Loc = 7;
501     }
502     if (Ch_Loc == 'R') {
503         /* then, not executed */
504         DPRINTF((" 2.5 Error\n"));
505         return (true);
506     }
507     else /* executed */
508         {
509             DPRINTF(("Str_1_Par_Ref = \"%s\", Str_2_Par_Ref = \"%s\"\n",
510                    Str_1_Par_Ref, Str_2_Par_Ref));
511             if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
512                 /* then, not executed */
513                 {
514                     DPRINTF((" 2.5 Error diff=%d\n", strcmp(Str_1_Par_Ref, Str_2_Par_Ref)));
515                     Int_Loc += 7;
516                     Int_Glob = Int_Loc;
517                     return (true);
518                 }
519             else {
520                 /* executed */
521                 DPRINTF((" 2.6 OK\n"));
522                 return (false);
523             }
524         } /* if Ch_Loc */
525 } /* Func_2 */