Subversion Repositories Kolibri OS

Rev

Rev 3587 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

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