Subversion Repositories Kolibri OS

Rev

Rev 551 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 551 Rev 552
1
;******************************************************************************
1
;******************************************************************************
2
; project name:    CPUID                                                      *
2
; project name:    CPUID                                                      *
3
; target platform: KolibriOS, x86 (IA-32), x86-64 achitectures                *
3
; target platform: KolibriOS, x86 (IA-32), x86-64 achitectures                *
4
; compiler:        flat assembler 1.67.21                                     *
4
; compiler:        flat assembler 1.67.21                                     *
5
; version:         2.21                                                        *
5
; version:         2.21                                                        *
6
; last update:     18th May 2007         1st 2nd 3rd 4th 5th 6th 7th 8th 9th  *
6
; last update:     18th May 2007         1st 2nd 3rd 4th 5th 6th 7th 8th 9th  *
7
; maintained by:   Sergey Kuzmin aka Wildwest                                 *
7
; maintained by:   Sergey Kuzmin aka Wildwest                                 *
8
; e-mail:          kuzmin_serg@list.ru                                        *
8
; e-mail:          kuzmin_serg@list.ru                                        *
9
; site:            http://coolthemes.narod.ru/files.html                      *
9
; site:            http://coolthemes.narod.ru/files.html                      *
10
; license:         Copyright 2004-2007 Sergey Kuzmin and co-authors           *
10
; license:         Copyright 2004-2007 Sergey Kuzmin and co-authors           *
11
;                  Rules:                                                     *
11
;                  Rules:                                                     *
12
;                  1)you can use pieces of code in your project, but should   *
12
;                  1)you can use pieces of code in your project, but should   *
13
;                    mention the original author (include copyright notice);  *
13
;                    mention the original author (include copyright notice);  *
14
;                  2)if you modify CPUID (improve, port, translate, etc) send *
14
;                  2)if you modify CPUID (improve, port, translate, etc) send *
15
;                    your changes to the maintainer or make about post changes*
15
;                    your changes to the maintainer or make about post changes*
16
;                    at forum  http://meos.sysbin.com                         *
16
;                    at forum  http://meos.sysbin.com                         *
17
;-----------------------------------------------------------------------------*
17
;-----------------------------------------------------------------------------*
18
; English comments                                                            *
18
; English comments                                                            *
19
;------------------------------------------------------------------------------
19
;------------------------------------------------------------------------------
20
use32
20
use32
21
  org	 0x0
21
  org	 0x0
22
  db	 'MENUET01'
22
  db	 'MENUET01'
23
  dd	 0x01
23
  dd	 0x01
24
  dd	 START
24
  dd	 START
25
  dd	 I_END
25
  dd	 I_END
26
  dd U_END+4096
26
  dd U_END+4096
27
  dd U_END+4096
27
  dd U_END+4096
28
  dd	 0x0
28
  dd	 0x0
29
  dd	 0x0
29
  dd	 0x0
30
 
30
 
31
include '..\..\..\macros.inc' ; useful macroses
31
include '..\..\..\macros.inc' ; useful macroses
32
include 'draw.inc'
32
include 'draw.inc'
33
include 'brand.inc'           ;Brand ID decoding
33
include 'brand.inc'           ;Brand ID decoding
34
include 'caches.inc'          ;(L1 and L2 cashes decoding for Intel)
34
include 'caches.inc'          ;(L1 and L2 cashes decoding for Intel)
35
include 'multipli.inc'        ;(multiplier decoding)
35
include 'multipli.inc'        ;(multiplier decoding)
36
include 'features.inc'        ;(features decoding)
36
include 'features.inc'        ;(features decoding)
37
 
-
 
38
include 'gif2img.inc'         ;macros to convert gif to img
-
 
39
 
37
 
40
include 'rsatest.inc'
38
include 'rsatest.inc'
41
include 'variable.inc'
39
include 'variable.inc'
42
 
40
 
43
 
41
 
44
 
42
 
45
START:			;   LET'S GO!!!
43
START:			;   LET'S GO!!!
46
;------------
44
;------------
47
CYCLES:
45
CYCLES:
48
;    CPU speed
46
;    CPU speed
49
    mov eax, 18
47
    mov eax, 18
50
    mov ebx,5
48
    mov ebx,5
51
    mcall
49
    mcall
52
    mov [total1],eax  ;in Hz,  example 1600490000
50
    mov [total1],eax  ;in Hz,  example 1600490000
53
    xor  edx,edx
51
    xor  edx,edx
54
    mov  ebx,1000000
52
    mov  ebx,1000000
55
    div  ebx
53
    div  ebx
56
    mov [total], eax  ; in Mhz,  example 1600
54
    mov [total], eax  ; in Mhz,  example 1600
57
    xor edx, edx
55
    xor edx, edx
58
    mov eax, [total1]
56
    mov eax, [total1]
59
    mov ebx, 10000
57
    mov ebx, 10000
60
    div ebx
58
    div ebx
61
    mov [ost], eax    ; example 160049
59
    mov [ost], eax    ; example 160049
62
    mov ecx, [total]
60
    mov ecx, [total]
63
    imul ecx, 100
61
    imul ecx, 100
64
    neg  ecx
62
    neg  ecx
65
    add  ecx, eax
63
    add  ecx, eax
66
    mov [sot], ecx    ; example 49
64
    mov [sot], ecx    ; example 49
67
;------------
65
;------------
68
cpu:		      ;is CPUID supported?
66
cpu:		      ;is CPUID supported?
69
  pushfd	      ;push original EFLAGS
67
  pushfd	      ;push original EFLAGS
70
  pop eax	      ;get original EFLAGS
68
  pop eax	      ;get original EFLAGS
71
  mov ebx, eax	      ;save original EFLAGS
69
  mov ebx, eax	      ;save original EFLAGS
72
  xor eax, 00200000h  ;flip 21th bit in EFLAGS
70
  xor eax, 00200000h  ;flip 21th bit in EFLAGS
73
  push eax	      ;save new EFLAGS value on stack
71
  push eax	      ;save new EFLAGS value on stack
74
  popfd 	      ;replace current EFLAGS value
72
  popfd 	      ;replace current EFLAGS value
75
  pushfd	      ;get new EFLAGS
73
  pushfd	      ;get new EFLAGS
76
  pop eax	      ;store new EFLAGS in EAX
74
  pop eax	      ;store new EFLAGS in EAX
77
  cmp eax, ebx	      ;compare values of 21th bit
75
  cmp eax, ebx	      ;compare values of 21th bit
78
  jz NO_CPUID	      ;CPUID isn't supported
76
  jz NO_CPUID	      ;CPUID isn't supported
79
;------------
77
;------------
80
CPUNAME:	      ; VENDOR
78
CPUNAME:	      ; VENDOR
81
    mov   eax,0       ; eax=0
79
    mov   eax,0       ; eax=0
82
    cpuid
80
    cpuid
83
 
81
 
84
    mov [stdc], eax   ; number of calls
82
    mov [stdc], eax   ; number of calls
85
    mov   [cpuname+ 12],ebx
83
    mov   [cpuname+ 12],ebx
86
    mov   [cpuname+ 16],edx
84
    mov   [cpuname+ 16],edx
87
    mov   [cpuname+ 20],ecx
85
    mov   [cpuname+ 20],ecx
88
    mov   [smallvendor],ecx
86
    mov   [smallvendor],ecx
89
 
87
 
90
; for various vendors we should later use different methods
88
; for various vendors we should later use different methods
91
 
89
 
92
;Decoding cache L1 and L2 for Intel
90
;Decoding cache L1 and L2 for Intel
93
 
91
 
94
  cmp ecx, 'ntel'
92
  cmp ecx, 'ntel'
95
  jne cpu1     ;is not Intel
93
  jne cpu1     ;is not Intel
96
 
94
 
97
;Starting L1, L2, L3 caches detection (Intel made it VERY HARD)
95
;Starting L1, L2, L3 caches detection (Intel made it VERY HARD)
98
 
96
 
99
mov eax, 2
97
mov eax, 2
100
cpuid
98
cpuid
101
 
99
 
102
mov [che], al	     ; number of calls
100
mov [che], al	     ; number of calls
103
multik:
101
multik:
104
 
102
 
105
.eaxl:
103
.eaxl:
106
test  eax, eax       ;    Test bit 31
104
test  eax, eax       ;    Test bit 31
107
js    .ebxl	     ;    <> 0 =>invalid values
105
js    .ebxl	     ;    <> 0 =>invalid values
108
call decodecache24
106
call decodecache24
109
.ebxl:
107
.ebxl:
110
test  ebx, ebx
108
test  ebx, ebx
111
js    .ecxl
109
js    .ecxl
112
mov eax, ebx
110
mov eax, ebx
113
call decodecache32
111
call decodecache32
114
.ecxl:
112
.ecxl:
115
test  ecx, ecx
113
test  ecx, ecx
116
js    .edxl
114
js    .edxl
117
mov eax, ecx
115
mov eax, ecx
118
call decodecache32
116
call decodecache32
119
.edxl:
117
.edxl:
120
test  edx, edx
118
test  edx, edx
121
js    cpu1
119
js    cpu1
122
mov eax, edx
120
mov eax, edx
123
call decodecache32
121
call decodecache32
124
 
122
 
125
dec [che]    ; we made all calls
123
dec [che]    ; we made all calls
126
je cpu1
124
je cpu1
127
 
125
 
128
multi: ; not yet
126
multi: ; not yet
129
 
127
 
130
mov eax, 2  ; so we made call again
128
mov eax, 2  ; so we made call again
131
cpuid
129
cpuid
132
 
130
 
133
jmp multik
131
jmp multik
134
 
132
 
135
;  FAMILY MODEL STEPPING
133
;  FAMILY MODEL STEPPING
136
cpu1:
134
cpu1:
137
    xor eax, eax
135
    xor eax, eax
138
    inc eax	  ; eax=1
136
    inc eax	  ; eax=1
139
    cpuid
137
    cpuid
140
 
138
 
141
mov ecx, eax
139
mov ecx, eax
142
shr ecx,8	  ;   shift it to the correct position
140
shr ecx,8	  ;   shift it to the correct position
143
and ecx,0000000Fh ;   get CPU family
141
and ecx,0000000Fh ;   get CPU family
144
mov dword[f],ecx
142
mov dword[f],ecx
145
 
143
 
146
mov ecx, eax
144
mov ecx, eax
147
shr ecx,4
145
shr ecx,4
148
and ecx,0000000Fh ;    get CPU model
146
and ecx,0000000Fh ;    get CPU model
149
mov dword[m],ecx
147
mov dword[m],ecx
150
 
148
 
151
mov ecx, eax
149
mov ecx, eax
152
and ecx,0000000Fh ;   get CPU stepping
150
and ecx,0000000Fh ;   get CPU stepping
153
mov dword[s],ecx
151
mov dword[s],ecx
154
 
152
 
155
;-
153
;-
156
mov ecx, eax	  ; get Type
154
mov ecx, eax	  ; get Type
157
shl ecx, 18
155
shl ecx, 18
158
shr ecx,30
156
shr ecx,30
159
;and ecx, 0000000Fh ; only two lower bits can be nonzero
157
;and ecx, 0000000Fh ; only two lower bits can be nonzero
160
mov dword[t], ecx
158
mov dword[t], ecx
161
;=======================================================
159
;=======================================================
162
 
160
 
163
cmp dword[smallvendor], 'cAMD'
161
cmp dword[smallvendor], 'cAMD'
164
jz maybe_athlon
162
jz maybe_athlon
165
cmp dword[smallvendor], 'ntel'
163
cmp dword[smallvendor], 'ntel'
166
jnz no_full   ; if not AMD or Intel
164
jnz no_full   ; if not AMD or Intel
167
 
165
 
168
detect_it:
166
detect_it:
169
cmp [f], 0Fh
167
cmp [f], 0Fh
170
jne no_full
168
jne no_full
171
 
169
 
172
full:
170
full:
173
 
171
 
174
mov ecx, eax	      ; get Extended model
172
mov ecx, eax	      ; get Extended model
175
shr ecx,16	      ;shift it to the correct position
173
shr ecx,16	      ;shift it to the correct position
176
and ecx, 0000000Fh
174
and ecx, 0000000Fh
177
shl ecx, 4
175
shl ecx, 4
178
add ecx, [m]
176
add ecx, [m]
179
mov dword[em],ecx     ;  effective    model
177
mov dword[em],ecx     ;  effective    model
180
 
178
 
181
mov ecx, eax	      ; get Extended family
179
mov ecx, eax	      ; get Extended family
182
shr ecx, 20	      ;shift it to the correct position
180
shr ecx, 20	      ;shift it to the correct position
183
and ecx, 000000FFh
181
and ecx, 000000FFh
184
add ecx, [f]
182
add ecx, [f]
185
mov dword[ef],ecx     ; effective family
183
mov dword[ef],ecx     ; effective family
186
 
184
 
187
 
185
 
188
jmp fut
186
jmp fut
189
 
187
 
190
no_full:
188
no_full:
191
 
189
 
192
mov ecx, [m]
190
mov ecx, [m]
193
mov [em], ecx
191
mov [em], ecx
194
 
192
 
195
mov ecx, [f]
193
mov ecx, [f]
196
mov [ef], ecx
194
mov [ef], ecx
197
 
195
 
198
jmp fut
196
jmp fut
199
 
197
 
200
maybe_athlon:
198
maybe_athlon:
201
mov eax, 0x80000001		  ; CPUID ext. function 0x80000001
199
mov eax, 0x80000001		  ; CPUID ext. function 0x80000001
202
cpuid				    
200
cpuid				    
203
mov ecx, eax
201
mov ecx, eax
204
shr ecx,8	  ;   shift it to the correct position
202
shr ecx,8	  ;   shift it to the correct position
205
and ecx,0000000Fh ;   get CPU family
203
and ecx,0000000Fh ;   get CPU family
206
mov dword[ef],ecx
204
mov dword[ef],ecx
207
 
205
 
208
mov ecx, eax
206
mov ecx, eax
209
shr ecx,4
207
shr ecx,4
210
and ecx,0000000Fh ;    get CPU model
208
and ecx,0000000Fh ;    get CPU model
211
mov dword[em],ecx
209
mov dword[em],ecx
212
 
210
 
213
fut:
211
fut:
214
 
212
 
215
call decode_sse3
213
call decode_sse3
216
;-
214
;-
217
    call decode_extended
215
    call decode_extended
218
 
216
 
219
mov  dword [myname], $612F6E
217
mov  dword [myname], $612F6E
220
 
218
 
221
        cmp     [extc], $80000003
219
        cmp     [extc], $80000003
222
        jbe     .noname
220
        jbe     .noname
223
 
221
 
224
    mov       eax,$80000002
222
    mov       eax,$80000002
225
    cpuid
223
    cpuid
226
    mov   [myname],eax
224
    mov   [myname],eax
227
    mov   [myname+4],ebx
225
    mov   [myname+4],ebx
228
    mov   [myname+8],ecx
226
    mov   [myname+8],ecx
229
    mov   [myname+12],edx
227
    mov   [myname+12],edx
230
    mov   eax,$80000003
228
    mov   eax,$80000003
231
    cpuid
229
    cpuid
232
    mov   [myname+16],eax
230
    mov   [myname+16],eax
233
    mov   [myname+20],ebx
231
    mov   [myname+20],ebx
234
    mov   [myname+24],ecx
232
    mov   [myname+24],ecx
235
    mov   [myname+28],edx
233
    mov   [myname+28],edx
236
    mov   eax,$80000004
234
    mov   eax,$80000004
237
    cpuid
235
    cpuid
238
    mov   [myname+32],eax
236
    mov   [myname+32],eax
239
    mov   [myname+36],ebx
237
    mov   [myname+36],ebx
240
    mov   [myname+40],ecx
238
    mov   [myname+40],ecx
241
    mov   [myname+44],edx
239
    mov   [myname+44],edx
242
 
240
 
243
.noname:
241
.noname:
244
red:			
242
red:			
245
 
243
 
246
;mov byte [multiplier], 115;     ; for testing
244
;mov byte [multiplier], 115;     ; for testing
247
 
245
 
248
call multipl			      ; get multiplier 
246
call multipl			      ; get multiplier 
249
mov byte [multiplier], cl
247
mov byte [multiplier], cl
250
 
248
 
251
mov   dword [freqbb], 0
249
mov   dword [freqbb], 0
252
mov   dword [freqll], 0 
250
mov   dword [freqll], 0 
253
 
251
 
254
mov   ebx, dword [multiplier]
252
mov   ebx, dword [multiplier]
255
test  ebx, ebx
253
test  ebx, ebx
256
jz output
254
jz output
257
 
255
 
258
calc:
256
calc:
259
 
257
 
260
mov eax,dword [ost]   ; example 166474
258
mov eax,dword [ost]   ; example 166474
261
imul eax, 10	      ; example 1664740
259
imul eax, 10	      ; example 1664740
262
xor edx,edx
260
xor edx,edx
263
div ebx               ; get system clock (if multiplier detected)
261
div ebx               ; get system clock (if multiplier detected)
264
 
262
 
265
xor edx, edx                    ; example eax=16647
263
xor edx, edx                    ; example eax=16647
266
mov ebx, 100
264
mov ebx, 100
267
div ebx
265
div ebx
268
mov dword [freqbb], eax         ; example 166
266
mov dword [freqbb], eax         ; example 166
269
mov dword [freqll], edx         ; example 47
267
mov dword [freqll], edx         ; example 47
270
 
268
 
271
xor edx, edx
269
xor edx, edx
272
    mov eax,dword[multiplier]  ; example 115
270
    mov eax,dword[multiplier]  ; example 115
273
    mov  ebx,10
271
    mov  ebx,10
274
    div  ebx
272
    div  ebx
275
    mov dword[multb], eax  ;   example 11
273
    mov dword[multb], eax  ;   example 11
276
    mov dword[multa], edx    ; example 5
274
    mov dword[multa], edx    ; example 5
277
 
275
 
278
output:
276
output:
279
 
277
 
280
   call draw_window    ;     Draw window
278
   call draw_window    ;     Draw window
