Subversion Repositories Kolibri OS

Rev

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

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