diff options
Diffstat (limited to 'app/speedtest/1986/src/speed tester')
| -rw-r--r-- | app/speedtest/1986/src/speed tester | 209 | 
1 files changed, 209 insertions, 0 deletions
diff --git a/app/speedtest/1986/src/speed tester b/app/speedtest/1986/src/speed tester new file mode 100644 index 0000000..3f69008 --- /dev/null +++ b/app/speedtest/1986/src/speed tester @@ -0,0 +1,209 @@ +PACKET speed tester DEFINES test speed :
 +
 +
 +(***************************************************************************)
 +(*                                                                         *)
 +(*  Autor: A. Steinmann                        Copyright (C): HRZ - Unibi  *)
 +(*                                                                         *)
 +(***************************************************************************)
 +
 +
 +PROC test speed :
 + 
 +  INT VAR frequency 1,
 +          frequency 2 ;
 + 
 +  TEXT VAR name of material,
 +           name of the heart of material,
 +           high,
 +           low ;
 +
 +  REAL VAR begin,
 +           end ;
 +
 +
 +  page ;
 +  cursor (1,3) ;
 +  out (""15""+" EUMEL SPEED TESTER "+"     "+" EUMEL SPEED TESTER "+"     "+" EUMEL SPEED TESTER "+""14"") ;
 +  cursor (1,6) ;
 +  put ("Bitte gib Name/Typbezeichnung des Test-PC ein") ;
 +  line ;
 +  getline (name of material) ;
 +  line ;
 +  put ("Bitte gib Prozessortyp/Taktfrequenz ein") ;
 +  line ;
 +  getline (name of the heart of material) ;
 +  line ;
 +  name of material CAT "      " ;
 +
 +  output mem ;
 +  notice material (name of material + name of the heart of material) ;
 +
 +        REP
 +            output mem ;
 +            putline ("Bitte gib Genauigkeitsfaktor fuer schnelle Operationen ein") ;
 +            put ("Voreingestellt ist maxint   --> ") ;
 +            getline (high) ;
 +            line ;
 +            IF high = ""
 +               THEN frequency 1 := 32766
 +               ELSE frequency 1 := int (high)
 +            FI ;
 +            putline ("Bitte gib Genauigkeitsfaktor fuer langsame Operationen ein") ;
 +            put ("Voreingestellt ist maxint Div 2   --> ") ;
 +            getline (low) ;
 +            IF low = ""
 +               THEN frequency 2 := maxint DIV 2
 +               ELSE frequency 2 := int (low)
 +            FI ;
 +            notice frequency (frequency 1, frequency 2) ;
 +
 +            begin := clock (0) ; 
 +
 +
 +            test run down logic ;
 +            test integer operation ;
 +            test real operation ;
 +            test text operation ;
 +            test convert ;
 +
 +            end := clock (0) ; 
 +            page ;
 +            put ("Gesamtlaufzeit : ") ;
 +            put (time (end-begin)) ;
 +            line (2) ;
 +            put ("Taste drücken oder warten") ;
 +            pause (600) ; 
 +
 +
 +            page ;
 +            cursor (1,5) ;
 +            out (""5""13"") ;
 +            IF yes ("Ergebnis anschauen")
 +               THEN edit ("memory") ;
 +                    page
 +            FI ;
 +
 +            cursor (1,5) ;
 +            out (""5""13"") ;
 +            IF yes ("Ergebnis loeschen") 
 +               THEN forget ("memory",quiet)
 +            FI ;
 +
 +            cursor (1,5) ;
 +            out (""5""13"") 
 +            UNTIL no ("Neuer test")
 +        END REP .
 +
 +
 +test run down logic :
 +
 +notice heading ("Steuerkonstrukte") ;
 +
 +for loop (frequency 1) ;
 +while loop (frequency 1) ;
 +until loop (frequency 1) ;
 +if (frequency 1) ;
 +select (frequency 1) ;
 +proc (frequency 1) ;
 +proc one param int (frequency 1) ;
 +proc two param int (frequency 1) .
 +
 +
 +
 +test integer operation :
 +
 +notice heading ("Integer Operationen") ;
 +
 +int assign global (frequency 1) ;
 +int assign local (frequency 1) ;
 +int assign param (frequency 1) ;
 +row int (frequency 1) ;
 +int equal (frequency 1) ;
 +int lequal (frequency 1) ;
 +int add (frequency 1) ;
 +int mult (frequency 1) ;
 +int div (frequency 1) ;
 +int incr (frequency 1) ;
 +int mod (frequency 1) ;
 +int abs (frequency 1) ;
 +int min (frequency 1) .
 +
 +
 +
 +test real operation :
 +
 +notice heading ("Real Operationen") ;
 +
 +real assign (frequency 1) ;
 +row real (frequency 1) ;
 +real equal (frequency 1) ;
 +real lequal (frequency 1) ;
 +real add (frequency 1) ;
 +real mult (frequency 2) ;
 +real div (frequency 2) ;
 +real incr (frequency 1) ;
 +real mod (frequency 2) ;
 +real abs (frequency 1) ;
 +real min (frequency 1) .
 +
 +
 +
 +test text operation :
 +
 +notice heading ("Text Operationen") ;
 +
 +text assign 1 (frequency 1) ;
 +text assign 10 (frequency 1) ;
 +text assign 30 (frequency 1) ;
 +row text (frequency 1) ;
 +text equal 1 (frequency 1) ;
 +text equal 10 (frequency 1) ;
 +text equal 30 (frequency 1) ;
 +text lequal 1 (frequency 1) ;
 +text lequal 10 (frequency 1) ;
 +text lequal 30 (frequency 1) ;
 +text mult (frequency 1) ; 
 +cat (frequency 1) ;
 +text add 1 (frequency 1) ;
 +text add 10 (frequency 2) ;
 +text add 30 (frequency 2) ;
 +text length 1 (frequency 1) ;
 +text length 10 (frequency 1) ;
 +text length 30 (frequency 1) ;
 +text sub 1 (frequency 1) ;
 +text sub 10 (frequency 1) ;
 +text sub 30 (frequency 1) ;
 +subtext 1 (frequency 1) ;
 +subtext 10 (frequency 1) ;
 +subtext 30 (frequency 1) ;
 +replace 1 (frequency 1) ;
 +replace 10 (frequency 1) ;
 +replace 30 ( frequency 1) ;
 +text 1 (frequency 2) ;
 +text 10 (frequency 2) ;
 +text 30 (frequency 2) ;
 +pos 1 (frequency 1) ;
 +pos 10 (frequency 1) ;
 +pos 30 (frequency 1) .
 +
 +
 +
 +test convert :
 +
 +notice heading ("Konvertierungs Operationen") ;
 +
 +real to int (frequency 1) ;
 +int to real (frequency 1) ;
 +text to int (frequency 2) ;
 +int to text (frequency 1) ;
 +int to text 2 (frequency 2) ;
 +real to text (frequency 2) ;
 +real to text 2 (frequency 2) ;
 +code int (frequency 1) ;
 +code text (frequency 1) ;
 +
 +
 +END PROC test speed ;
 +
 +END PACKET speed tester 
  | 