281
 
279
 
282
typedetect:
280
typedetect:
283
        mov     edx, t1
281
        mov     edx, t1
284
        cmp     [t], 00b
282
        cmp     [t], 00b
285
        jz      @f
283
        jz      @f
286
        mov     edx, t2
284
        mov     edx, t2
287
        cmp     [t], 01b
285
        cmp     [t], 01b
288
        jz      @f
286
        jz      @f
289
        mov     edx, t3
287
        mov     edx, t3
290
        cmp     [t], 11b
288
        cmp     [t], 11b
291
        jz      @f
289
        jz      @f
292
        mov     edx, t4
290
        mov     edx, t4
293
@@:
291
@@:
294
        mov     ebx, 290*65536 + 250
292
        mov     ebx, 290*65536 + 250
295
        mov     ecx, 0x80000000
293
        mov     ecx, 0x80000000
296
        mcall   4
294
        mcall   4
297
 
295
 
298
PROCCORE:    ;   Who are you?
296
PROCCORE:    ;   Who are you?
299
; Intel - "GenuineIntel"           +
297
; Intel - "GenuineIntel"           +
300
; AMD - "AuthenticAMD"             +
298
; AMD - "AuthenticAMD"             +
301
; Cyrix - "CyrixInstead"           +
299
; Cyrix - "CyrixInstead"           +
302
; UMC - "UMC UMC UMC "
300
; UMC - "UMC UMC UMC "
303
; NexGen - "NexGenDriven"
301
; NexGen - "NexGenDriven"
304
; Centaur - "CentaurHauls"         +
302
; Centaur - "CentaurHauls"         +
305
; Rise Technology - "RiseRiseRise"
303
; Rise Technology - "RiseRiseRise"
306
; SiS - "SiS SiS SiS "
304
; SiS - "SiS SiS SiS "
307
; Transmeta - "GenuineTMx86"       +
305
; Transmeta - "GenuineTMx86"       +
308
; National Semiconductor - "Geode by NSC"
306
; National Semiconductor - "Geode by NSC"
309
 
307
 
310
  cmp dword[smallvendor], 'ntel'
308
  cmp dword[smallvendor], 'ntel'
311
  jz Intel
309
  jz Intel
312
  cmp dword[smallvendor], 'cAMD'
310
  cmp dword[smallvendor], 'cAMD'
313
  jz AMD
311
  jz AMD
314
  cmp dword[smallvendor], 'tead'
312
  cmp dword[smallvendor], 'tead'
315
  jz Cyrix
313
  jz Cyrix
316
  cmp dword[smallvendor], 'auls'
314
  cmp dword[smallvendor], 'auls'
317
  jz Centaur
315
  jz Centaur
318
  cmp dword[smallvendor], 'Mx86'
316
  cmp dword[smallvendor], 'Mx86'
319
  jz Transmeta
317
  jz Transmeta
320
 
318
 
321
; cmp ecx, 'UMC '
319
; cmp ecx, 'UMC '
322
; jz .UMC
320
; jz .UMC
323
; cmp ecx, 'iven'
321
; cmp ecx, 'iven'
324
; jz .NexGen
322
; jz .NexGen
325
; cmp ecx, 'Rise'
323
; cmp ecx, 'Rise'
326
;  jz .Rise
324
;  jz .Rise
327
; cmp ecx, 'SiS '
325
; cmp ecx, 'SiS '
328
; jz .SiS
326
; jz .SiS
329
; cmp ecx, ' NSC'
327
; cmp ecx, ' NSC'
330
; jz .NSC
328
; jz .NSC
331
; jmp Other   ;  I don't know what to do with you...
329
; jmp Other   ;  I don't know what to do with you...
332
Other:
330
Other:
333
Text 75,70,0x00000000,other, otherlen-other
331
Text 75,70,0x00000000,other, otherlen-other
334
    jmp MMXtest
332
    jmp MMXtest
335
;-------------------------
333
;-------------------------
336
 
334
 
337
AMD:
335
AMD:
338
 
336
 
339
Text 15, 190,0x00000000,cache, cachelen-cache
337
Text 15, 190,0x00000000,cache, cachelen-cache
340
 
338
 
341
Text 75,70,,AMDn, AMDnlen-AMDn
339
Text 75,70,,AMDn, AMDnlen-AMDn
342
 
340
 
343
	mov	esi, amd
341
	mov	esi, amd
344
	call	load_gif
342
	call	load_gif
345
PutImage 135,107,201,49,img_area+8
343
PutImage 135,107,201,49,img_area+8
346
;         place   size
344
;         place   size
347
 
345
 
348
; Relax, man. AMD made PRETTY SIMPLE cache detection routine
346
; Relax, man. AMD made PRETTY SIMPLE cache detection routine
349
;CACHE1:
347
;CACHE1:
350
mov eax, 80000005h
348
mov eax, 80000005h
351
    cpuid
349
    cpuid
352
 
350
 
353
movzx eax, cl
351
movzx eax, cl
354
mov [lineld], eax
352
mov [lineld], eax
355
 
353
 
356
mov eax, ecx
354
mov eax, ecx
357
;shl eax, 8
355
;shl eax, 8
358
;shr eax, 24
356
;shr eax, 24
359
 
357
 
360
and eax,00FF0000h
358
and eax,00FF0000h
361
shr eax, 16
359
shr eax, 16
362
mov [wayld], eax
360
mov [wayld], eax
363
 
361
 
364
shr ecx, 24
362
shr ecx, 24
365
mov [L1d], ecx
363
mov [L1d], ecx
366
 
364
 
367
 
365
 
368
movzx eax, dl
366
movzx eax, dl
369
mov [lineli], eax
367
mov [lineli], eax
370
 
368
 
371
mov eax, edx
369
mov eax, edx
372
;shl eax, 8
370
;shl eax, 8
373
;shr eax, 24
371
;shr eax, 24
374
 
372
 
375
and eax,00FF0000h
373
and eax,00FF0000h
376
shr eax, 16
374
shr eax, 16
377
mov [wayli], eax
375
mov [wayli], eax
378
 
376
 
379
 
377
 
380
shr edx, 24
378
shr edx, 24
381
mov [L1i], edx
379
mov [L1i], edx
382
 
380
 
383
 
381
 
384
;CACHE2:
382
;CACHE2:
385
mov eax, 80000006h
383
mov eax, 80000006h
386
    cpuid
384
    cpuid
387
 
385
 
388
movzx eax, cl
386
movzx eax, cl
389
mov dword[linel2], eax
387
mov dword[linel2], eax
390
 
388
 
391
push ecx
389
push ecx
392
shr ecx, 12+1
390
shr ecx, 12+1
393
and ecx, 0x7
391
and ecx, 0x7
394
mov eax, 1
392
mov eax, 1
395
shl eax, cl
393
shl eax, cl
396
mov dword [wayl2], eax
394
mov dword [wayl2], eax
397
pop ecx
395
pop ecx
398
 
396
 
399
shr ecx, 16
397
shr ecx, 16
400
mov [L2],ecx
398
mov [L2],ecx
401
 
399
 
402
    cmp [f], $5
400
    cmp [f], $5
403
    jz .fiv
401
    jz .fiv
404
    cmp [f], $6
402
    cmp [f], $6
405
    jz .si
403
    jz .si
406
    cmp [f], $F
404
    cmp [f], $F
407
    jz fif
405
    jz fif
408
.fiv:	 ;     Family=5
406
.fiv:	 ;     Family=5
409
        mov     [micron], 50
407
        mov     [micron], 50
410
        mov     edx, A50
408
        mov     edx, A50
411
        cmp     [m], $0
409
        cmp     [m], $0
412
        jz      @f
410
        jz      @f
413
        mov     [micron], 35
411
        mov     [micron], 35
414
        mov     edx, A51
412
        mov     edx, A51
415
        cmp     [m], $1
413
        cmp     [m], $1
416
        jz      @f
414
        jz      @f
417
        mov     edx, A52
415
        mov     edx, A52
418
        cmp     [m], $2
416
        cmp     [m], $2
419
        jz      @f
417
        jz      @f
420
        mov     edx, A53
418
        mov     edx, A53
421
        cmp     [m], $3
419
        cmp     [m], $3
422
        jz      @f
420
        jz      @f
423
        mov     [micron], 30
421
        mov     [micron], 30
424
        mov     edx, A56
422
        mov     edx, A56
425
        cmp     [m], $6
423
        cmp     [m], $6
426
        jz      @f
424
        jz      @f
427
        mov     [micron], 25
425
        mov     [micron], 25
428
        mov     edx, A57
426
        mov     edx, A57
429
        cmp     [m], $7
427
        cmp     [m], $7
430
        jz      @f
428
        jz      @f
431
        mov     edx, A58
429
        mov     edx, A58
432
        cmp     [m], $8
430
        cmp     [m], $8
433
        jz      @f
431
        jz      @f
434
        mov     edx, A59
432
        mov     edx, A59
435
        cmp     [m], $9
433
        cmp     [m], $9
436
        jz      @f
434
        jz      @f
437
        mov     [micron], 18
435
        mov     [micron], 18
438
        mov     edx, A5D
436
        mov     edx, A5D
439
@@:
437
@@:
440
        jmp     @f
438
        jmp     @f
441
 
439
 
442
.si:   ;    Family=6
440
.si:   ;    Family=6
443
        mov     [micron], 25
441
        mov     [micron], 25
444
        mov     edx, At1
442
        mov     edx, At1
445
        cmp     [m], $1
443
        cmp     [m], $1
446
        jz      @f
444
        jz      @f
447
        mov     [micron], 18
445
        mov     [micron], 18
448
        mov     edx, At2
446
        mov     edx, At2
449
        cmp     [m], $2
447
        cmp     [m], $2
450
        jz      @f
448
        jz      @f
451
        mov     edx, At3
449
        mov     edx, At3
452
        cmp     [m], $3
450
        cmp     [m], $3
453
        jz      @f
451
        jz      @f
454
        mov     edx, At4
452
        mov     edx, At4
455
        cmp     [m], $4
453
        cmp     [m], $4
456
        jz      @f
454
        jz      @f
457
        cmp     [m], $6
455
        cmp     [m], $6
458
        jz      A6
456
        jz      A6
459
        mov     [micron], 13
457
        mov     [micron], 13
460
        mov     edx, At7
458
        mov     edx, At7
461
        cmp     [m], $7
459
        cmp     [m], $7
462
        jz      @f
460
        jz      @f
463
        cmp     [m], $8
461
        cmp     [m], $8
464
        jz      A8
462
        jz      A8
465
        jmp     AA
463
        jmp     AA
466
@@:
464
@@:
467
        Text    100,70,0x80000000
465
        Text    100,70,0x80000000
468
        jmp     MMXtest
466
        jmp     MMXtest
469
A6:
467
A6:
470
        mov     [FRS], 266  ;!!!!!!
468
        mov     [FRS], 266  ;!!!!!!
471
 
469
 
472
        Number  315,90,0,3,dword [FRS],0x000000; MHz 
470
        Number  315,90,0,3,dword [FRS],0x000000; MHz 
473
 
471
 
474
        call    newrating; !!!!
472
        call    newrating; !!!!
475
 
473
 
476
        Text    245,70,0x00000000,pr, prlen-pr
474
        Text    245,70,0x00000000,pr, prlen-pr
477
 
475
 
478
        Number  310,70,0,4,dword [rating],0x000000
476
        Number  310,70,0,4,dword [rating],0x000000
479
        mov     edx, At6
477
        mov     edx, At6
480
        jmp     @b
478
        jmp     @b
481
 
479
 
482
A8:
480
A8:
483
 
481
 
484
        mov     [FRS], 266	;!!!!!!
482
        mov     [FRS], 266	;!!!!!!
485
 
483
 
486
        Number  315,90,0,3,dword [FRS],0x000000; MHz
484
        Number  315,90,0,3,dword [FRS],0x000000; MHz
487
 
485
 
488
        cmp     [L2], 256
486
        cmp     [L2], 256
489
        jl      .App  ; Applebred
487
        jl      .App  ; Applebred
490
 
488
 
491
        call    newrating;!!!!
489
        call    newrating;!!!!
492
 
490
 
493
        Text    245,70,0x00000000,pr, prlen-pr
491
        Text    245,70,0x00000000,pr, prlen-pr
494
        Number  310,70,0,4,dword [rating],0x000000
492
        Number  310,70,0,4,dword [rating],0x000000
495
        mov     edx, At8
493
        mov     edx, At8
496
        jmp     @b
494
        jmp     @b
497
 
495
 
498
.App:
496
.App:
499
        mov     edx, At8a
497
        mov     edx, At8a
500
        jmp     @b
498
        jmp     @b
501
 
499
 
502
AA:
500
AA:
503
 
501
 
504
        mov     [FRS], 333; !!!!
502
        mov     [FRS], 333; !!!!
505
        Text    245,70,0x00000000,pr, prlen-pr
503
        Text    245,70,0x00000000,pr, prlen-pr
506
 
504
 
507
        Number  315,90,0,3,dword [FRS],0x000000; MHz 
505
        Number  315,90,0,3,dword [FRS],0x000000; MHz 
508
 
506
 
509
        mov     edx, Atat
507
        mov     edx, Atat
510
        cmp     [L2], 256
508
        cmp     [L2], 256
511
        jl      .Tho ; Thorton
509
        jl      .Tho ; Thorton
512
        mov     edx, Ata
510
        mov     edx, Ata
513
.Tho:
511
.Tho:
514
        push    edx
512
        push    edx
515
 
513
 
516
        call    newrating;!!!!!
514
        call    newrating;!!!!!
517
 
515
 
518
        Number  310,70,0,4,dword [rating],0x000000
516
        Number  310,70,0,4,dword [rating],0x000000
519
        pop     edx
517
        pop     edx
520
        jmp     @b
518
        jmp     @b
521
 
519
 
522
fif:  ;  AMD-64    Family=15
520
fif:  ;  AMD-64    Family=15
523
 
521
 
524
;here is a need to rewrite detection of AMD F-th family according to "Revision Guide for
522
;here is a need to rewrite detection of AMD F-th family according to "Revision Guide for
525
;AMD AthlonTM 64 and  AMD OpteronTM  Processors" 25759.pdf
523
;AMD AthlonTM 64 and  AMD OpteronTM  Processors" 25759.pdf
526
 
524
 
527
; checking sse3 for new AMD's is needed
525
; checking sse3 for new AMD's is needed
528
    cmp [m],$1	; Dual-core Opteron      
526
    cmp [m],$1	; Dual-core Opteron      
529
    jz .AF1
527
    jz .AF1
530
    cmp [m],$3	; Toledo 1024 0.09   // Manchester     ||Windsor Dual Core not supported
528
    cmp [m],$3	; Toledo 1024 0.09   // Manchester     ||Windsor Dual Core not supported
531
    jz .AF3
529
    jz .AF3
532
    cmp [m],$4	;Athlon 64 Mobile Athlon 64 FX  ClawHammer (1024) 0.13
530
    cmp [m],$4	;Athlon 64 Mobile Athlon 64 FX  ClawHammer (1024) 0.13
533
    jz .AF4
531
    jz .AF4
534
    cmp [m],$5	; Opteron     Athlon 64 FX 0.13 (1024)
532
    cmp [m],$5	; Opteron     Athlon 64 FX 0.13 (1024)
535
    jz .AF5
533
    jz .AF5
536
    cmp [m],$7	;Athlon 64 Athlon 64 FX  Clawhammer(1024) 0.13   Sledgehammer(1024)  0.13  // SSE3+ SanDiego(1024)
534
    cmp [m],$7	;Athlon 64 Athlon 64 FX  Clawhammer(1024) 0.13   Sledgehammer(1024)  0.13  // SSE3+ SanDiego(1024)
537
    jz .AF7
535
    jz .AF7
538
   cmp [m],$8 ; Athlon 64 Mobile Athlon 64 FX ClawHammer (1024) 0.13
536
   cmp [m],$8 ; Athlon 64 Mobile Athlon 64 FX ClawHammer (1024) 0.13
539
    jz .AF8
537
    jz .AF8
540
   cmp [m],$B ; Athlon 64
538
   cmp [m],$B ; Athlon 64
541
    jz .AFB
539
    jz .AFB
542
   cmp [m],$C ;Athlon 64 Newcastle(512) 0.13  Sempron> Paris (256)   0.13  |SSE3+ Sempron >  Palermo FC0 0.09  // (Venice)
540
   cmp [m],$C ;Athlon 64 Newcastle(512) 0.13  Sempron> Paris (256)   0.13  |SSE3+ Sempron >  Palermo FC0 0.09  // (Venice)
543
    jz .AFC
541
    jz .AFC
544
   cmp [m],$E  ; Athlon 64    //
542
   cmp [m],$E  ; Athlon 64    //
545
    jz .AFE
543
    jz .AFE
546
   cmp [m],$F ; Athlon 64 Winchester(512) |SSE3+ SanDiego(1024)  Venice (512)  Palermo (256) 0.09
544
   cmp [m],$F ; Athlon 64 Winchester(512) |SSE3+ SanDiego(1024)  Venice (512)  Palermo (256) 0.09
547
    jz .AFF
545
    jz .AFF
548
    jmp next_generation
546
    jmp next_generation
549
.AF1:
547
.AF1:
550
    mov [micron], 09  ;?
548
    mov [micron], 09  ;?
551
    Text 100,70,0x00000000,AF1, AF1len-AF1
549
    Text 100,70,0x00000000,AF1, AF1len-AF1
552
    jmp MMXtest
550
    jmp MMXtest
553
.AF3:
551
.AF3:
554
    mov [micron], 09
552
    mov [micron], 09
555
    Text 100,70,0x00000000,AF3, AF3len-AF3
553
    Text 100,70,0x00000000,AF3, AF3len-AF3
556
    jmp MMXtest
554
    jmp MMXtest
557
.AF4:
555
.AF4:
558
    mov [micron], 13
556
    mov [micron], 13
559
    Text 100,70,0x00000000,AF4, AF4len-AF4
557
    Text 100,70,0x00000000,AF4, AF4len-AF4
560
    jmp MMXtest
