Subversion Repositories Kolibri OS

Rev

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