summaryrefslogtreecommitdiff
path: root/app/speedtest/1986/src/speed tester
blob: 37f937fcd2b5506073d6979ebc1eba853998c3b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
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 drcken 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