558
    jmp MMXtest
561
.AF5:
559
.AF5:
562
    mov [micron], 13
560
    mov [micron], 13
563
    Text 100,70,0x00000000,AF5, AF5len-AF5
561
    Text 100,70,0x00000000,AF5, AF5len-AF5
564
    jmp MMXtest
562
    jmp MMXtest
565
.AF7:
563
.AF7:
566
    mov [micron], 13
564
    mov [micron], 13
567
    Text 100,70,0x00000000,AF5, AF5len-AF5
565
    Text 100,70,0x00000000,AF5, AF5len-AF5
568
    jmp MMXtest
566
    jmp MMXtest
569
.AF8:
567
.AF8:
570
   mov [micron], 13
568
   mov [micron], 13
571
   Text 100,70,0x00000000,AF4, AF4len-AF4  ; AF4, AF5len-AF4
569
   Text 100,70,0x00000000,AF4, AF4len-AF4  ; AF4, AF5len-AF4
572
   jmp MMXtest
570
   jmp MMXtest
573
.AFB:
571
.AFB:
574
    mov [micron], 13
572
    mov [micron], 13
575
Text 100,70,0x00000000,AF4, AF4len-AF4
573
Text 100,70,0x00000000,AF4, AF4len-AF4
576
 jmp MMXtest
574
 jmp MMXtest
577
 
575
 
578
.AFC:
576
.AFC:
579
cmp [L2], 512
577
cmp [L2], 512
580
je .AFCn
578
je .AFCn
581
 
579
 
582
cmp [sse3sup], 1
580
cmp [sse3sup], 1
583
je .AFCnpal
581
je .AFCnpal
584
 
582
 
585
.AFCnpar:  ; paris
583
.AFCnpar:  ; paris
586
    mov [micron], 13
584
    mov [micron], 13
587
    Text 100,70,0x00000000,AFCs, AFCslen-AFCs
585
    Text 100,70,0x00000000,AFCs, AFCslen-AFCs
588
    jmp MMXtest
586
    jmp MMXtest
589
 
587
 
590
.AFCnpal: ; palermo
588
.AFCnpal: ; palermo
591
    mov [micron], 9
589
    mov [micron], 9
592
    Text 100,70,0x00000000,AFCsp, AFCsplen-AFCsp
590
    Text 100,70,0x00000000,AFCsp, AFCsplen-AFCsp
593
    jmp MMXtest
591
    jmp MMXtest
594
 
592
 
595
.AFCn: ;newcastle
593
.AFCn: ;newcastle
596
    mov [micron], 13
594
    mov [micron], 13
597
    Text 100,70,0x00000000,AFC, AFClen-AFC
595
    Text 100,70,0x00000000,AFC, AFClen-AFC
598
    jmp MMXtest
596
    jmp MMXtest
599
 
597
 
600
.AFE:	; error in cpu
598
.AFE:	; error in cpu
601
 jmp .AFC
599
 jmp .AFC
602
 
600
 
603
.AFF:
601
.AFF:
604
 
602
 
605
cmp [sse3sup], 1
603
cmp [sse3sup], 1
606
je .AFFsse
604
je .AFFsse
607
 
605
 
608
.win:
606
.win:
609
mov [micron], 9    ; winchester
607
mov [micron], 9    ; winchester
610
jmp MMXtest
608
jmp MMXtest
611
 
609
 
612
.AFFsse:
610
.AFFsse:
613
mov [micron], 9
611
mov [micron], 9
614
cmp [L2], 1024
612
cmp [L2], 1024
615
jz .AFs
613
jz .AFs
616
cmp [L2], 512
614
cmp [L2], 512
617
jz .AFd
615
jz .AFd
618
cmp [L2], 256
616
cmp [L2], 256
619
jz .AFp
617
jz .AFp
620
 
618
 
621
.AFs:
619
.AFs:
622
Text 100,70,0x00000000,AFS, AFSlen-AFS
620
Text 100,70,0x00000000,AFS, AFSlen-AFS
623
 jmp MMXtest
621
 jmp MMXtest
624
 
622
 
625
.AFd:
623
.AFd:
626
Text 100,70,0x00000000,AFV, AFVlen-AFV
624
Text 100,70,0x00000000,AFV, AFVlen-AFV
627
 jmp MMXtest
625
 jmp MMXtest
628
 
626
 
629
.AFp:
627
.AFp:
630
Text 100,70,0x00000000,AFCsp, AFCsplen-AFCsp
628
Text 100,70,0x00000000,AFCsp, AFCsplen-AFCsp
631
 jmp MMXtest
629
 jmp MMXtest
632
;-----------------------------------------------
630
;-----------------------------------------------
633
Intel:
631
Intel:
634
Text 75,70,0x00000000,Inteln, Intelnlen-Inteln
632
Text 75,70,0x00000000,Inteln, Intelnlen-Inteln
635
 
633
 
636
	mov	esi, intel
634
	mov	esi, intel
637
	call	load_gif
635
	call	load_gif
638
PutImage 135,107,201,49,img_area+8
636
PutImage 135,107,201,49,img_area+8
639
;PutImage 125,107,201,49,img_area+8
637
;PutImage 125,107,201,49,img_area+8
640
;         place   size
638
;         place   size
641
 
639
 
642
det:
640
det:
643
    cmp [f], $5
641
    cmp [f], $5
644
    jz .five
642
    jz .five
645
    cmp [f], $6
643
    cmp [f], $6
646
    jz .six
644
    jz .six
647
    cmp [f], $7
645
    cmp [f], $7
648
    jz .sev
646
    jz .sev
649
    cmp [f], $F
647
    cmp [f], $F
650
    jz .fift
648
    jz .fift
651
.five:	      ;Family=5
649
.five:	      ;Family=5
652
 
650
 
653
Text 15, 190,0x00000000,cache, cachelen-cache
651
Text 15, 190,0x00000000,cache, cachelen-cache
654
 
652
 
655
    cmp [m],$0
653
    cmp [m],$0
656
    jz .I0
654
    jz .I0
657
    cmp [m],$1
655
    cmp [m],$1
658
    jz .I1
656
    jz .I1
659
    cmp [m],$2
657
    cmp [m],$2
660
    jz .I2
658
    jz .I2
661
    cmp [m],$3
659
    cmp [m],$3
662
    jz .I3
660
    jz .I3
663
    cmp [m],$4
661
    cmp [m],$4
664
    jz .I4
662
    jz .I4
665
    cmp [m],$7
663
    cmp [m],$7
666
    jz .I7
664
    jz .I7
667
    cmp [m],$8
665
    cmp [m],$8
668
    jz .I8
666
    jz .I8
669
.I0:
667
.I0:
670
Text 110,70,0x00000000,P50, P50len-P50
668
Text 110,70,0x00000000,P50, P50len-P50
671
   mov [L1d], 8
669
   mov [L1d], 8
672
   mov [L1i], 8
670
   mov [L1i], 8
673
   mov [L2], 256
671
   mov [L2], 256
674
   mov [micron], 80
672
   mov [micron], 80
675
 jmp MMXtest
673
 jmp MMXtest
676
.I1:
674
.I1:
677
Text 110,70,0x00000000,P5, P5len-P5
675
Text 110,70,0x00000000,P5, P5len-P5
678
   mov [L1d], 8
676
   mov [L1d], 8
679
   mov [L1i], 8
677
   mov [L1i], 8
680
   mov [L2], 256
678
   mov [L2], 256
681
   mov [micron], 50
679
   mov [micron], 50
682
 jmp MMXtest
680
 jmp MMXtest
683
.I2:
681
.I2:
684
Text 110,70,0x00000000,P54C, P54Clen-P54C
682
Text 110,70,0x00000000,P54C, P54Clen-P54C
685
   mov [L1d], 8
683
   mov [L1d], 8
686
   mov [L1i], 8
684
   mov [L1i], 8
687
   mov [L2], 256
685
   mov [L2], 256
688
   mov [micron], 50
686
   mov [micron], 50
689
 jmp MMXtest
687
 jmp MMXtest
690
.I3:
688
.I3:
691
Text 110,70,0x00000000,P54T, P54Tlen-P54T
689
Text 110,70,0x00000000,P54T, P54Tlen-P54T
692
   mov [L1d], 8
690
   mov [L1d], 8
693
   mov [L1i], 8
691
   mov [L1i], 8
694
   mov [L2], 256
692
   mov [L2], 256
695
   mov [micron], 50
693
   mov [micron], 50
696
 jmp MMXtest
694
 jmp MMXtest
697
.I4:
695
.I4:
698
Text 110,70,0x00000000,P55C, P55Clen-P55C
696
Text 110,70,0x00000000,P55C, P55Clen-P55C
699
   mov [L1d], 8
697
   mov [L1d], 8
700
   mov [L1i], 8
698
   mov [L1i], 8
701
   mov [L2], 256
699
   mov [L2], 256
702
   mov [micron], 35
700
   mov [micron], 35
703
 jmp MMXtest
701
 jmp MMXtest
704
.I7:
702
.I7:
705
Text 110,70,0x00000000,P54C, P54Clen-P54C
703
Text 110,70,0x00000000,P54C, P54Clen-P54C
706
   mov [L1d], 8
704
   mov [L1d], 8
707
   mov [L1i], 8
705
   mov [L1i], 8
708
   mov [L2], 256
706
   mov [L2], 256
709
   mov [micron], 35
707
   mov [micron], 35
710
 jmp MMXtest
708
 jmp MMXtest
711
.I8:
709
.I8:
712
Text 110,70,0x00000000,P55C, P55Clen-P55C
710
Text 110,70,0x00000000,P55C, P55Clen-P55C
713
   mov [L1d], 16
711
   mov [L1d], 16
714
   mov [L1i], 16
712
   mov [L1i], 16
715
   mov [L2], 256
713
   mov [L2], 256
716
   mov [micron], 35
714
   mov [micron], 35
717
 jmp MMXtest
715
 jmp MMXtest
718
.six:		   ;Family=6
716
.six:		   ;Family=6
719
 
717
 
720
Text 15, 190,0x00000000,cache, cachelen-cache
718
Text 15, 190,0x00000000,cache, cachelen-cache
721
 
719
 
722
    cmp [m],$0
720
    cmp [m],$0
723
    jz .I60
721
    jz .I60
724
    cmp [m],$1
722
    cmp [m],$1
725
    jz .I61
723
    jz .I61
726
    cmp [m],$3
724
    cmp [m],$3
727
    jz .I63
725
    jz .I63
728
    cmp [m],$5
726
    cmp [m],$5
729
    jz .I65
727
    jz .I65
730
    cmp [m],$6
728
    cmp [m],$6
731
    jz .I66
729
    jz .I66
732
    cmp [m],$7
730
    cmp [m],$7
733
    jz .I67
731
    jz .I67
734
    cmp [m],$8
732
    cmp [m],$8
735
    jz .I68
733
    jz .I68
736
    cmp [m],$9
734
    cmp [m],$9
737
    jz .I69
735
    jz .I69
738
    cmp [m],$A
736
    cmp [m],$A
739
    jz .I6A
737
    jz .I6A
740
    cmp [m],$B
738
    cmp [m],$B
741
    jz .I6B
739
    jz .I6B
742
   cmp [m],$D
740
   cmp [m],$D
743
    jz .I6D
741
    jz .I6D
744
    cmp [m],$E
742
    cmp [m],$E
745
    jz .I6E
743
    jz .I6E
746
   cmp [m],$F
744
   cmp [m],$F
747
    jz .I6F
745
    jz .I6F
748
.I60:
746
.I60:
749
    mov [micron], 50
747
    mov [micron], 50
750
Text 110,70,0x00000000,P60, P60len-P60
748
Text 110,70,0x00000000,P60, P60len-P60
751
 jmp MMXtest
749
 jmp MMXtest
752
.I61:
750
.I61:
753
    mov [micron], 35
751
    mov [micron], 35
754
Text 110,70,0x00000000,P61, P61len-P61
752
Text 110,70,0x00000000,P61, P61len-P61
755
 jmp MMXtest
753
 jmp MMXtest
756
.I63:
754
.I63:
757
    mov [micron], 28
755
    mov [micron], 28
758
Text 110,70,0x00000000,P63, P63len-P63
756
Text 110,70,0x00000000,P63, P63len-P63
759
 jmp MMXtest
757
 jmp MMXtest
760
.I65:
758
.I65:
761
    mov [micron], 25
759
    mov [micron], 25
762
    cmp [L2], 0
760
    cmp [L2], 0
763
    jne .pp65  ; Pentium
761
    jne .pp65  ; Pentium
764
Text 110,70,0x00000000,P65c, P65clen-P65c
762
Text 110,70,0x00000000,P65c, P65clen-P65c
765
    jmp MMXtest
763
    jmp MMXtest
766
.pp65:
764
.pp65:
767
Text 110,70,0x00000000,P65, P65len-P65
765
Text 110,70,0x00000000,P65, P65len-P65
768
    jmp MMXtest
766
    jmp MMXtest
769
.I66:
767
.I66:
770
    mov [micron], 25
768
    mov [micron], 25
771
Text 110,70,0x00000000,P66, P66len-P66
769
Text 110,70,0x00000000,P66, P66len-P66
772
    jmp MMXtest
770
    jmp MMXtest
773
.I67:
771
.I67:
774
    mov [micron], 25
772
    mov [micron], 25
775
Text 110,70,0x00000000,P67, P67len-P67
773
Text 110,70,0x00000000,P67, P67len-P67
776
    jmp MMXtest
774
    jmp MMXtest
777
.I68:
775
.I68:
778
    mov [micron], 18
776
    mov [micron], 18
779
    cmp [L2], 128
777
    cmp [L2], 128
780
    jne .pp68  ; Pentium
778
    jne .pp68  ; Pentium
781
Text 110,70,0x00000000,P68c, P68clen-P68c
779
Text 110,70,0x00000000,P68c, P68clen-P68c
782
    jmp MMXtest
780
    jmp MMXtest
783
 .pp68:
781
 .pp68:
784
Text 110,70,0x00000000,P68, P68len-P68
782
Text 110,70,0x00000000,P68, P68len-P68
785
    jmp MMXtest
783
    jmp MMXtest
786
.I69:
784
.I69:
787
    mov [micron], 13
785
    mov [micron], 13
788
Text 110,70,0x00000000,P69 , P69len-P69
786
Text 110,70,0x00000000,P69 , P69len-P69
789
    jmp MMXtest
787
    jmp MMXtest
790
.I6A:
788
.I6A:
791
    mov [micron], 18
789
    mov [micron], 18
792
Text 110,70,0x00000000,P6A, P6Alen-P6A
790
Text 110,70,0x00000000,P6A, P6Alen-P6A
793
    jmp MMXtest
791
    jmp MMXtest
794
.I6B:
792
.I6B:
795
    mov [micron], 13
793
    mov [micron], 13
796
    cmp [L2], 256
794
    cmp [L2], 256
797
    jne .pp6B  ; Pentium
795
    jne .pp6B  ; Pentium
798
Text 110,70,0x00000000,P6Bc, P6Bclen-P6Bc
796
Text 110,70,0x00000000,P6Bc, P6Bclen-P6Bc
799
    jmp MMXtest
797
    jmp MMXtest
800
.pp6B:
798
.pp6B:
801
Text 110,70,0x00000000,P6B, P6Blen-P6B
799
Text 110,70,0x00000000,P6B, P6Blen-P6B
802
    jmp MMXtest
800
    jmp MMXtest
803
.I6D:
801
.I6D:
804
    mov [micron], 9
802
    mov [micron], 9
805
Text 110,70,0x00000000,P6D, P6Dlen-P6D
803
Text 110,70,0x00000000,P6D, P6Dlen-P6D
806
    jmp MMXtest
804
    jmp MMXtest
807
.I6E:
805
.I6E:
808
    mov [micron], 6
806
    mov [micron], 6
809
Text 110,70,0x00000000,P6E, P6Elen-P6E
807
Text 110,70,0x00000000,P6E, P6Elen-P6E
810
    jmp MMXtest
808
    jmp MMXtest
811
.I6F:
809
.I6F:
812
    mov [micron], 6
810
    mov [micron], 6
813
Text 110,70,0x00000000,P6F, P6Flen-P6F
811
Text 110,70,0x00000000,P6F, P6Flen-P6F
814
    jmp MMXtest
812
    jmp MMXtest
815
 
813
 
816
;06Ex - Pentium M Yonah 0.065
814
;06Ex - Pentium M Yonah 0.065
817
;06Fx - Pentium D Conroe 0.065, Xeon Woodcrest, Celeron D AllenDale, Core 2 Kentsfield
815
;06Fx - Pentium D Conroe 0.065, Xeon Woodcrest, Celeron D AllenDale, Core 2 Kentsfield
818
 
816
 
819
.sev:	 ;Family=7
817
.sev:	 ;Family=7
820
.IS0:
818
.IS0:
821
 
819
 
822
Text 15, 190,0x00000000,cache, cachelen-cache ;?
820
Text 15, 190,0x00000000,cache, cachelen-cache ;?
823
 
821
 
824
    mov [micron], 18
822
    mov [micron], 18
825
Text 110,70,0x00000000,PS0, PS0len-PS0
823
Text 110,70,0x00000000,PS0, PS0len-PS0
826
 jmp MMXtest
824
 jmp MMXtest
827
 
825
 
828
.fift:	  ;Family=15
826
.fift:	  ;Family=15
829
 
827
 
830
Text 15, 190,0x00000000,cacheP4, cacheP4len-cacheP4
828
Text 15, 190,0x00000000,cacheP4, cacheP4len-cacheP4
831
 
829
 
832
    cmp [m],$0
830
    cmp [m],$0
833
    jz .IF0
831
    jz .IF0
834
    cmp [m],$1
832
    cmp [m],$1
835
    jz .IF1
833
    jz .IF1
836
    cmp [m],$2
834
    cmp [m],$2
837
    jz .IF2
835
    jz .IF2
838
    cmp [m],$3
836
    cmp [m],$3
839
    jz .IF3
837
    jz .IF3
840
    cmp [m],$4
838
    cmp [m],$4
