Subversion Repositories Kolibri OS

Rev

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