Rev 485 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
318 | heavyiron | 1 | newrating: |
2 | |||
4107 | mario79 | 3 | cmp [freqbb], 151 |
4 | jl f266 |
||
318 | heavyiron | 5 | |
4107 | mario79 | 6 | cmp [freqbb], 150 |
7 | ja ft |
||
8 | |||
9 | jmp vyxod |
||
10 | ft: |
||
11 | |||
12 | cmp [freqbb], 180 |
||
13 | ja f400 |
||
14 | |||
15 | cmp [freqbb], 181 |
||
16 | jl f333 |
||
17 | jmp vyxod |
||
318 | heavyiron | 18 | f266: |
19 | |||
20 | ;формулы вычисления XP-рейтинга Athlon-ов (Tbred, Barton): |
||
21 | ;FSB266/256kB: сделано |
||
22 | ;XP+ (Freq<2000MHz) = 1000 + (Freq-1000)*1,5 = Freq*1.5-500 |
||
23 | ;XP+ (Freq>=2000MHz) = 900 + (Freq-1000)*1,5 = Freq*1.5-600 |
||
24 | |||
4107 | mario79 | 25 | mov [FRS], 266 |
318 | heavyiron | 26 | |
27 | cmp [total], 2000 |
||
28 | jl pal |
||
29 | |||
30 | ; Рейтинг для Паломино 2000+ |
||
31 | mov eax,[total] |
||
32 | imul eax, 3 |
||
33 | shr eax,1 |
||
34 | sub eax, 600 |
||
35 | mov [rating], eax |
||
36 | |||
37 | jmp vyxod |
||
38 | |||
39 | pal: |
||
40 | |||
41 | ; Рейтинг для Паломино 2000- |
||
42 | mov eax,[total] |
||
43 | imul eax, 3 |
||
44 | shr eax,1 |
||
45 | sub eax, 500 |
||
46 | mov [rating], eax |
||
47 | |||
48 | jmp vyxod |
||
49 | |||
50 | |||
51 | f333: |
||
52 | |||
4107 | mario79 | 53 | mov [FRS], 333 |
318 | heavyiron | 54 | |
55 | |||
56 | cmp [L2], 256 |
||
57 | jl .Th ; Thorton |
||
58 | |||
59 | ;FSB333/512kB: сделано |
||
60 | ;XP+ (Freq<2100MHz) = Freq*1.2 + 300 |
||
61 | ;XP+ (Freq>=2100MHz) = Freq*1.2 + 400 |
||
62 | |||
63 | cmp [total], 2100 |
||
64 | jl .r2100 |
||
65 | mov eax,[total] |
||
66 | xor edx, edx |
||
67 | imul eax, 600000 |
||
68 | mov ebx, 500000 |
||
69 | div ebx |
||
70 | mov [rating], eax |
||
71 | add [rating], 400 |
||
72 | |||
73 | ; Rating for Barton F<2000 MHz |
||
74 | jmp vyxod |
||
75 | |||
76 | .r2100: |
||
77 | mov eax,[total] |
||
78 | xor edx, edx |
||
79 | imul eax, 600000 |
||
80 | mov ebx, 500000 |
||
81 | div ebx |
||
82 | mov [rating], eax |
||
83 | add [rating], 300 |
||
84 | |||
85 | |||
86 | ; Rating for Barton F>2000 MHz |
||
87 | jmp vyxod |
||
88 | |||
89 | ;FSB333/256kB: сделано |
||
90 | ;XP+ = Freq*1.2 + 100 |
||
91 | |||
92 | .Th: |
||
93 | |||
94 | mov eax,[total] |
||
95 | xor edx, edx |
||
96 | imul eax, 600000 |
||
97 | mov ebx, 500000 |
||
98 | div ebx |
||
99 | mov [rating], eax |
||
100 | add [rating], 100 |
||
101 | |||
102 | |||
103 | ;Rating for Thorton |
||
104 | |||
105 | |||
106 | jmp vyxod |
||
107 | |||
108 | f400: |
||
4107 | mario79 | 109 | mov [FRS], 400 |
318 | heavyiron | 110 | |
111 | ;FSB400/512kB: |
||
112 | ;XP+ = Freq*1.5 - 100 |
||
113 | |||
114 | mov eax,[total] |
||
115 | imul eax, 3 |
||
116 | shr eax,1 |
||
117 | sub eax, 100 |
||
118 | mov [rating], eax |
||
119 | |||
120 | vyxod: |
||
121 | |||
122 | |||
123 | ret |
||
124 | |||
125 | |||
126 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
127 | |||
128 | multipl: |
||
129 | ;--- вычисление коэффициента умножения - |
||
130 | ; портит регистры |
||
131 | ; out : CL = коэфф.умножения * 10, или 0 |
||
132 | |||
133 | xor ecx, ecx |
||
134 | |||
135 | cmp dword[smallvendor], 'cAMD' ; Check for Advanced Micro Devices CPU |
||
136 | jne noAMD |
||
137 | cmp byte [f], 5 |
||
138 | jne noAMDK6 |
||
139 | mov eax, 68 ; AMD-K6 (p.30) |
||
140 | mov ebx, 3 |
||
141 | mov edx, 0x0C0000087 |
||
485 | heavyiron | 142 | mcall ; eax - low dword |
318 | heavyiron | 143 | and eax, 111b |
144 | mov cl, [athloncoef3 + eax] |
||
145 | cmp eax, 6 |
||
146 | jne @f |
||
147 | cmp byte[m], 8 |
||
148 | jae @f |
||
149 | mov cl, 20 |
||
150 | @@: ret |
||
151 | |||
152 | noAMDK6:cmp byte [f], 6 |
||
153 | jne noAMDK7 |
||
154 | cmp byte [m], 5 |
||
155 | jna @f |
||
156 | mov eax, 0x80000007 |
||
157 | cpuid |
||
158 | and edx, 6 ; voltage ID control & frequency ID control |
||
159 | cmp edx, 6 |
||
160 | je AMDK7M |
||
161 | @@: mov eax, 68 ; Athlon/AthlonXP |
||
162 | mov ebx, 3 |
||
163 | mov edx, 0x0C0010015 |
||
485 | heavyiron | 164 | mcall |
318 | heavyiron | 165 | mov ebx, eax |
166 | shr ebx, 24 |
||
167 | and ebx, 0x0F |
||
168 | shr eax, 20 |
||
169 | jnc @f |
||
170 | add bl, 16 |
||
171 | @@: mov cl, [athloncoef + ebx] |
||
172 | ret |
||
173 | |||
174 | AMDK7M: mov eax, 68 ; AthonXP-M |
||
175 | mov ebx, 3 |
||
176 | mov edx, 0xC0010042 |
||
485 | heavyiron | 177 | mcall |
318 | heavyiron | 178 | and eax, 0x1F |
179 | mov cl, [athlonmcoef + eax] |
||
180 | ret |
||
181 | |||
182 | noAMDK7:cmp byte [f], 0xF |
||
183 | jne noAMDK8 |
||
184 | mov eax, 0x80000007 |
||
185 | cpuid |
||
186 | and edx, 6 ; voltage ID control & frequency ID control |
||
187 | cmp edx, 6 |
||
188 | je AMDK8M |
||
189 | mov eax, 68 ; Athon64 |
||
190 | mov ebx, 3 |
||
191 | mov edx, 0xC0010015 |
||
485 | heavyiron | 192 | mcall |
318 | heavyiron | 193 | shr eax, 24 |
194 | and al, 0x3F |
||
195 | shr al, 1 |
||
196 | add al, 4 |
||
197 | mov dl, 10 |
||
198 | mul dl |
||
199 | mov cl, al |
||
200 | ret |
||
201 | |||
202 | AMDK8M: mov eax, 68 ; Athon64-M |
||
203 | mov ebx, 3 |
||
204 | mov edx, 0xC0010042 |
||
485 | heavyiron | 205 | mcall |
318 | heavyiron | 206 | and al, 0x3F |
207 | shr al, 1 |
||
208 | add al, 4 |
||
209 | mov dl, 10 |
||
210 | mul dl |
||
211 | mov cl, al |
||
212 | ret |
||
213 | ;///////////////////////////////////////////////////////// |
||
214 | noAMD: cmp dword [smallvendor], 'ntel' ; Check for International Electronics CPU |
||
215 | jne noIntel |
||
216 | cmp byte[f], 0x0F |
||
217 | jne noIntelP4 |
||
218 | cmp byte [t], 6 |
||
219 | jne @f |
||
220 | mov eax, 68 ; Pentium M |
||
221 | mov ebx, 3 |
||
222 | mov edx, 0x2A |
||
485 | heavyiron | 223 | mcall |
318 | heavyiron | 224 | shr eax, 22 |
225 | and eax, 0x1F |
||
226 | mov dl, 10 |
||
227 | mul dl |
||
228 | mov cl, al |
||
229 | ret |
||
230 | @@: cmp byte [m], 2 |
||
231 | jae @f |
||
232 | mov eax, 68 ; Pentium 4 / Xeon (model < 2) Willamete |
||
233 | mov ebx, 3 |
||
234 | mov edx, 0x2A |
||
485 | heavyiron | 235 | mcall |
318 | heavyiron | 236 | shr eax, 8 |
237 | and eax, 0x0F |
||
238 | mov cl, [p4coef + eax] |
||
239 | ret |
||
240 | @@: mov eax, 68 ; Pentium 4 / Xeon (model >= 2) NorthWood |
||
241 | mov ebx, 3 |
||
242 | mov edx, 0x2C |
||
485 | heavyiron | 243 | mcall |
318 | heavyiron | 244 | shr eax, 24 |
245 | and eax, 0x1F |
||
246 | mov dl, 10 |
||
247 | mul dl |
||
248 | mov cl, al |
||
249 | ret |
||
250 | noIntelP4: |
||
251 | cmp byte[f], 6 |
||
252 | jne noIntelP6 |
||
253 | mov eax, 68 ; Pentium Pro / Pentium II / Pentium III |
||
254 | mov ebx, 3 |
||
255 | mov edx, 0x2A |
||
485 | heavyiron | 256 | mcall |
318 | heavyiron | 257 | shr eax, 22 |
258 | test al, 0x20 |
||
259 | jz @f |
||
260 | or al, 0x10 |
||
261 | @@: and eax, 0x1f |
||
262 | |||
263 | cmp byte[m], 0x06 ; ? 7 |
||
264 | ja @f |
||
265 | and al, 0x0f |
||
266 | @@: |
||
267 | mov cl, [coppercoeff + eax] |
||
268 | cmp byte[m], 0x0B |
||
269 | jb @f |
||
270 | mov cl, [tualatcoeff + eax] |
||
271 | |||
272 | cmp byte[m], 0x0B |
||
273 | je @f |
||
274 | mov dl, 10 ; model 0x0C - 0x0F - Dothan / Yonah / Conroe / Merom |
||
275 | mul dl |
||
276 | mov cl, al |
||
277 | |||
278 | @@: ret |
||
279 | |||
280 | noIntel: |
||
281 | noIntelP6: |
||
282 | noAMDK8: |
||
283 | ret>2000>2100MHz)>2000MHz)> |