841
    jz .IF3 ;identical to F3xh
839
    jz .IF3 ;identical to F3xh
842
    cmp [m],$5
840
    cmp [m],$5
843
    jz .IF5
841
    jz .IF5
844
    cmp [m],$6
842
    cmp [m],$6
845
    jz .IF6
843
    jz .IF6
846
    jmp next_generation
844
    jmp next_generation
847
.IF0:
845
.IF0:
848
    mov [micron], 18
846
    mov [micron], 18
849
    cmp [L2], 128
847
    cmp [L2], 128
850
    jne .ppF0  ; Pentium
848
    jne .ppF0  ; Pentium
851
Text 110,70,0x00000000,PF0c, PF0clen-PF0c
849
Text 110,70,0x00000000,PF0c, PF0clen-PF0c
852
    jmp MMXtest
850
    jmp MMXtest
853
.ppF0:
851
.ppF0:
854
Text 110,70,0x00000000,PF0, PF0len-PF0
852
Text 110,70,0x00000000,PF0, PF0len-PF0
855
    jmp MMXtest
853
    jmp MMXtest
856
.IF1:
854
.IF1:
857
    mov [micron], 18
855
    mov [micron], 18
858
    cmp [L2], 128
856
    cmp [L2], 128
859
    je .IF0;jne.ppF1  ; Pentium
857
    je .IF0;jne.ppF1  ; Pentium
860
  ;  mov   eax,dword 0x00000004
858
  ;  mov   eax,dword 0x00000004
861
  ;  mov   ebx,115*65536+80
859
  ;  mov   ebx,115*65536+80
862
  ;  mov   ecx,dword 0x00000000
860
  ;  mov   ecx,dword 0x00000000
863
  ;  mov   edx,PF0c
861
  ;  mov   edx,PF0c
864
  ;  mov   esi,PF0clen-PF0c
862
  ;  mov   esi,PF0clen-PF0c
865
  ;  mcall
863
  ;  mcall
866
  ;jmp MMXtest
864
  ;jmp MMXtest
867
;.ppF1:
865
;.ppF1:
868
Text 110,70,0x00000000,PF0, PF0len-PF0
866
Text 110,70,0x00000000,PF0, PF0len-PF0
869
 jmp MMXtest
867
 jmp MMXtest
870
.IF2:
868
.IF2:
871
    mov [micron], 13
869
    mov [micron], 13
872
    cmp [L2], 128
870
    cmp [L2], 128
873
    jne .ppF2  ; Pentium
871
    jne .ppF2  ; Pentium
874
Text 110,70,0x00000000,PF2c, PF2clen-PF2c
872
Text 110,70,0x00000000,PF2c, PF2clen-PF2c
875
 jmp MMXtest
873
 jmp MMXtest
876
.ppF2:
874
.ppF2:
877
Text 110,70,0x00000000,PF2, PF2len-PF2
875
Text 110,70,0x00000000,PF2, PF2len-PF2
878
 jmp MMXtest
876
 jmp MMXtest
879
.IF3:
877
.IF3:
880
    mov [micron], 09
878
    mov [micron], 09
881
    cmp [L2], 256
879
    cmp [L2], 256
882
    jne .ppF3  ; Pentium
880
    jne .ppF3  ; Pentium
883
Text 110,70,0x00000000,PF3c, PF3clen-PF3c
881
Text 110,70,0x00000000,PF3c, PF3clen-PF3c
884
 jmp MMXtest
882
 jmp MMXtest
885
.ppF3:
883
.ppF3:
886
Text 110,70,0x00000000,PF3, PF3len-PF3
884
Text 110,70,0x00000000,PF3, PF3len-PF3
887
 jmp MMXtest
885
 jmp MMXtest
888
 
886
 
889
.IF5:
887
.IF5:
890
    mov [micron], 09
888
    mov [micron], 09
891
    cmp [L2], 512
889
    cmp [L2], 512
892
    jae .ppF5  ; Pentium
890
    jae .ppF5  ; Pentium
893
Text 110,70,0x00000000,PF5c, PF5clen-PF5c
891
Text 110,70,0x00000000,PF5c, PF5clen-PF5c
894
 jmp MMXtest
892
 jmp MMXtest
895
.ppF5:
893
.ppF5:
896
Text 110,70,0x00000000,PF5, PF5len-PF5
894
Text 110,70,0x00000000,PF5, PF5len-PF5
897
 jmp MMXtest
895
 jmp MMXtest
898
 
896
 
899
 .IF6:
897
 .IF6:
900
    mov [micron], 06  ; 065
898
    mov [micron], 06  ; 065
901
    cmp [L2], 512
899
    cmp [L2], 512
902
    ja .ppF6  ; Pentium
900
    ja .ppF6  ; Pentium
903
Text 110,70,0x00000000,PF6c, PF6clen-PF6c
901
Text 110,70,0x00000000,PF6c, PF6clen-PF6c
904
 jmp MMXtest
902
 jmp MMXtest
905
.ppF6:
903
.ppF6:
906
Text 110,70,0x00000000,PF6, PF6len-PF6
904
Text 110,70,0x00000000,PF6, PF6len-PF6
907
 jmp MMXtest
905
 jmp MMXtest
908
 
906
 
909
 
907
 
910
 next_generation:
908
 next_generation:
911
Text 110,70,0x00000000,NG, NGlen-NG
909
Text 110,70,0x00000000,NG, NGlen-NG
912
  jmp MMXtest
910
  jmp MMXtest
913
;----------------------------------
911
;----------------------------------
914
Cyrix:
912
Cyrix:
915
 
913
 
916
Text 15, 190,0x00000000,cache, cachelen-cache
914
Text 15, 190,0x00000000,cache, cachelen-cache
917
 
915
 
918
	mov	esi, cyrix
916
	mov	esi, cyrix
919
	call	load_gif
917
	call	load_gif
920
PutImage 135,107,201,49,img_area+8
918
PutImage 135,107,201,49,img_area+8
921
;PutImage 130,127,201,49,img_area+8
919
;PutImage 130,127,201,49,img_area+8
922
;         place   size
920
;         place   size
923
 
921
 
924
    cmp [f], $5
922
    cmp [f], $5
925
    jz .fivv
923
    jz .fivv
926
    cmp [f], $6
924
    cmp [f], $6
927
    jz .sixx
925
    jz .sixx
928
.fivv:	  ;Family=5
926
.fivv:	  ;Family=5
929
    cmp [m],$2
927
    cmp [m],$2
930
    jz .C52
928
    jz .C52
931
    cmp [m],$4
929
    cmp [m],$4
932
    jz .C54
930
    jz .C54
933
.C52:
931
.C52:
934
    mov [micron], 50 ;35?
932
    mov [micron], 50 ;35?
935
    mov [L1i], 8
933
    mov [L1i], 8
936
    mov [L1d], 8
934
    mov [L1d], 8
937
    mov [L2], 512
935
    mov [L2], 512
938
Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
936
Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
939
Text 110,70,0x00000000,C52, C52len-C52
937
Text 110,70,0x00000000,C52, C52len-C52
940
    jmp MMXtest
938
    jmp MMXtest
941
.C54:
939
.C54:
942
    mov [micron], 50
940
    mov [micron], 50
943
    mov [L1i], 8
941
    mov [L1i], 8
944
    mov [L1d], 8
942
    mov [L1d], 8
945
    mov [L2], 512
943
    mov [L2], 512
946
Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
944
Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
947
Text 110,70,0x00000000,C54, C54len-C54
945
Text 110,70,0x00000000,C54, C54len-C54
948
    jmp MMXtest
946
    jmp MMXtest
949
 
947
 
950
.sixx:	   ;Family=6
948
.sixx:	   ;Family=6
951
   cmp [m],$0
949
   cmp [m],$0
952
   jz .C60
950
   jz .C60
953
   cmp [m],$5
951
   cmp [m],$5
954
   jz .C65
952
   jz .C65
955
.C60:
953
.C60:
956
    mov [micron], 25
954
    mov [micron], 25
957
    mov [L1i], 32
955
    mov [L1i], 32
958
    mov [L1d], 32
956
    mov [L1d], 32
959
    mov [L2], 512
957
    mov [L2], 512
960
Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
958
Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
961
Text 110,70,0x00000000,C60, C60len-C60
959
Text 110,70,0x00000000,C60, C60len-C60
962
    jmp MMXtest
960
    jmp MMXtest
963
.C65:
961
.C65:
964
    mov [micron], 25 ;35?
962
    mov [micron], 25 ;35?
965
    mov [L1i], 32
963
    mov [L1i], 32
966
    mov [L1d], 32
964
    mov [L1d], 32
967
    mov [L2], 512
965
    mov [L2], 512
968
Text 75,70,0x00000000,Centaurn, Centaurnlen-Centaurn
966
Text 75,70,0x00000000,Centaurn, Centaurnlen-Centaurn
969
    mov edx,C65
967
    mov edx,C65
970
    mov esi,C65len-C65
968
    mov esi,C65len-C65
971
    jmp OutProcName
969
    jmp OutProcName
972
;---------------------
970
;---------------------
973
Centaur:
971
Centaur:
974
 
972
 
975
Text 15, 190,0x00000000,cache, cachelen-cache
973
Text 15, 190,0x00000000,cache, cachelen-cache
976
 
974
 
977
;CACHE1:
975
;CACHE1:
978
mov eax, 80000005h
976
mov eax, 80000005h
979
    cpuid
977
    cpuid
980
shr ecx, 24
978
shr ecx, 24
981
mov [L1d], ecx
979
mov [L1d], ecx
982
shr edx, 24
980
shr edx, 24
983
mov [L1i], edx
981
mov [L1i], edx
984
 
982
 
985
 
983
 
986
 
984
 
987
; cache detection routine
985
; cache detection routine
988
;CACHE1:
986
;CACHE1:
989
mov eax, 80000005h
987
mov eax, 80000005h
990
    cpuid
988
    cpuid
991
 
989
 
992
movzx eax, cl
990
movzx eax, cl
993
mov [lineld], eax
991
mov [lineld], eax
994
 
992
 
995
mov eax, ecx
993
mov eax, ecx
996
shr eax, 16
994
shr eax, 16
997
and eax,000000FFh
995
and eax,000000FFh
998
mov [wayld], eax
996
mov [wayld], eax
999
 
997
 
1000
shr ecx, 24
998
shr ecx, 24
1001
mov [L1d], ecx
999
mov [L1d], ecx
1002
 
1000
 
1003
movzx eax, dl
1001
movzx eax, dl
1004
mov [lineli], eax
1002
mov [lineli], eax
1005
 
1003
 
1006
mov eax, edx
1004
mov eax, edx
1007
 
1005
 
1008
shr eax, 16
1006
shr eax, 16
1009
and eax,000000FFh
1007
and eax,000000FFh
1010
mov [wayli], eax
1008
mov [wayli], eax
1011
 
1009
 
1012
shr edx, 24
1010
shr edx, 24
1013
mov [L1i], edx
1011
mov [L1i], edx
1014
 
1012
 
1015
 
1013
 
1016
;CACHE2:
1014
;CACHE2:
1017
mov eax, 80000006h
1015
mov eax, 80000006h
1018
    cpuid
1016
    cpuid
1019
 
1017
 
1020
cmp [f], $6
1018
cmp [f], $6
1021
    jz vn
1019
    jz vn
1022
    jmp vl2old	; if not then old identification
1020
    jmp vl2old	; if not then old identification
1023
vn:
1021
vn:
1024
    cmp [m],$9
1022
    cmp [m],$9
1025
    jl vl2old
1023
    jl vl2old
1026
; else  new
1024
; else  new
1027
movzx eax, cl
1025
movzx eax, cl
1028
mov dword[linel2], eax
1026
mov dword[linel2], eax
1029
 
1027
 
1030
mov eax, ecx
1028
mov eax, ecx
1031
shl eax, 16
1029
shl eax, 16
1032
shr eax, 28
1030
shr eax, 28
1033
 
1031
 
1034
mov dword[wayl2], eax
1032
mov dword[wayl2], eax
1035
 
1033
 
1036
shr ecx, 16  ; it is 16 bits now
1034
shr ecx, 16  ; it is 16 bits now
1037
mov [L2],ecx
1035
mov [L2],ecx
1038
 
1036
 
1039
 
1037
 
1040
 
1038
 
1041
vl2old:
1039
vl2old:
1042
movzx eax, cl
1040
movzx eax, cl
1043
mov dword[linel2], eax
1041
mov dword[linel2], eax
1044
 
1042
 
1045
mov eax, ecx
1043
mov eax, ecx
1046
shl eax, 8
1044
shl eax, 8
1047
shr eax, 24
1045
shr eax, 24
1048
 
1046
 
1049
mov dword[wayl2], eax
1047
mov dword[wayl2], eax
1050
 
1048
 
1051
shr ecx, 24  ; it was 8 bits earlier
1049
shr ecx, 24  ; it was 8 bits earlier
1052
mov [L2],ecx
1050
mov [L2],ecx
1053
 
1051
 
1054
 
1052
 
1055
    cmp [f], $5
1053
    cmp [f], $5
1056
    jz fivC
1054
    jz fivC
1057
    cmp [f], $6
1055
    cmp [f], $6
1058
    jz sixC
1056
    jz sixC
1059
 
1057
 
1060
fivC:		   ;Family=5
1058
fivC:		   ;Family=5
1061
 
1059
 
1062
	mov	esi, idt
1060
	mov	esi, idt
1063
	call	load_gif
1061
	call	load_gif
1064
PutImage 135,107,201,49,img_area+8
1062
PutImage 135,107,201,49,img_area+8
1065
;PutImage 125,107,201,49,img_area+8
1063
;PutImage 125,107,201,49,img_area+8
1066
;         place   size
1064
;         place   size
1067
 
1065
 
1068
Text 75,70,0x00000000,IDTn, IDTnlen-IDTn
1066
Text 75,70,0x00000000,IDTn, IDTnlen-IDTn
1069
    cmp [m],$4
1067
    cmp [m],$4
1070
    jz .V54
1068
    jz .V54
1071
    cmp [m],$8
1069
    cmp [m],$8
1072
    jz .V58
1070
    jz .V58
1073
    cmp [m],$9
1071
    cmp [m],$9
1074
    jz .V59
1072
    jz .V59
1075
.V54:
1073
.V54:
1076
   mov [micron], 35
1074
   mov [micron], 35
1077
   mov edx,V54
1075
   mov edx,V54
1078
   mov esi,V54len-V54
1076
   mov esi,V54len-V54
1079
    jmp OutProcName
1077
    jmp OutProcName
1080
.V58:
1078
.V58:
1081
    mov [micron], 25
1079
    mov [micron], 25
1082
    mov edx,V58
1080
    mov edx,V58
1083
    mov esi,V58len-V58
1081
    mov esi,V58len-V58
1084
    jmp OutProcName
1082
    jmp OutProcName
1085
.V59:
1083
.V59:
1086
    mov [micron], 25
1084
    mov [micron], 25
1087
    mov edx,V59
1085
    mov edx,V59
1088
    mov esi,V59len-V59
1086
    mov esi,V59len-V59
1089
    jmp OutProcName
1087
    jmp OutProcName
1090
 
1088
 
1091
sixC:	;Family=6
1089
sixC:	;Family=6
1092
 
1090
 
1093
	mov	esi, via
1091
	mov	esi, via
1094
	call	load_gif
1092
	call	load_gif
1095
PutImage 135,107,201,49,img_area+8
1093
PutImage 135,107,201,49,img_area+8
1096
;PutImage 125,107,201,49,img_area+8
1094
;PutImage 125,107,201,49,img_area+8
1097
;         place   size
1095
;         place   size
1098
 
1096
 
1099
Text 75,70,0x00000000,Centaurn, Centaurnlen-Centaurn
1097
Text 75,70,0x00000000,Centaurn, Centaurnlen-Centaurn
1100
    cmp [m],$6
1098
    cmp [m],$6
1101
    jz .V66
1099
    jz .V66
1102
    cmp [m],$7
1100
    cmp [m],$7
1103
    jz .V67
1101
    jz .V67
1104
    cmp [m],$8
1102
    cmp [m],$8
1105
    jz .V68
1103
    jz .V68
1106
    cmp [m],$9
1104
    cmp [m],$9
1107
    jz .V69
1105
    jz .V69
1108
    cmp [m],$A
1106
    cmp [m],$A
1109
    jz .V6A
1107
    jz .V6A
1110
.V66:
1108
.V66:
1111
   mov [micron], 18 ; 25?
1109
   mov [micron], 18 ; 25?
1112
   mov edx,V66
1110
   mov edx,V66
1113
   mov esi,V66len-V66
1111
   mov esi,V66len-V66
1114
    jmp OutProcName
1112
    jmp OutProcName
1115
.V67:
1113
.V67:
1116
    mov [micron], 15
1114
    mov [micron], 15
1117
    mov edx,V67
1115
    mov edx,V67
1118
    mov esi,V67len-V67
1116
    mov esi,V67len-V67
1119
    jmp OutProcName
1117
    jmp OutProcName
1120
.V68:
1118
.V68:
1121
    mov [micron], 13
1119
    mov [micron], 13
1122
    mov edx,V68
1120
    mov edx,V68
1123
    mov esi,V68len-V68
1121
    mov esi,V68len-V68
1124
    jmp OutProcName
1122
    jmp OutProcName
1125
.V69:
1123
.V69:
1126
   mov [micron], 13
1124
   mov [micron], 13
1127
   mov edx,V69
1125
   mov edx,V69
1128
   mov esi,V69len-V69
1126
   mov esi,V69len-V69
1129
   jmp OutProcName
1127
   jmp OutProcName
1130
.V6A:
1128
.V6A:
1131
   mov [micron], 9
1129
   mov [micron], 9
1132
   mov edx,VA
1130
   mov edx,VA
1133
   mov esi,VAlen-VA
1131
   mov esi,VAlen-VA
1134
   jmp OutProcName
1132
   jmp OutProcName
1135
;-----------
1133
;-----------
1136
Transmeta:
1134
Transmeta:
1137
 
1135
 
