Subversion Repositories Kolibri OS

Rev

Rev 450 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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