1138
Text 15, 190,0x00000000,cache, cachelen-cache
1136
Text 15, 190,0x00000000,cache, cachelen-cache
1139
 
1137
 
1140
Text 75,70,,Tranmsmetan, Tranmsmetanlen-Tranmsmetan
1138
Text 75,70,,Tranmsmetan, Tranmsmetanlen-Tranmsmetan
1141
 
1139
 
1142
	mov	esi, transmeta
1140
	mov	esi, transmeta
1143
	call	load_gif
1141
	call	load_gif
1144
PutImage 135,107,201,49,img_area+8
1142
PutImage 135,107,201,49,img_area+8
1145
;PutImage 125,107,201,49,img_area+8
1143
;PutImage 125,107,201,49,img_area+8
1146
;         place   size
1144
;         place   size
1147
 
1145
 
1148
; cache detection routine - it is the same as for AMD (almost)
1146
; cache detection routine - it is the same as for AMD (almost)
1149
;CACHE1:
1147
;CACHE1:
1150
mov eax, 80000005h
1148
mov eax, 80000005h
1151
    cpuid
1149
    cpuid
1152
 
1150
 
1153
movzx eax, cl
1151
movzx eax, cl
1154
mov [lineld], eax
1152
mov [lineld], eax
1155
 
1153
 
1156
mov eax, ecx
1154
mov eax, ecx
1157
 
1155
 
1158
shr eax,16
1156
shr eax,16
1159
and eax,000000FFh
1157
and eax,000000FFh
1160
mov [wayld], eax
1158
mov [wayld], eax
1161
 
1159
 
1162
shr ecx, 24
1160
shr ecx, 24
1163
mov [L1d], ecx
1161
mov [L1d], ecx
1164
 
1162
 
1165
movzx eax, dl
1163
movzx eax, dl
1166
mov [lineli], eax
1164
mov [lineli], eax
1167
 
1165
 
1168
mov eax, edx
1166
mov eax, edx
1169
 
1167
 
1170
shr eax, 16
1168
shr eax, 16
1171
and eax,000000FFh
1169
and eax,000000FFh
1172
mov [wayli], eax
1170
mov [wayli], eax
1173
 
1171
 
1174
shr edx, 24
1172
shr edx, 24
1175
mov [L1i], edx
1173
mov [L1i], edx
1176
 
1174
 
1177
 
1175
 
1178
;CACHE2:
1176
;CACHE2:
1179
mov eax, 80000006h
1177
mov eax, 80000006h
1180
    cpuid
1178
    cpuid
1181
 
1179
 
1182
movzx eax, cl
1180
movzx eax, cl
1183
mov dword[linel2], eax
1181
mov dword[linel2], eax
1184
 
1182
 
1185
mov eax, ecx
1183
mov eax, ecx
1186
shl eax, 16
1184
shl eax, 16
1187
shr eax, 28
1185
shr eax, 28
1188
 
1186
 
1189
mov dword[wayl2], eax
1187
mov dword[wayl2], eax
1190
 
1188
 
1191
shr ecx, 16
1189
shr ecx, 16
1192
mov [L2],ecx
1190
mov [L2],ecx
1193
 
1191
 
1194
 
1192
 
1195
    cmp [f], $5
1193
    cmp [f], $5
1196
    jz .fivt
1194
    jz .fivt
1197
    cmp [f], $F
1195
    cmp [f], $F
1198
    jz .fift
1196
    jz .fift
1199
.fivt:	  ;     Family=5
1197
.fivt:	  ;     Family=5
1200
 
1198
 
1201
    mov edx,T5
1199
    mov edx,T5
1202
    mov esi,T5len-T5
1200
    mov esi,T5len-T5
1203
    jmp @f
1201
    jmp @f
1204
 
1202
 
1205
.fift:	  ;     Family=F
1203
.fift:	  ;     Family=F
1206
    mov edx,TF
1204
    mov edx,TF
1207
    mov esi,TFlen-TF
1205
    mov esi,TFlen-TF
1208
@@:
1206
@@:
1209
    mov [micron], 13 ;
1207
    mov [micron], 13 ;
1210
    Text 140,70,0
1208
    Text 140,70,0
1211
    jmp MMXtest
1209
    jmp MMXtest
1212
 
1210
 
1213
OutProcName:
1211
OutProcName:
1214
        Text    100,70,0
1212
        Text    100,70,0
1215
 
1213
 
1216
;----
1214
;----
1217
MMXtest:	     ; MMX test and Brand ID decoding
1215
MMXtest:	     ; MMX test and Brand ID decoding
1218
 
1216
 
1219
call decodebrand  ; get Brand ID
1217
call decodebrand  ; get Brand ID
1220
 
1218
 
1221
call decode_standard_features
1219
call decode_standard_features
1222
 
1220
 
1223
call decode_extended_features
1221
call decode_extended_features
1224
      xor eax,eax
1222
      xor eax,eax
1225
      inc eax
1223
      inc eax
1226
      cpuid
1224
      cpuid
1227
HTTtest:
1225
HTTtest:
1228
  test	edx, $10000000; ;Test bit 28
1226
  test	edx, $10000000; ;Test bit 28
1229
  jz .ELN
1227
  jz .ELN
1230
 
1228
 
1231
.EL:   ;HTT technology is supported
1229
.EL:   ;HTT technology is supported
1232
   and ebx,00FF0000h ; numbers of logical processors
1230
   and ebx,00FF0000h ; numbers of logical processors
1233
   cmp ebx, 1 shl 16
1231
   cmp ebx, 1 shl 16
1234
   ;   mov [number_of_log_cpus], ebx
1232
   ;   mov [number_of_log_cpus], ebx
1235
   je .ELN  ; HHT not enabled (Celeron)
1233
   je .ELN  ; HHT not enabled (Celeron)
1236
 
1234
 
1237
   mov	dword [HTTn+9], $736579
1235
   mov	dword [HTTn+9], $736579
1238
   mov	dword [HTT+ 6], $736579
1236
   mov	dword [HTT+ 6], $736579
1239
   jmp TEXTOUT
1237
   jmp TEXTOUT
1240
.ELN:
1238
.ELN:
1241
 
1239
 
1242
   mov	dword [HTTn+ 9],  $6F6E
1240
   mov	dword [HTTn+ 9],  $6F6E
1243
   mov	dword [HTT+ 6],  $6F6E
1241
   mov	dword [HTT+ 6],  $6F6E
1244
 
1242
 
1245
TEXTOUT:
1243
TEXTOUT:
1246
 
1244
 
1247
Text 15,110,0x00000000,fam, famlen-fam
1245
Text 15,110,0x00000000,fam, famlen-fam
1248
Text 15,130,,mode, modelen-mode
1246
Text 15,130,,mode, modelen-mode
1249
Text 15,150,,step, steplen-step
1247
Text 15,150,,step, steplen-step
1250
;--------L1  L2
1248
;--------L1  L2
1251
Number 75,170,0,3,dword [L1d],0x000000;
1249
Number 75,170,0,3,dword [L1d],0x000000;
1252
Number 75,190,,,dword [L1i]
1250
Number 75,190,,,dword [L1i]
1253
Number 41,210,0,4,dword[L2]
1251
Number 41,210,0,4,dword[L2]
1254
Number 35,230,0,5,dword[L3]
1252
Number 35,230,0,5,dword[L3]
1255
;-----------Features
1253
;-----------Features
1256
Number 258,50,0,2,dword [micron]  ; micron
1254
Number 258,50,0,2,dword [micron]  ; micron
1257
 
1255
 
1258
Text 275,290,0x00000000,HTT, HTTlen-HTT
1256
Text 275,290,0x00000000,HTT, HTTlen-HTT
1259
Text 275,310,,sse3, sse3len-sse3
1257
Text 275,310,,sse3, sse3len-sse3
1260
 
1258
 
1261
Text 15,70,,name, namelen-name
1259
Text 15,70,,name, namelen-name
1262
 
1260
 
1263
Text 15,290,,MMXs, MMXslen-MMXs
1261
Text 15,290,,MMXs, MMXslen-MMXs
1264
Text 15,310,,SSE, SSElen-SSE
1262
Text 15,310,,SSE, SSElen-SSE
1265
Text 95,310,,SSE2, SSE2len-SSE2
1263
Text 95,310,,SSE2, SSE2len-SSE2
1266
 
1264
 
1267
    Number 140,170,0,2,dword [wayld],0x000000
1265
    Number 140,170,0,2,dword [wayld],0x000000
1268
    Number 218,170,,,dword [lineld]
1266
    Number 218,170,,,dword [lineld]
1269
 
1267
 
1270
    Number 140,190,,,dword [wayli]
1268
    Number 140,190,,,dword [wayli]
1271
    Number 218,190,,,dword [lineli]
1269
    Number 218,190,,,dword [lineli]
1272
 
1270
 
1273
    Number 140,210,,,dword [wayl2]
1271
    Number 140,210,,,dword [wayl2]
1274
    Number 218,210,,,dword [linel2]
1272
    Number 218,210,,,dword [linel2]
1275
 
1273
 
1276
    Number 140,230,,,dword [wayl3]
1274
    Number 140,230,,,dword [wayl3]
1277
    Number 218,230,,,dword [linel3]
1275
    Number 218,230,,,dword [linel3]
1278
 
1276
 
1279
;-------------------
1277
;-------------------
1280
TEST3DNOW:
1278
TEST3DNOW:
1281
 
1279
 
1282
  xor edx, edx
1280
  xor edx, edx
1283
  cmp [smallvendor], 'ntel'
1281
  cmp [smallvendor], 'ntel'
1284
  je @f
1282
  je @f
1285
 
1283
 
1286
  mov	eax, $80000001 ;// Setup extended function 8000_0001h
1284
  mov	eax, $80000001 ;// Setup extended function 8000_0001h
1287
  cpuid
1285
  cpuid
1288
 
1286
 
1289
@@:
1287
@@:
1290
  mov   eax, now+9
1288
  mov   eax, now+9
1291
  add   edx, edx
1289
  add   edx, edx
1292
  call  write_yes_no_cf
1290
  call  write_yes_no_cf
1293
 
1291
 
1294
  mov   eax, nowp+9
1292
  mov   eax, nowp+9
1295
  add   edx, edx
1293
  add   edx, edx
1296
  call  write_yes_no_cf
1294
  call  write_yes_no_cf
1297
 
1295
 
1298
TESTMMXP:
1296
TESTMMXP:
1299
 
1297
 
1300
    mov   eax,$80000000
1298
    mov   eax,$80000000
1301
    cpuid
1299
    cpuid
1302
 
1300
 
1303
    test eax, eax
1301
    test eax, eax
1304
    jns NOEXTENDEDM
1302
    jns NOEXTENDEDM
1305
 
1303
 
1306
  ;cmp   eax, $80000000 ;// Is 800_0001h supported?
1304
  ;cmp   eax, $80000000 ;// Is 800_0001h supported?
1307
  ;jz   .NOEXTENDEDM    ;// If not, 3DNow! technology is not supported
1305
  ;jz   .NOEXTENDEDM    ;// If not, 3DNow! technology is not supported
1308
  mov	eax, $80000001 ;// Setup extended function 8000_0001h
1306
  mov	eax, $80000001 ;// Setup extended function 8000_0001h
1309
  cpuid
1307
  cpuid
1310
  cmp [smallvendor], 'tead'
1308
  cmp [smallvendor], 'tead'
1311
  jne noCyr
1309
  jne noCyr
1312
Cyrmx:
1310
Cyrmx:
1313
  test	edx, $01000000 ;// Test bit 24
1311
  test	edx, $01000000 ;// Test bit 24
1314
  jnz	XITM  ;// 3DNow! technology is supported
1312
  jnz	XITM  ;// 3DNow! technology is supported
1315
  jz NOEXTENDEDM
1313
  jz NOEXTENDEDM
1316
noCyr:
1314
noCyr:
1317
  test	edx, $00400000 ;// Test bit 22
1315
  test	edx, $00400000 ;// Test bit 22
1318
  jnz	XITM  ;// 3DNow! technology is supported
1316
  jnz	XITM  ;// 3DNow! technology is supported
1319
  ;jz   .NOEXTENDEDM
1317
  ;jz   .NOEXTENDEDM
1320
 
1318
 
1321
NOEXTENDEDM:
1319
NOEXTENDEDM:
1322
   mov	dword [mmxp+ 7], $6F6E
1320
   mov	dword [mmxp+ 7], $6F6E
1323
   mov	dword [MMXPi+ 8], $6F6E
1321
   mov	dword [MMXPi+ 8], $6F6E
1324
   jmp text3d
1322
   jmp text3d
1325
XITM:
1323
XITM:
1326
   mov	dword [mmxp+ 7],  $736579
1324
   mov	dword [mmxp+ 7],  $736579
1327
   mov	dword [MMXPi+ 8],  $736579
1325
   mov	dword [MMXPi+ 8],  $736579
1328
 
1326
 
1329
text3d:
1327
text3d:
1330
 
1328
 
1331
Text 175,290,0x00000000,now, nowlen-now
1329
Text 175,290,0x00000000,now, nowlen-now
1332
Text 175,310,,nowp, nowplen-nowp
1330
Text 175,310,,nowp, nowplen-nowp
1333
Text 95,290,,mmxp, mmxplen-mmxp
1331
Text 95,290,,mmxp, mmxplen-mmxp
1334
 
1332
 
1335
jmp still
1333
jmp still
1336
 
1334
 
1337
;--------------------------
1335
;--------------------------
1338
NO_CPUID:
1336
NO_CPUID:
1339
 Text 15,50,0x00000000,oblom, oblomlen-oblom
1337
 Text 15,50,0x00000000,oblom, oblomlen-oblom
1340
 
1338
 
1341
FREEZE:
1339
FREEZE:
1342
nop
1340
nop
1343
jmp FREEZE ; maybe we should close application or just made some Warning and jump to still:
1341
jmp FREEZE ; maybe we should close application or just made some Warning and jump to still:
1344
;----------------
1342
;----------------
1345
still:
1343
still:
1346
 
1344
 
1347
; çàòåì ïåðåõîäèì â öèêë îæèäàíèÿ ñîáûòèé
1345
; çàòåì ïåðåõîäèì â öèêë îæèäàíèÿ ñîáûòèé
1348
event_wait:
1346
event_wait:
1349
 
1347
 
1350
    ;================_RAM_==============
1348
    ;================_RAM_==============
1351
  Number 200,340,0,4,dword [ram_size_a],0xFFFFFF
1349
  Number 200,340,0,4,dword [ram_size_a],0xFFFFFF
1352
 
1350
 
1353
  mov eax, 18
1351
  mov eax, 18
1354
  mov ebx, 16
1352
  mov ebx, 16
1355
  mcall
1353
  mcall
1356
 
1354
 
1357
  shr eax, 10
1355
  shr eax, 10
1358
 
1356
 
1359
  mov [ram_size_a], eax
1357
  mov [ram_size_a], eax
1360
 
1358
 
1361
  mov eax, 18
1359
  mov eax, 18
1362
  mov ebx, 17
1360
  mov ebx, 17
1363
  mcall
1361
  mcall
1364
 
1362
 
1365
  shr eax, 10
1363
  shr eax, 10
1366
 
1364
 
1367
  mov [ram_size_t], eax
1365
  mov [ram_size_t], eax
1368
 
1366
 
1369
  Text 115,340,0x00000000,ram, ramlen-ram
1367
  Text 115,340,0x00000000,ram, ramlen-ram
1370
  Text 300,340,,mb, mblen-mb
1368
  Text 300,340,,mb, mblen-mb
1371
 
1369
 
1372
  Number 200,340,0,4,dword [ram_size_a],0x000000
1370
  Number 200,340,0,4,dword [ram_size_a],0x000000
1373
 
1371
 
1374
  Number 270,340,,,dword [ram_size_t]
1372
  Number 270,340,,,dword [ram_size_t]
1375
 
1373
 
1376
;==============================
1374
;==============================
1377
 
1375
 
1378
	mov	eax,23	     ; ôóíêöèÿ 23: îæèäàíèå ñîáûòèÿ
1376
	mov	eax,23	     ; ôóíêöèÿ 23: îæèäàíèå ñîáûòèÿ
1379
	mov	ebx,50	     ; æäåìñ 0.5 ñåê
1377
	mov	ebx,50	     ; æäåìñ 0.5 ñåê
1380
	mcall
1378
	mcall
1381
 
1379
 
1382
    cmp  eax,1		; 
1380
    cmp  eax,1		; 
1383
    je	 red		;  redraw
1381
    je	 red		;  redraw
1384
    cmp  eax,2		; 
1382
    cmp  eax,2		; 
1385
    je	 key		;  key
1383
    je	 key		;  key
1386
    cmp  eax,3		; 
1384
    cmp  eax,3		; 
1387
    je	 button 	;  button
1385
    je	 button 	;  button
1388
    jmp  still		; 
1386
    jmp  still		; 
1389
  key:			; 
1387
  key:			; 
1390
    mcall		; 
1388
    mcall		; 
1391
    jmp  still		; 
1389
    jmp  still		; 
1392
  button:		; 
1390
  button:		; 
1393
    mov  eax,17 	; 
1391
    mov  eax,17 	; 
1394
    mcall		; 
1392
    mcall		; 
1395
    cmp  ah,1		;  = 1 ?
1393
    cmp  ah,1		;  = 1 ?
1396
    je	close		; close
1394
    je	close		; close
1397
 
1395
 
1398
    cmp  ah,2		;  = 2 ?
1396
    cmp  ah,2		;  = 2 ?
1399
    je	thread_start	; 
1397
    je	thread_start	; 
1400
			; 
1398
			; 
1401
    cmp  ah,3		;  = 3 ?
1399
    cmp  ah,3		;  = 3 ?
1402
    jne  still
1400
    jne  still
1403
 
1401
 
1404
vybor:
1402
vybor:
1405
 
1403
 
1406
 Number 310,70,0,4,dword [rating],0xFFFFFF ;
1404
 Number 310,70,0,4,dword [rating],0xFFFFFF ;
1407
 
1405
 
1408
 Number 315,90,0,3,dword [FRS]; MHz 
1406
 Number 315,90,0,3,dword [FRS]; MHz 
1409
 
1407
 
1410
cmp [FRS], 266
1408
cmp [FRS], 266
1411
jz .s1
1409
jz .s1
1412
cmp [FRS], 333
1410
cmp [FRS], 333
1413
jz .s2
1411
jz .s2
1414
cmp [FRS], 400
1412
cmp [FRS], 400
1415
jz .s3
1413
jz .s3
1416
 
1414
 
1417
.s1:
1415
.s1:
1418
mov [FRS], 333
1416
mov [FRS], 333
1419
.rating:
1417
.rating:
1420
call newrating
1418
call newrating
1421
 Number 310,70,0,4,dword [rating],0x000000
1419
 Number 310,70,0,4,dword [rating],0x000000
1422
 
1420
 
1423
 Number 315,90,0,3,dword [FRS]; MHz 
1421
 Number 315,90,0,3,dword [FRS]; MHz 
1424
jmp  still
1422
jmp  still
1425
 
1423
 
1426
.s2:
1424
.s2:
1427
mov [FRS], 400
1425
mov [FRS], 400
1428
jmp .rating
1426
jmp .rating
1429
 
1427
 
1430
.s3:
1428
.s3:
1431
mov [FRS], 266
1429
mov [FRS], 266
1432
jmp .rating
1430
jmp .rating
1433
 
1431
 
1434
close:
1432
close:
1435
    mov   eax,-1	
1433
    mov   eax,-1	
1436
    mcall	       
1434
    mcall	       
1437
 
1435
 
1438
;**************************** THREAD-SECOND WINDOW
1436
;**************************** THREAD-SECOND WINDOW
1439
thread_start:
1437
thread_start:
1440
 
1438
 
1441
    cmp  [num_win2],0	
1439
    cmp  [num_win2],0	
1442
 
1440
 
1443
    jne  still		
1441
    jne  still		
1444
 
1442
 
1445
;================================================RSA test
1443
;================================================RSA test
1446
 
1444
 
1447
;test rsa coding speed
1445
;test rsa coding speed
1448
        call    init_test
1446
        call    init_test
1449
;length of module - 256 bit
1447
;length of module - 256 bit
1450
  mov  eax,26
1448
  mov  eax,26
1451
  mov  ebx,9
1449
  mov  ebx,9
1452
  mcall
1450
  mcall
1453
  add  eax,100 ;test lasts 1 second.
1451
  add  eax,100 ;test lasts 1 second.
1454
  push eax
1452
  push eax
1455
.loop:
1453
.loop:
1456
  push 4     ;do 4 iterations - this reduces number of calls mcall.
1454
  push 4     ;do 4 iterations - this reduces number of calls mcall.
1457
.loop1:
1455
.loop1:
1458
  call rsa_test   ;this procedure change all registers
1456
  call rsa_test   ;this procedure change all registers
1459
  dec  dword [esp]
1457
  dec  dword [esp]
1460
  jnz  .loop1
1458
  jnz  .loop1
1461
  pop  ecx
1459
  pop  ecx
1462
  mov  eax,26
1460
  mov  eax,26
1463
  mov  ebx,9
1461
  mov  ebx,9
1464
  mcall
1462
  mcall
1465
  cmp  eax,dword [esp]	 ;Is time changed?
1463
  cmp  eax,dword [esp]	 ;Is time changed?
1466
  jl   .loop
1464
  jl   .loop
1467
  pop  eax
1465
  pop  eax
1468
  shr  dword [iter],4 ;[iter] - speed in Kb/sec. (every iteration codes 64 bytes)
1466
  shr  dword [iter],4 ;[iter] - speed in Kb/sec. (every iteration codes 64 bytes)
1469
CreateTread window_2,thread2_esp
1467
CreateTread window_2,thread2_esp
1470
  jmp  still
1468
  jmp  still
1471
 
1469
 
1472
window_2:
1470
window_2:
1473
    mov  [num_win2],1	
1471
    mov  [num_win2],1	
1474
    call draw_window_2	
1472
    call draw_window_2	
1475
 
1473
 
1476
still_2:		
1474
still_2:		
1477
 
1475
 
1478
    mov  eax,10 	
1476
    mov  eax,10 	
1479
    mcall		
1477
    mcall		
1480
 
1478
 
1481
    cmp  eax,1		
1479
    cmp  eax,1		
1482
    je	 window_2	;  window_2
1480
    je	 window_2	;  window_2
1483
    cmp  eax,2		; 
1481
    cmp  eax,2		; 
1484
    je	 key_2		;  key_2
1482
    je	 key_2		;  key_2
1485
    cmp  eax,3		; 
1483
    cmp  eax,3		; 
1486
    je	 button_2	;  button_2
1484
    je	 button_2	;  button_2
1487
 
1485
 
1488
    jmp  still_2	; 
1486
    jmp  still_2	; 
1489
 
1487
 
1490
  key_2:		; 
1488
  key_2:		; 
1491
    mcall		; 
1489
    mcall		; 
1492
    jmp  still_2	; 
1490
    jmp  still_2	; 
1493
 
1491
 
1494
  button_2:		; 
1492
  button_2:		; 
1495
    mov  eax,17 	; 17 
1493
    mov  eax,17 	; 17 
1496
    mcall		; 
1494
    mcall		; 
1497
 
1495
 
1498
    cmp  ah,1		; = 1 ?
1496
    cmp  ah,1		; = 1 ?
1499
    jne  still_2	; noclose
1497
    jne  still_2	; noclose
1500
 
1498
 
1501
    mov  [num_win2],0	; 
1499
    mov  [num_win2],0	; 
1502
 
1500
 
1503
    or	 eax,-1 	; 
1501
    or	 eax,-1 	; 
1504
    mcall
1502
    mcall
1505
 
1503
 
1506
draw_window_2:
1504
draw_window_2:
1507
    mov  eax,12 		   ; function 12:tell os about windowdraw
1505
    mov  eax,12 		   ; function 12:tell os about windowdraw
1508
    mov  ebx,1h 		    ; 1, start of draw
1506
    mov  ebx,1h 		    ; 1, start of draw
1509
    mcall
1507
    mcall
1510
 
1508
 
1511
 
1509
 
1512
  Window 250,250,420,390, 0x33FFFFFF, 0x805080d0, standard
1510
  Window 250,250,420,390, 0x33FFFFFF, 0x805080d0, standard
1513
	  ; place size
1511
	  ; place size
1514
 
1512
 
1515
Text 15, 10,0x00000000, STDCA, STDCAlen-STDCA
1513
Text 15, 10,0x00000000, STDCA, STDCAlen-STDCA
1516
Text 215, 10,, EXTCA, EXTCAlen-EXTCA
1514
Text 215, 10,, EXTCA, EXTCAlen-EXTCA
1517
 
1515
 
1518
Number 135,10,1*256,8,dword [stdc],0x000000
1516
Number 135,10,1*256,8,dword [stdc],0x000000
1519
Number 335,10,,,dword [extc],
1517
Number 335,10,,,dword [extc],
1520
 
1518
 
1521
Text 15, 30,0x00000000, FPU, FPUlen-FPU
1519
Text 15, 30,0x00000000, FPU, FPUlen-FPU
1522
Text 115, 30,, VME, VMElen-VME
1520
Text 115, 30,, VME, VMElen-VME
1523
Text 215, 30,, DE,  DElen-DE
1521
Text 215, 30,, DE,  DElen-DE
1524
Text 315, 30,, PSE, PSElen-PSE
1522
Text 315, 30,, PSE, PSElen-PSE
1525
 
1523
 
1526
Text 15, 50,,TSC, TSClen-TSC
1524
Text 15, 50,,TSC, TSClen-TSC
1527
Text 115,50,,MSR, MSRlen-MSR
1525
Text 115,50,,MSR, MSRlen-MSR
1528
Text 215,50,,PAE, PAElen-PAE
1526
Text 215,50,,PAE, PAElen-PAE
1529
Text 315,50,,MCE, MCElen-MCE
1527
Text 315,50,,MCE, MCElen-MCE
1530
 
1528
 
1531
Text 15,70,,CX8, CX8len-CX8
1529
Text 15,70,,CX8, CX8len-CX8
1532
Text 115,70,,APIC, APIClen-APIC
1530
Text 115,70,,APIC, APIClen-APIC
1533
Text 215,70,,Res, Reslen-Res
1531
Text 215,70,,Res, Reslen-Res
1534
Text 315,70,,SEP, SEPlen-SEP
1532
Text 315,70,,SEP, SEPlen-SEP
1535
 
1533
 
1536
Text 15,90,,MTRR, MTRRlen-MTRR
1534
Text 15,90,,MTRR, MTRRlen-MTRR
1537
Text 115,90,,PGE, PGElen-PGE
1535
Text 115,90,,PGE, PGElen-PGE
1538
Text 215,90,,MCA, MCAlen-MCA
1536
Text 215,90,,MCA, MCAlen-MCA
1539
Text 315,90,,CMOV, CMOVlen-CMOV
1537
Text 315,90,,CMOV, CMOVlen-CMOV
1540
 
1538
 
1541
Text 15,110,,PAT, PATlen-PAT
1539
Text 15,110,,PAT, PATlen-PAT
1542
Text 115,110,,PSE36, PSE36len-PSE36
1540
Text 115,110,,PSE36, PSE36len-PSE36
1543
Text 215,110,,PSNUM, PSNUMlen-PSNUM
1541
Text 215,110,,PSNUM, PSNUMlen-PSNUM
1544
Text 315,110,,CLFLUSHn, CLFLUSHnlen-CLFLUSHn
1542
Text 315,110,,CLFLUSHn, CLFLUSHnlen-CLFLUSHn
1545
 
1543
 
1546
Text 15,130,,Res, Reslen-Res
1544
Text 15,130,,Res, Reslen-Res
1547
Text 115,130,,DTS, DTSlen-DTS
1545
Text 115,130,,DTS, DTSlen-DTS
1548
Text 215,130,,ACPI, ACPIlen-ACPI
1546
Text 215,130,,ACPI, ACPIlen-ACPI
1549
Text 315,130,,MMX, MMXlen-MMX
1547
Text 315,130,,MMX, MMXlen-MMX
1550
 
1548
 
1551
Text 15,150,,FXSR, FXSRlen-FXSR
1549
Text 15,150,,FXSR, FXSRlen-FXSR
1552
Text 115,150,,SSE, SSElen-SSE
1550
Text 115,150,,SSE, SSElen-SSE
1553
Text  215,150,,SSE2, SSE2len-SSE2
1551
Text  215,150,,SSE2, SSE2len-SSE2
1554
Text 315,150,,SSn, SSnlen-SSn
1552
Text 315,150,,SSn, SSnlen-SSn
1555
 
1553
 
1556
Text 15,170,,HTT, HTTnlen-HTTn
1554
Text 15,170,,HTT, HTTnlen-HTTn
1557
Text 115,170,,TM, TMlen-TM
1555
Text 115,170,,TM, TMlen-TM
1558
Text 215,170,,IA64, IA64len-IA64
1556
Text 215,170,,IA64, IA64len-IA64
1559
Text 315,170,,PBE, PBElen-PBE
1557
Text 315,170,,PBE, PBElen-PBE
1560
;---------------
1558
;---------------
1561
DrawLine 0,  410, 185,185,0x8080FF  ;10
1559
DrawLine 0,  410, 185,185,0x8080FF  ;10
1562
 
1560
 
1563
mov   eax,$80000000
1561
mov   eax,$80000000
1564
cpuid
1562
cpuid
1565
;mov eax, $03020101   for test of reaction
1563
;mov eax, $03020101   for test of reaction
1566
test eax, eax
1564
test eax, eax
1567
js  goooddd
1565
js  goooddd
1568
 
1566
 
1569
baaadd:
1567
baaadd:
1570
Text 95,235,0x00000000,NEF, NEFlen-NEF
1568
Text 95,235,0x00000000,NEF, NEFlen-NEF
1571
jmp too
1569
jmp too
1572
 
1570
 
1573
goooddd:
1571
goooddd:
1574
Text 15,195,0x00000000,SS3, SS3len-SS3
1572
Text 15,195,0x00000000,SS3, SS3len-SS3
1575
Text 15,215,,MON, MONlen-MON
1573
Text 15,215,,MON, MONlen-MON
1576
Text 15,235,,DS_CPL, DS_CPLlen-DS_CPL
1574
Text 15,235,,DS_CPL, DS_CPLlen-DS_CPL
1577
Text 15,255,,EST, ESTlen-EST
1575
Text 15,255,,EST, ESTlen-EST
1578
Text 15,275,,TM2, TM2len-TM2
1576
Text 15,275,,TM2, TM2len-TM2
1579
Text 15,295,,VMX, VMXlen-VMX
1577
Text 15,295,,VMX, VMXlen-VMX
1580
Text 15,315,,SVM, SVMlen-SVM
1578
Text 15,315,,SVM, SVMlen-SVM
1581
 
1579
 
1582
Text 115,195,,CNXT_ID, CNXT_IDlen-CNXT_ID
1580
Text 115,195,,CNXT_ID, CNXT_IDlen-CNXT_ID
1583
Text 115,215,,CX16, CX16len-CX16
1581
Text 115,215,,CX16, CX16len-CX16
1584
Text 115,235,,ETPRD, ETPRDlen-ETPRD
1582
Text 115,235,,ETPRD, ETPRDlen-ETPRD
1585
Text 115,255,,SYS, SYSlen-SYS
1583
Text 115,255,,SYS, SYSlen-SYS
1586
Text 115,275,,LAF, LAFlen-LAF
1584
Text 115,275,,LAF, LAFlen-LAF
1587
Text 115,295,,SSSE3, SSSE3len-SSSE3
1585
Text 115,295,,SSSE3, SSSE3len-SSSE3
1588
Text 115,315,,MCR8, MCR8len-MCR8
1586
Text 115,315,,MCR8, MCR8len-MCR8
1589
 
1587
 
1590
Text 215,195,,MP, MPlen-MP
1588
Text 215,195,,MP, MPlen-MP
1591
Text 215,215,,NX, NXlen-NX
1589
Text 215,215,,NX, NXlen-NX
1592
Text 215,235,,MMXPi, MMXPilen-MMXPi
1590
Text 215,235,,MMXPi, MMXPilen-MMXPi
1593
Text 215,255,,MMXn, MMXnlen-MMXn
1591
Text 215,255,,MMXn, MMXnlen-MMXn
1594
Text 215,275,,FXSRn, FXSRnlen-FXSRn
1592
Text 215,275,,FXSRn, FXSRnlen-FXSRn
1595
Text 215,295,,DCA,DCAlen-DCA
1593
Text 215,295,,DCA,DCAlen-DCA
1596
 
1594
 
1597
Text 315,195,,FFXSR, FFXSRlen-FFXSR
1595
Text 315,195,,FFXSR, FFXSRlen-FFXSR
1598
Text 315,215,,TSCP, TSCPlen-TSCP
1596
Text 315,215,,TSCP, TSCPlen-TSCP
1599
Text 315,235,,LM, LMlen-LM
1597
Text 315,235,,LM, LMlen-LM
1600
Text 315,255,,DNo, DNolen-DNo
1598
Text 315,255,,DNo, DNolen-DNo
1601
Text 315,275,,DN, DNlen-DN
1599
Text 315,275,,DN, DNlen-DN
1602
Text 315,295,,CMPL, CMPLlen-CMPL
1600
Text 315,295,,CMPL, CMPLlen-CMPL
1603
 
1601
 
1604
 
1602
 
1605
too:
1603
too:
1606
DrawLine 0,  410, 335,335,0x8080FF  ;10
1604
DrawLine 0,  410, 335,335,0x8080FF  ;10
1607
 
1605
 
1608
Text 15,350,0x00000000,speed, speedlen-speed
1606
Text 15,350,0x00000000,speed, speedlen-speed
1609
Text 130,350,,kbpersec, kbperseclen-kbpersec
1607
Text 130,350,,kbpersec, kbperseclen-kbpersec
1610
 
1608
 
1611
Number 95,350,0,5,dword [iter],0x000000; RSA test results
1609
Number 95,350,0,5,dword [iter],0x000000; RSA test results
1612
 
1610
 
1613
    mov  eax,12
1611
    mov  eax,12
1614
    mov  ebx,2h
1612
    mov  ebx,2h
1615
    mcall
1613
    mcall
1616
 
1614
 
1617
    ret
1615
    ret
1618
 
1616
 
1619
num_win2 db 0
1617
num_win2 db 0
1620
 
1618
 
1621
;   *******  main window *******
1619
;   *******  main window *******
1622
 
1620
 
1623
draw_window:
1621
draw_window:
1624
   mov eax,12
1622
   mov eax,12
1625
   mov	ebx,1h
1623
   mov	ebx,1h
1626
   mcall
1624
   mcall
1627
 
1625
 
1628
  Window 150,150,350,385, 0x34FFFFFF, 0x805080d0, title
1626
  Window 150,150,350,385, 0x34FFFFFF, 0x805080d0, title
1629
	  ; place size
1627
	  ; place size
1630
 
1628
 
1631
  Button 15,330,92,23,2,0x03FFFFFF   ;  button "press for more"
1629
  Button 15,330,92,23,2,0x03FFFFFF   ;  button "press for more"
1632
 
1630
 
1633
	mov	esi, knopka
1631
	mov	esi, knopka
1634
	mov	edi, img_area2
1632
	mov	edi, img_area2
1635
	call	load_gif2
1633
	call	load_gif2
1636
PutImage 15,330,93,24,img_area2+8   ; image "press for more"
1634
PutImage 15,330,93,24,img_area2+8   ; image "press for more"
1637
;         place   size
1635
;         place   size
1638
 
1636
 
1639
 
1637
 
1640
    mov  eax,12
1638
    mov  eax,12
1641
    mov  ebx,2h
1639
    mov  ebx,2h
1642
    mcall
1640
    mcall
1643
 
1641
 
1644
    Text 130,270,0x00000000,instruct, instructlen-instruct
1642
    Text 130,270,0x00000000,instruct, instructlen-instruct
1645
 
1643
 
1646
    DrawLine  10,  330, 325,325,0x8080FF
1644
    DrawLine  10,  330, 325,325,0x8080FF
1647
    DrawLine 330,  330, 275,325;,0x8080FF
1645
    DrawLine 330,  330, 275,325;,0x8080FF
1648
    DrawLine  10,   10, 275,325;,0x8080FF
1646
    DrawLine  10,   10, 275,325;,0x8080FF
1649
    DrawLine  10,  125, 275,275;,0x8080FF
1647
    DrawLine  10,  125, 275,275;,0x8080FF
1650
    DrawLine 230,  330, 275,275;,0x8080FF
1648
    DrawLine 230,  330, 275,275;,0x8080FF
1651
 
1649
 
1652
  cmp dword[smallvendor], 'cAMD'
1650
  cmp dword[smallvendor], 'cAMD'
1653
  jne cont
1651
  jne cont
1654
  cmp [f], $6
1652
  cmp [f], $6
1655
  jne cont
1653
  jne cont
1656
 
1654
 
1657
   Button 240,85,69,15,3,0x030000FF  ;  button for rating
1655
   Button 240,85,69,15,3,0x030000FF  ;  button for rating
1658
 
1656
 
1659
    Text 245,90,0x00FFFFFF,FR, FRlen-FR
1657
    Text 245,90,0x00FFFFFF,FR, FRlen-FR
1660
 
1658
 
1661
   call newrating; !!!!
1659
   call newrating; !!!!
1662
 
1660
 
1663
     cont:
1661
     cont:
1664
 
1662
 
1665
 
1663
 
1666
    Text 15,50,0x00000000,tsum, tsumlen-tsum   ; 
1664
    Text 15,50,0x00000000,tsum, tsumlen-tsum   ; 
1667
    Text 15,90,,cpuname, cpunamelen-cpuname; 
1665
    Text 15,90,,cpuname, cpunamelen-cpuname; 
1668
    Text 255,250,,typen, typenlen-typen;
1666
    Text 255,250,,typen, typenlen-typen;
1669
    Text 175, 50,,tech, techlen-tech; 
1667
    Text 175, 50,,tech, techlen-tech; 
1670
 
1668
 
1671
    Number 82,50,0,4,dword [total],0x000000; MHz
1669
    Number 82,50,0,4,dword [total],0x000000; MHz
1672
    Number 110,50,0,2,dword [sot]; KHz
1670
    Number 110,50,0,2,dword [sot]; KHz
1673
 
1671
 
1674
    Text 15,170,0x00000000,cache2, cache2len-cache2
1672
    Text 15,170,0x00000000,cache2, cache2len-cache2
1675
    Text 15,210,,cache3, cache3len-cache3
1673
    Text 15,210,,cache3, cache3len-cache3
1676
    Text 15,230,,cache4, cache4len-cache4
1674
    Text 15,230,,cache4, cache4len-cache4
1677
 
1675
 
1678
 
1676
 
1679
    Number 75,110,1*256,1,dword [f],0x000000 ; 
1677
    Number 75,110,1*256,1,dword [f],0x000000 ; 
1680
    Number 75,130,,,dword [m]
1678
    Number 75,130,,,dword [m]
1681
    Number 75,150,,,dword [s]
1679
    Number 75,150,,,dword [s]
1682
 
1680
 
1683
    Number 110,110,1*256,2,dword [ef]
1681
    Number 110,110,1*256,2,dword [ef]
1684
    Number 110,130,,,dword [em]
1682
    Number 110,130,,,dword [em]
1685
 
1683
 
1686
Text   15,30,0x00000000,multil, multillen-multil
1684
Text   15,30,0x00000000,multil, multillen-multil
1687
Text   175,30,,freql, freqllen-freql
1685
Text   175,30,,freql, freqllen-freql
1688
Number 85,30,0,2,dword [multb],0x000000;
1686
Number 85,30,0,2,dword [multb],0x000000;
1689
Number 105,30,0,1,dword [multa]
1687
Number 105,30,0,1,dword [multa]
1690
Number 259,30,0,4,dword [freqbb]
1688
Number 259,30,0,4,dword [freqbb]
1691
Number 289,30,0,2,dword [freqll]
1689
Number 289,30,0,2,dword [freqll]
1692
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1690
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1693
;Text 115,280,0x00000000,logcpus, logcpuslen-logcpus
1691
;Text 115,280,0x00000000,logcpus, logcpuslen-logcpus
1694
;Number 250,280,0,2,dword [number_of_log_cpus],0x000000
1692
;Number 250,280,0,2,dword [number_of_log_cpus],0x000000
1695
 
1693
 
1696
 
1694
 
1697
    Text 15,10,0x00000000,stm, stmlen-stm
1695
    Text 15,10,0x00000000,stm, stmlen-stm
1698
;  Fix for deleting leading whitespaces
1696
;  Fix for deleting leading whitespaces
1699
;  in Intel P4's internal name
1697
;  in Intel P4's internal name
1700
;  by Madis Calme
1698
;  by Madis Calme
1701
;  23.12.2004 ver. 0.81
1699
;  23.12.2004 ver. 0.81
1702
    cld
1700
    cld
1703
    mov  edi,myname
1701
    mov  edi,myname
1704
    mov  al,20h
1702
    mov  al,20h
1705
    or	 ecx,-1
1703
    or	 ecx,-1
1706
    repe scasb
1704
    repe scasb
1707
    dec  edi
1705
    dec  edi
1708
    mov  esi,mynamelen
1706
    mov  esi,mynamelen
1709
    sub  esi,edi
1707
    sub  esi,edi
1710
    Text 105, 10, 0x00000000, edi, esi
1708
    Text 105, 10, 0x00000000, edi, esi
1711
;    Text 105,20,0x00000000,myname, mynamelen-myname
1709
;    Text 105,20,0x00000000,myname, mynamelen-myname
1712
;-
1710
;-
1713
Text 15,250,,brandid, brandidlen-brandid
1711
Text 15,250,,brandid, brandidlen-brandid
1714
 
1712
 
1715
    ret 		; 
1713
    ret 		; 
1716
 
1714
 
1717
load_gif:
1715
load_gif:
1718
	mov	edi, img_area
1716
        mov     edi, img_area
1719
load_gif2:
1717
load_gif2:
-
 
1718
 
1720
	gif2img esi,edi
1719
COLOR_ORDER equ MENUETOS
1721
;	ret
1720
include 'gif_lite.inc'        ; parse GIF files
1722
 
1721
 
1723
; DATA AREA
1722
; DATA AREA
1724
 
1723
 
1725
title	 db   'CPUID 2.21 by S.Kuzmin & the KolibriOS team',0
1724
title	 db   'CPUID 2.21 by S.Kuzmin & the KolibriOS team',0
1726
 
1725
 
1727
tsum:
1726
tsum:
1728
    db 'Frequency:     .   MHz'
1727
    db 'Frequency:     .   MHz'
1729
tsumlen:
1728
tsumlen:
1730
 
1729
 
1731
total dd 0x0
1730
total dd 0x0
1732
total1 dd 0x0
1731
total1 dd 0x0
1733
rating dd 0x0
1732
rating dd 0x0
1734
rat dd 0x0  ;
1733
rat dd 0x0  ;
1735
 
1734
 
1736
ram:
1735
ram:
1737
db 'Available RAM:     out of'
1736
db 'Available RAM:     out of'
1738
ramlen:
1737
ramlen:
1739
 
1738
 
1740
NEF:
1739
NEF:
1741
db 'EXTENDED FEATURES ARE NOT AVAILABLE'
1740
db 'EXTENDED FEATURES ARE NOT AVAILABLE'
1742
NEFlen:
1741
NEFlen:
1743
 
1742
 
1744
mb :
1743
mb :
1745
db 'MB'
1744
db 'MB'
1746
mblen:
1745
mblen:
1747
 
1746
 
1748
;logcpus :
1747
;logcpus :
1749
;db 'Number of logical CPU:'
1748
;db 'Number of logical CPU:'
1750
;logcpuslen:
1749
;logcpuslen:
1751
 
1750
 
1752
speed :
1751
speed :
1753
db 'PERFORMANCE:'
1752
db 'PERFORMANCE:'
1754
speedlen:
1753
speedlen:
1755
 
1754
 
1756
kbpersec:
1755
kbpersec:
1757
db 'KB/SEC'
1756
db 'KB/SEC'
1758
kbperseclen:
1757
kbperseclen:
1759
 
1758
 
1760
instruct:
1759
instruct:
1761
    db 'Instruction sets'
1760
    db 'Instruction sets'
1762
instructlen:
1761
instructlen:
1763
 
1762
 
1764
standard    db 'Standard and Extended features plus Performance test',0
1763
standard    db 'Standard and Extended features plus Performance test',0
1765
 
1764
 
1766
FR:
1765
FR:
1767
    db 'Choose FSB:'
1766
    db 'Choose FSB:'
1768
FRlen:
1767
FRlen:
1769
 
1768
 
1770
STDCA:
1769
STDCA:
1771
    db 'Highest STD call is         '
1770
    db 'Highest STD call is         '
1772
STDCAlen:
1771
STDCAlen:
1773
 
1772
 
1774
EXTCA:
1773
EXTCA:
1775
    db 'Highest EXT call is         h'
1774
    db 'Highest EXT call is         h'
1776
EXTCAlen:
1775
EXTCAlen:
1777
 
1776
 
1778
brandid:
1777
brandid:
1779
    db 'Brand:'
1778
    db 'Brand:'
1780
brandidlen:
1779
brandidlen:
1781
 
1780
 
1782
oblom:
1781
oblom:
1783
    db 'SORRY, CPUID IS NOT AVAILABLE'
1782
    db 'SORRY, CPUID IS NOT AVAILABLE'
1784
oblomlen:
1783
oblomlen:
1785
other:
1784
other:
1786
    db 'SORRY, THIS VENDOR IS NOT SUPPORTED YET'
1785
    db 'SORRY, THIS VENDOR IS NOT SUPPORTED YET'
1787
otherlen:
1786
otherlen:
1788
 
1787
 
1789
cpuname:
1788
cpuname:
1790
    db 'CPU VENDOR:             '
1789
    db 'CPU VENDOR:             '
1791
cpunamelen:
1790
cpunamelen:
1792
fam:
1791
fam:
1793
    db 'FAMILY:     std    ext'
1792
    db 'FAMILY:     std    ext'
1794
famlen:
1793
famlen:
1795
mode:
1794
mode:
1796
    db 'MODEL:      std    ext'
1795
    db 'MODEL:      std    ext'
1797
modelen:
1796
modelen:
1798
step:
1797
step:
1799
    db 'STEPPING:'
1798
    db 'STEPPING:'
1800
steplen:
1799
steplen:
1801
 
1800
 
1802
cache2:
1801
cache2:
1803
 
1802
 
1804
    db 'L1(data):     KB       -way set     -byte line size'
1803
    db 'L1(data):     KB       -way set     -byte line size'
1805
cache2len:
1804
cache2len:
1806
 
1805
 
1807
cache:
1806
cache:
1808
    db 'L1(inst):     KB       -way set     -byte line size'
1807
    db 'L1(inst):     KB       -way set     -byte line size'
1809
cachelen:
1808
cachelen:
1810
 
1809
 
1811
cache3:
1810
cache3:
1812
 
1811
 
1813
    db 'L2:      KB            -way set     -byte line size'
1812
    db 'L2:      KB            -way set     -byte line size'
1814
cache3len:
1813
cache3len:
1815
 
1814
 
1816
cache4:
1815
cache4:
1817
    db 'L3:      KB            -way set     -byte line size'
1816
    db 'L3:      KB            -way set     -byte line size'
1818
cache4len:
1817
cache4len:
1819
 
1818
 
1820
cacheP4:
1819
cacheP4:
1821
 
1820
 
1822
    db 'L1(inst):     Kuops    -way set     -byte line size'
1821
    db 'L1(inst):     Kuops    -way set     -byte line size'
1823
cacheP4len:
1822
cacheP4len:
1824
 
1823
 
1825
tech:
1824
tech:
1826
  db 'Technology: 0.   micron '
1825
  db 'Technology: 0.   micron '
1827
techlen:
1826
techlen:
1828
 
1827
 
1829
typen:
1828
typen:
1830
  db 'Type:'
1829
  db 'Type:'
1831
typenlen:
1830
typenlen:
1832
 
1831
 
1833
pr:
1832
pr:
1834
  db 'P-rating:'
1833
  db 'P-rating:'
1835
prlen:
1834
prlen:
1836
 
1835
 
1837
multil:
1836
multil:
1838
  db 'Multiplier:   .'
1837
  db 'Multiplier:   .'
1839
multillen:
1838
multillen:
1840
 
1839
 
1841
freql:
1840
freql:
1842
  db 'System clock:     .   MHz'
1841
  db 'System clock:     .   MHz'
1843
freqllen:
1842
freqllen:
1844
 
1843
 
1845
name:
1844
name:
1846
    db 'CODENAME:'
1845
    db 'CODENAME:'
1847
namelen:
1846
namelen:
1848
 
1847
 
1849
AMDn:
1848
AMDn:
1850
    db 'AMD'
1849
    db 'AMD'
1851
AMDnlen:
1850
AMDnlen:
1852
Inteln:
1851
Inteln:
1853
    db 'Intel'
1852
    db 'Intel'
1854
Intelnlen:
1853
Intelnlen:
1855
Cyrixn:
1854
Cyrixn:
1856
    db 'Cyrix'
1855
    db 'Cyrix'
1857
Cyrixnlen:
1856
Cyrixnlen:
1858
IDTn:
1857
IDTn:
1859
     db 'IDT/Centaur'
1858
     db 'IDT/Centaur'
1860
IDTnlen:
1859
IDTnlen:
1861
Centaurn:
1860
Centaurn:
1862
     db 'VIA'
1861
     db 'VIA'
1863
Centaurnlen:
1862
Centaurnlen:
1864
 
1863
 
1865
Tranmsmetan:
1864
Tranmsmetan:
1866
     db 'Transmeta'
1865
     db 'Transmeta'
1867
Tranmsmetanlen:
1866
Tranmsmetanlen:
1868
 
1867
 
1869
MMXs:
1868
MMXs:
1870
    db 'MMX:         '
1869
    db 'MMX:         '
1871
MMXslen:
1870
MMXslen:
1872
 
1871
 
1873
mmxp:
1872
mmxp:
1874
    db 'MMX+:         '
1873
    db 'MMX+:         '
1875
mmxplen:
1874
mmxplen:
1876
 
1875
 
1877
HTT:
1876
HTT:
1878
    db 'HTT:          '
1877
    db 'HTT:          '
1879
HTTlen:
1878
HTTlen:
1880
 
1879
 
1881
HTTn:
1880
HTTn:
1882
    db 'HTT:         '
1881
    db 'HTT:         '
1883
HTTnlen:
1882
HTTnlen:
1884
 
1883
 
1885
sse3:
1884
sse3:
1886
    db 'SSE3:         '
1885
    db 'SSE3:         '
1887
sse3len:
1886
sse3len:
1888
now:
1887
now:
1889
    db '3DNOW!:         '
1888
    db '3DNOW!:         '
1890
nowlen:
1889
nowlen:
1891
nowp:
1890
nowp:
1892
    db '3DNOW!+:         '
1891
    db '3DNOW!+:         '
1893
nowplen:
1892
nowplen:
1894
 
1893
 
1895
;-Type
1894
;-Type
1896
 
1895
 
1897
t1      db      'OEM',0
1896
t1      db      'OEM',0
1898
t2      db      'Overdrive',0
1897
t2      db      'Overdrive',0
1899
t3      db      'Dual',0
1898
t3      db      'Dual',0
1900
t4      db      'Unknown',0
1899
t4      db      'Unknown',0
1901
 
1900
 
1902
;----------Intel
1901
;----------Intel
1903
P50:
1902
P50:
1904
db 'P5 A-step'
1903
db 'P5 A-step'
1905
P50len:
1904
P50len:
1906
P5:
1905
P5:
1907
db 'P5'
1906
db 'P5'
1908
P5len:
1907
P5len:
1909
P54T:
1908
P54T:
1910
db 'P24T Overdrive'
1909
db 'P24T Overdrive'
1911
P54Tlen:
1910
P54Tlen:
1912
P54C:
1911
P54C:
1913
db 'P54C'
1912
db 'P54C'
1914
P54Clen:
1913
P54Clen:
1915
P55C:
1914
P55C:
1916
db 'P55C (with MMX)'
1915
db 'P55C (with MMX)'
1917
P55Clen:
1916
P55Clen:
1918
; ---
1917
; ---
1919
P60:
1918
P60:
1920
db 'Pentium Pro A-step'
1919
db 'Pentium Pro A-step'
1921
P60len:
1920
P60len:
1922
P61:
1921
P61:
1923
db 'Pentium Pro'
1922
db 'Pentium Pro'
1924
P61len:
1923
P61len:
1925
P63:
1924
P63:
1926
db 'Pentium II (Klamath)'
1925
db 'Pentium II (Klamath)'
1927
P63len:
1926
P63len:
1928
P65:
1927
P65:
1929
db 'Pentium II (Deschutes)'
1928
db 'Pentium II (Deschutes)'
1930
P65len:
1929
P65len:
1931
P66:
1930
P66:
1932
db 'Celeron (Medocino)'
1931
db 'Celeron (Medocino)'
1933
P66len:
1932
P66len:
1934
P67:
1933
P67:
1935
db 'Pentium III (Katmai)'
1934
db 'Pentium III (Katmai)'
1936
P67len:
1935
P67len:
1937
P68:
1936
P68:
1938
db 'Pentium III (Coppermine)'
1937
db 'Pentium III (Coppermine)'
1939
P68len:
1938
P68len:
1940
P69:
1939
P69:
1941
db 'Pentium M (Banias)'
1940
db 'Pentium M (Banias)'
1942
P69len:
1941
P69len:
1943
P6A:
1942
P6A:
1944
db 'Pentium III Xeon (Cascades)'
1943
db 'Pentium III Xeon (Cascades)'
1945
P6Alen:
1944
P6Alen:
1946
P6B:
1945
P6B:
1947
db 'Pentium III (Tualatin)'
1946
db 'Pentium III (Tualatin)'
1948
P6Blen:
1947
P6Blen:
1949
P6D:
1948
P6D:
1950
db 'Pentium M (Dothan)'
1949
db 'Pentium M (Dothan)'
1951
P6Dlen:
1950
P6Dlen:
1952
P6E:
1951
P6E:
1953
db 'Pentium M (Yonah)/ Core'
1952
db 'Pentium M (Yonah)/ Core'
1954
P6Elen:
1953
P6Elen:
1955
P6F:
1954
P6F:
1956
db 'Pentium D (Conroe)/ Core 2 (Kentsfield)'
1955
db 'Pentium D (Conroe)/ Core 2 (Kentsfield)'
1957
P6Flen:
1956
P6Flen:
1958
;---
1957
;---
1959
PS0:
1958
PS0:
1960
db 'Itanium (IA-64)'
1959
db 'Itanium (IA-64)'
1961
PS0len:
1960
PS0len:
1962
;------------
1961
;------------
1963
PF0:
1962
PF0:
1964
db 'Pentium 4 (Willamete)'
1963
db 'Pentium 4 (Willamete)'
1965
PF0len:
1964
PF0len:
1966
PF2:
1965
PF2:
1967
db 'Pentium 4 (Northwood)'
1966
db 'Pentium 4 (Northwood)'
1968
PF2len:
1967
PF2len:
1969
PF3:
1968
PF3:
1970
db 'Pentium 4 (Prescott)'
1969
db 'Pentium 4 (Prescott)'
1971
PF3len:
1970
PF3len:
1972
PF5:
1971
PF5:
1973
db 'Pentium 4 (Tejas)'
1972
db 'Pentium 4 (Tejas)'
1974
PF5len:
1973
PF5len:
1975
PF6:
1974
PF6:
1976
db 'Pentium 4 (Presler)'
1975
db 'Pentium 4 (Presler)'
1977
PF6len:
1976
PF6len:
1978
;----------------Intel Celerons
1977
;----------------Intel Celerons
1979
P65c:
1978
P65c:
1980
db 'Celeron (Covington)'
1979
db 'Celeron (Covington)'
1981
P65clen:
1980
P65clen:
1982
P68c:
1981
P68c:
1983
db 'Celeron (Coppermine)'
1982
db 'Celeron (Coppermine)'
1984
P68clen:
1983
P68clen:
1985
P6Bc:
1984
P6Bc:
1986
db 'Celeron (Tualatin)'
1985
db 'Celeron (Tualatin)'
1987
P6Bclen:
1986
P6Bclen:
1988
PF0c:
1987
PF0c:
1989
db 'Celeron (Willamete)'
1988
db 'Celeron (Willamete)'
1990
PF0clen:
1989
PF0clen:
1991
PF2c:
1990
PF2c:
1992
db 'Celeron (Northwood)'
1991
db 'Celeron (Northwood)'
1993
PF2clen:
1992
PF2clen:
1994
PF3c:
1993
PF3c:
1995
db 'Celeron (Prescott)'
1994
db 'Celeron (Prescott)'
1996
PF3clen:
1995
PF3clen:
1997
PF5c:
1996
PF5c:
1998
db 'Celeron D (Texas)'
1997
db 'Celeron D (Texas)'
1999
PF5clen:
1998
PF5clen:
2000
PF6c:
1999
PF6c:
2001
db 'Celeron D (Presler)'
2000
db 'Celeron D (Presler)'
2002
PF6clen:
2001
PF6clen:
2003
;---------AMD
2002
;---------AMD
2004
A50     db 'K5 (PR75, PR90, PR100)',0
2003
A50     db 'K5 (PR75, PR90, PR100)',0
2005
A51     db '5k86 (PR120, PR133)',0
2004
A51     db '5k86 (PR120, PR133)',0
2006
A52     db '5k86 (PR166)',0
2005
A52     db '5k86 (PR166)',0
2007
A53     db '5k86 (PR200)',0
2006
A53     db '5k86 (PR200)',0
2008
A56     db 'K6',0
2007
A56     db 'K6',0
2009
A57     db 'K6',0
2008
A57     db 'K6',0
2010
A58     db 'K6-2',0
2009
A58     db 'K6-2',0
2011
A59     db 'K6-III',0
2010
A59     db 'K6-III',0
2012
A5D     db 'K6-2+ or K6-III+',0
2011
A5D     db 'K6-2+ or K6-III+',0
2013
;-------------------
2012
;-------------------
2014
At1     db 'Athlon',0
2013
At1     db 'Athlon',0
2015
At2     db 'Athlon',0
2014
At2     db 'Athlon',0
2016
At3     db 'Duron (Spitfire)',0
2015
At3     db 'Duron (Spitfire)',0
2017
At4     db 'Athlon (Thunderbird)',0
2016
At4     db 'Athlon (Thunderbird)',0
2018
At6     db 'AthlonXP (Palomino)',0
2017
At6     db 'AthlonXP (Palomino)',0
2019
At7     db 'Duron (Morgan)',0
2018
At7     db 'Duron (Morgan)',0
2020
At8     db 'AthlonXP (Thoroughbred)',0
2019
At8     db 'AthlonXP (Thoroughbred)',0
2021
At8a    db 'Duron (Applebred)',0
2020
At8a    db 'Duron (Applebred)',0
2022
Ata     db 'AthlonXP (Barton)',0
2021
Ata     db 'AthlonXP (Barton)',0
2023
Atat    db 'AthlonXP (Thorton)',0
2022
Atat    db 'AthlonXP (Thorton)',0
2024
;-------------------
2023
;-------------------
2025
AF1:
2024
AF1:
2026
db 'Dual-core Opteron'
2025
db 'Dual-core Opteron'
2027
AF1len:
2026
AF1len:
2028
AF3:
2027
AF3:
2029
db 'Athlon 64 (Toledo)'
2028
db 'Athlon 64 (Toledo)'
2030
AF3len:
2029
AF3len:
2031
AF4:
2030
AF4:
2032
db 'Athlon 64 (ClawHammer)'
2031
db 'Athlon 64 (ClawHammer)'
2033
AF4len:
2032
AF4len:
2034
AF5:
2033
AF5:
2035
db 'Opteron/Athlon 64 FX (SledgeHammer)'
2034
db 'Opteron/Athlon 64 FX (SledgeHammer)'
2036
AF5len:
2035
AF5len:
2037
 
2036
 
2038
AFC:
2037
AFC:
2039
db 'Athlon 64 (Newcastle)'
2038
db 'Athlon 64 (Newcastle)'
2040
AFClen:
2039
AFClen:
2041
 
2040
 
2042
AFF:
2041
AFF:
2043
db 'Athlon 64 (Winchester)'
2042
db 'Athlon 64 (Winchester)'
2044
AFFlen:
2043
AFFlen:
2045
 
2044
 
2046
AFS:
2045
AFS:
2047
db 'Athlon 64 (San Diego)'
2046
db 'Athlon 64 (San Diego)'
2048
AFSlen:
2047
AFSlen:
2049
 
2048
 
2050
AFV:
2049
AFV:
2051
db 'Athlon 64 (Venice)'
2050
db 'Athlon 64 (Venice)'
2052
AFVlen:
2051
AFVlen:
2053
 
2052
 
2054
AFCs:
2053
AFCs:
2055
db 'Sempron (Paris)'
2054
db 'Sempron (Paris)'
2056
AFCslen:
2055
AFCslen:
2057
 
2056
 
2058
AFCsp:
2057
AFCsp:
2059
db 'Sempron (Palermo)'
2058
db 'Sempron (Palermo)'
2060
AFCsplen:
2059
AFCsplen:
2061
 
2060
 
2062
;---------Cyrix
2061
;---------Cyrix
2063
C52:
2062
C52:
2064
db '6x86 M1'
2063
db '6x86 M1'
2065
C52len:
2064
C52len:
2066
C54:
2065
C54:
2067
db 'MediaGX'
2066
db 'MediaGX'
2068
C54len:
2067
C54len:
2069
C60:
2068
C60:
2070
db '6x86MX M2'
2069
db '6x86MX M2'
2071
C60len:
2070
C60len:
2072
C65:
2071
C65:
2073
db 'C3 (Cyrix M2)' ;?
2072
db 'C3 (Cyrix M2)' ;?
2074
C65len:
2073
C65len:
2075
;--------IDT
2074
;--------IDT
2076
V54:
2075
V54:
2077
db 'WinChip C6'
2076
db 'WinChip C6'
2078
V54len:
2077
V54len:
2079
V58:
2078
V58:
2080
db 'WinChip 2'
2079
db 'WinChip 2'
2081
V58len:
2080
V58len:
2082
V59:
2081
V59:
2083
db 'WinChip 3'
2082
db 'WinChip 3'
2084
V59len:
2083
V59len:
2085
;-------VIA
2084
;-------VIA
2086
V66:
2085
V66:
2087
db 'C3 (Samuel)'  ; Joshua is unreleased 065
2086
db 'C3 (Samuel)'  ; Joshua is unreleased 065
2088
V66len:
2087
V66len:
2089
V67:
2088
V67:
2090
db 'C3 (Samuel2/Ezra)' ; ?
2089
db 'C3 (Samuel2/Ezra)' ; ?
2091
V67len:
2090
V67len:
2092
V68:
2091
V68:
2093
db 'C3 (Ezra-T/Eden)' ;?
2092
db 'C3 (Ezra-T/Eden)' ;?
2094
V68len:
2093
V68len:
2095
V69:
2094
V69:
2096
db 'C3 (Antaur/Nehemiah)' ;?
2095
db 'C3 (Antaur/Nehemiah)' ;?
2097
V69len:
2096
V69len:
2098
VA:
2097
VA:
2099
db 'C7 (Esther)' ;?
2098
db 'C7 (Esther)' ;?
2100
VAlen:
2099
VAlen:
2101
;---------Transmeta
2100
;---------Transmeta
2102
T5:
2101
T5:
2103
db 'Crusoe' ;
2102
db 'Crusoe' ;
2104
T5len:
2103
T5len:
2105
TF:
2104
TF:
2106
db 'Efficeon' ;
2105
db 'Efficeon' ;
2107
TFlen:
2106
TFlen:
2108
;---------
2107
;---------
2109
NG:
2108
NG:
2110
    db 'Next generation CPU'
2109
    db 'Next generation CPU'
2111
NGlen:
2110
NGlen:
2112
 
2111
 
2113
stm:
2112
stm:
2114
    db 'Internal name:'
2113
    db 'Internal name:'
2115
stmlen:
2114
stmlen:
2116
 
2115
 
2117
athloncoef	db	110, 115, 120, 125, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 120
2116
athloncoef	db	110, 115, 120, 125, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 120
2118
		db	190, 120, 200, 130, 135, 140, 210, 150, 220, 160, 165, 170, 180, 230, 240
2117
		db	190, 120, 200, 130, 135, 140, 210, 150, 220, 160, 165, 170, 180, 230, 240
2119
athlonmcoef:	db	110, 115, 120, 125, 50, 55, 60, 65,  70, 75, 80, 85, 90, 95, 100, 105
2118
athlonmcoef:	db	110, 115, 120, 125, 50, 55, 60, 65,  70, 75, 80, 85, 90, 95, 100, 105
2120
		db	30, 190, 40, 200, 130, 135, 14, 210, 150, 220, 160, 165, 170, 230, 240
2119
		db	30, 190, 40, 200, 130, 135, 14, 210, 150, 220, 160, 165, 170, 230, 240
2121
athloncoef3	db	45, 50, 40, 55, 25, 30, 60, 35
2120
athloncoef3	db	45, 50, 40, 55, 25, 30, 60, 35
2122
p4coef		db	160, 170, 180, 190, 200, 210, 220, 230, 80, 90, 100, 110, 120, 130, 140, 150	; Pentium 4 (Willamete)
2121
p4coef		db	160, 170, 180, 190, 200, 210, 220, 230, 80, 90, 100, 110, 120, 130, 140, 150	; Pentium 4 (Willamete)
2123
coppercoeff	db	 50, 30, 40, 20, 55, 35,  45, 25,  35, 70, 80, 60, 20, 75, 15, 65, 90, 110, 120, 20, 95, 115, 85, 25, 35, 70,  80, 100,  20, 75,  15, 105
2122
coppercoeff	db	 50, 30, 40, 20, 55, 35,  45, 25,  35, 70, 80, 60, 20, 75, 15, 65, 90, 110, 120, 20, 95, 115, 85, 25, 35, 70,  80, 100,  20, 75,  15, 105
2124
tualatcoeff	db	120, 35, 35, 40, 55, 35, 115, 35, 160, 70, 80, 60, 40, 75, 35, 65, 90, 110,  35, 35, 95,  35, 85, 35, 35, 35, 130, 100, 140, 35, 150, 105
2123
tualatcoeff	db	120, 35, 35, 40, 55, 35, 115, 35, 160, 70, 80, 60, 40, 75, 35, 65, 90, 110,  35, 35, 95,  35, 85, 35, 35, 35, 130, 100, 140, 35, 150, 105
2125
 
2124
 
2126
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2125
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2127
;
2126
;
2128
;  include images and unpacking- and hasharea
2127
;  include images and unpacking- and hasharea
2129
;
2128
;
2130
include 'logos.inc' ; include file where gif's are stored
2129
include 'logos.inc' ; include file where gif's are stored
2131
img_area:	   ; image is going to be unpacked to here
2130
img_area:	   ; image is going to be unpacked to here
2132
rb 201*49*3+8	   ; image resolution (bits to reserve)
2131
rb 201*49*3+8	   ; image resolution (bits to reserve)
2133
 
2132
 
2134
img_area2:	   ; image is going to be unpacked to here
2133
img_area2:	   ; image is going to be unpacked to here
2135
rb 93*24*3+8	   ; image resolution (bits to reserve)
2134
rb 93*24*3+8	   ; image resolution (bits to reserve)
2136
 
-
 
2137
gif_hash_area:
-
 
2138
rd 4096+1	   ;hash area size for unpacking gif
2135
 
2139
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2136
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2140
 
2137
 
2141
I_END:
2138
I_END:
2142
 
2139
 
2143
; RSA test data
2140
; RSA test data
2144
align 4
2141
align 4
2145
  num1 rd 40
2142
  num1 rd 40
2146
  num2 rd 40
2143
  num2 rd 40
2147
  num3 rd 40
2144
  num3 rd 40
2148
  iter rd 1
2145
  iter rd 1
2149
  openkey rd 1
2146
  openkey rd 1
2150
 
-
 
2151
; GIF unpacker data
-
 
2152
    globalColor dd ?
-
 
2153
    img_count dd ?
-
 
2154
    cur_info dd ?	 ; image table pointer
2147
 
2155
    codesize dd ?
-
 
2156
    compsize dd ?
-
 
2157
    bit_count dd ?
-
 
2158
    CC dd ?
-
 
2159
    EOI dd ?
-
 
2160
    Palette dd ?
-
 
2161
    block_ofs dd ?
-
 
2162
    table_ptr dd ?
-
 
2163
 
2148
IncludeUGlobals
2164
 
2149
 
2165
ost dd ?
2150
ost dd ?
2166
sot dd ?
2151
sot dd ?
2167
f dd ?
2152
f dd ?
2168
m dd ?
2153
m dd ?
2169
s dd ?
2154
s dd ?
2170
t dd ?
2155
t dd ?
2171
 
2156
 
2172
ef dd ?
2157
ef dd ?
2173
em dd ?
2158
em dd ?
2174
 
2159
 
2175
multiplier dd ?
2160
multiplier dd ?
2176
multa dd ?
2161
multa dd ?
2177
multb dd ?
2162
multb dd ?
2178
 
2163
 
2179
smallvendor dd ?
2164
smallvendor dd ?
2180
L1d  dd ?
2165
L1d  dd ?
2181
L1i  dd ?
2166
L1i  dd ?
2182
L2   dd ?
2167
L2   dd ?
2183
L3   dd ?
2168
L3   dd ?
2184
micron dd ?
2169
micron dd ?
2185
brand dd ?
2170
brand dd ?
2186
 
2171
 
2187
ram_size_a dd ?
2172
ram_size_a dd ?
2188
ram_size_t dd ?
2173
ram_size_t dd ?
2189
 
2174
 
2190
stdc dd ?
2175
stdc dd ?
2191
extc dd ?
2176
extc dd ?
2192
 
2177
 
2193
FRS dd ?
2178
FRS dd ?
2194
freqsel db ?
2179
freqsel db ?
2195
sse3sup db ?
2180
sse3sup db ?
2196
 
2181
 
2197
freqbb dd ?
2182
freqbb dd ?
2198
freqll dd ?
2183
freqll dd ?
2199
 
2184
 
2200
wayli dd ?
2185
wayli dd ?
2201
lineli dd ?
2186
lineli dd ?
2202
 
2187
 
2203
wayld dd ?
2188
wayld dd ?
2204
lineld dd ?
2189
lineld dd ?
2205
 
2190
 
2206
wayl2 dd ?
2191
wayl2 dd ?
2207
linel2 dd ?
2192
linel2 dd ?
2208
 
2193
 
2209
wayl3 dd ?
2194
wayl3 dd ?
2210
linel3 dd ?
2195
linel3 dd ?
2211
 
2196
 
2212
;number_of_log_cpus dd ?
2197
;number_of_log_cpus dd ?
2213
 
2198
 
2214
che db ? ; numbers of calls for Intel caches detection
2199
che db ? ; numbers of calls for Intel caches detection
2215
 
2200
 
2216
myname:
2201
myname:
2217
   rb 48
2202
   rb 48
2218
mynamelen:
2203
mynamelen:
2219
 
2204
 
2220
align 4
2205
align 4
2221
 
2206
 
2222
  thread2_stack_area rb 64
2207
  thread2_stack_area rb 64
2223
  thread2_esp = $
2208
  thread2_esp = $
2224
U_END:
2209
U_END: