Subversion Repositories Kolibri OS

Rev

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

  1. ;******************************************************************************
  2. ; project name:  CPUID                                                        *
  3. ; platform:      KolibriOS, x86 (IA-32), x86-64 achitectures                  *
  4. ; compiler:      flat assembler 1.70.03                                       *
  5. ; version:       2.29                                                         *
  6. ; last update:   12 October 2014                                              *
  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-2014 Sergey Kuzmin and co-authors             *
  11. ;                Rules:                                                       *
  12. ;                1)you can use pieces of code in your project, but should     *
  13. ;                mention the original author (include copyright notice);      *
  14. ;                2)if you modify CPUID (improve, port, translate,  etc) send   *
  15. ;                your changes to the maintainer or make about post changes    *
  16. ;                at forum  http://board.kolibrios.org/viewtopic.php?f=42&t=594*
  17. ;-----------------------------------------------------------------------------*
  18. ; English comments                                                            *
  19. ;------------------------------------------------------------------------------
  20. use32
  21.   org    0x0
  22.   db     'MENUET01'
  23.   dd     0x01
  24.   dd     START
  25.   dd     I_END
  26.   dd U_END+4096
  27.   dd U_END+4096
  28.   dd     0x0
  29.   dd     path
  30.  
  31. include '..\..\..\develop\libraries\box_lib\load_lib.mac'
  32. include '..\..\..\macros.inc'
  33. include 'lang.inc'
  34. include 'draw.inc'
  35. include 'brand.inc'     ; brand ID decoding
  36. include 'caches.inc'    ; L1 and L2 cashes decoding for Intel
  37. include 'multipli.inc'  ; multiplier decoding
  38. include 'features.inc'  ; features decoding
  39. include 'logos.inc'     ; include file where gif's are stored
  40. include 'rsatest.inc'
  41. include 'variable.inc'
  42. include 'gif_lite.inc'
  43.  
  44. @use_library
  45.  
  46. START:
  47.         mcall   68,11
  48.         mcall   66,1,1
  49.  
  50. load_libraries l_libs_start,end_l_libs
  51. ;-----------------------------------------------------------------------------
  52. ;OpenDialog     initialisation
  53.         push    dword OpenDialog_data
  54.         call    [OpenDialog_Init]
  55.  
  56.         mov     edi,filename_area
  57.         mov     esi,start_temp_file_name
  58.         call    copy_file_name_path
  59. ;-----------------------------------------------------------------------------
  60.         mcall   68,12,4096*8 ; 16 Kb - I hope this will be enough for store of data
  61.         mov     [store_text_area_start],eax
  62.  
  63.  
  64. ;------------
  65. CYCLES:
  66. ;   CPU speed
  67.     mov eax, 18
  68.     mov ebx,5
  69.     mcall
  70.     mov [total1],eax  ;in Hz,  example 1600490000
  71.     xor  edx,edx
  72.     mov  ebx,1000000
  73.     div  ebx
  74.     mov [total], eax  ; in Mhz,  example 1600
  75.     xor edx, edx
  76.     mov eax, [total1]
  77.     mov ebx, 10000
  78.     div ebx
  79.     mov [ost], eax    ; example 160049
  80.     mov ecx, [total]
  81.     imul ecx, 100
  82.     neg  ecx
  83.     add  ecx, eax
  84.     mov [sot], ecx    ; example 49
  85. ;------------
  86. cpu:                  ;is CPUID supported?
  87.   pushfd              ;push original EFLAGS
  88.   pop eax             ;get original EFLAGS
  89.   mov ebx, eax        ;save original EFLAGS
  90.   xor eax, 00200000h  ;flip 21th bit in EFLAGS
  91.   push eax            ;save new EFLAGS value on stack
  92.   popfd               ;replace current EFLAGS value
  93.   pushfd              ;get new EFLAGS
  94.   pop eax             ;store new EFLAGS in EAX
  95.   cmp eax, ebx        ;compare values of 21th bit
  96.   jz NO_CPUID         ;CPUID isn't supported
  97. ;------------
  98. CPUNAME:              ; VENDOR
  99.     mov   eax,0       ; eax=0
  100.     cpuid
  101.  
  102.     mov [stdc], eax   ; number of calls
  103.     mov   [cpuname+ 12],ebx
  104.     mov   [cpuname+ 16],edx
  105.     mov   [cpuname+ 20],ecx
  106.     mov   [smallvendor],ecx
  107.  
  108. ; for various vendors we should later use different methods
  109.  
  110. ;Decoding cache L1 and L2 for Intel
  111.  
  112.   cmp ecx, 'ntel'
  113.   jne cpu1     ;is not Intel
  114.  
  115. ;Starting L1, L2, L3 caches detection (Intel made it VERY HARD)
  116.  
  117. mov eax, 2
  118. cpuid
  119.  
  120. mov [che], al        ; number of calls
  121. multik:
  122.  
  123. .eaxl:
  124. test  eax, eax       ;    Test bit 31
  125. js    .ebxl          ;    <> 0 =>invalid values
  126. call decodecache24
  127. .ebxl:
  128. test  ebx, ebx
  129. js    .ecxl
  130. mov eax, ebx
  131. call decodecache32
  132. .ecxl:
  133. test  ecx, ecx
  134. js    .edxl
  135. mov eax, ecx
  136. call decodecache32
  137. .edxl:
  138. test  edx, edx
  139. js    cpu1
  140. mov eax, edx
  141. call decodecache32
  142.  
  143. dec [che]    ; we made all calls
  144. je cpu1
  145.  
  146. multi: ; not yet
  147.  
  148. mov eax, 2  ; so we made call again
  149. cpuid
  150.  
  151. jmp multik
  152.  
  153. ;  FAMILY MODEL STEPPING
  154. cpu1:
  155.     xor eax, eax
  156.     inc eax       ; eax=1
  157.     cpuid
  158.  
  159. mov ecx, eax
  160. shr ecx,8         ;   shift it to the correct position
  161. and ecx,0000000Fh ;   get CPU family
  162. mov dword[f],ecx
  163.  
  164. mov ecx, eax
  165. shr ecx,4
  166. and ecx,0000000Fh ;    get CPU model
  167. mov dword[m],ecx
  168.  
  169. mov ecx, eax
  170. and ecx,0000000Fh ;   get CPU stepping
  171. mov dword[s],ecx
  172.  
  173. ;-
  174. mov ecx, eax      ; get Type
  175. shl ecx, 18
  176. shr ecx,30
  177. ;and ecx, 0000000Fh ; only two lower bits can be nonzero
  178. mov dword[t], ecx
  179. ;=======================================================
  180.  
  181. cmp dword[smallvendor], 'cAMD'
  182. jz maybe_athlon
  183. cmp dword[smallvendor], 'ntel'
  184. jnz no_full   ; if not AMD or Intel
  185.  
  186. ;detect_it:
  187. ;cmp [f], 0Fh
  188. ;jne no_full   fixed calculation of extended model for Intel
  189.  
  190. full:
  191.  
  192. mov ecx, eax          ; get Extended model
  193. shr ecx,16            ;shift it to the correct position
  194. and ecx, 0000000Fh
  195. shl ecx, 4
  196. mov dword[newpc],ecx     ;  this value for old pc=0 and for new pc>0
  197. add ecx, [m]
  198. mov dword[em],ecx     ;  effective    model
  199.  
  200. mov ecx, eax          ; get Extended family
  201. shr ecx, 20           ;shift it to the correct position
  202. and ecx, 000000FFh
  203. add ecx, [f]
  204. mov dword[ef],ecx     ; effective family
  205.  
  206.  
  207. jmp fut
  208.  
  209. no_full:
  210.  
  211. mov ecx, [m]
  212. mov [em], ecx
  213.  
  214. mov ecx, [f]
  215. mov [ef], ecx
  216.  
  217. jmp fut
  218.  
  219. maybe_athlon:
  220. mov eax, 0x80000001               ; CPUID ext. function 0x80000001
  221. cpuid
  222. mov ecx, eax
  223. shr ecx,8         ;   shift it to the correct position
  224. and ecx,0000000Fh ;   get CPU family
  225. mov dword[ef],ecx
  226.  
  227. mov ecx, eax
  228. shr ecx,4
  229. and ecx,0000000Fh ;    get CPU model
  230. mov dword[em],ecx
  231.  
  232. fut:
  233.  
  234. call decode_sse3_5
  235.  
  236.  
  237.  
  238. ;call decode_sse3_5
  239. ;-
  240.     call decode_extended
  241.  
  242.     mov   eax,$80000000
  243.     cpuid
  244.  
  245.     mov   [extc], eax  ; max number of calls
  246.  
  247.   test  eax, $80000000 ;// Test bit 31
  248.   jz .noname
  249.  
  250.   cmp  eax,$80000003
  251.   ja .mynameis
  252.   jmp .noname
  253.  
  254. .mynameis:
  255.     mov       eax,$80000002
  256.     cpuid
  257.     mov   [myname],eax
  258.     mov   [myname+4],ebx
  259.     mov   [myname+8],ecx
  260.     mov   [myname+12],edx
  261.     mov   eax,$80000003
  262.     cpuid
  263.     mov   [myname+16],eax
  264.     mov   [myname+20],ebx
  265.     mov   [myname+24],ecx
  266.     mov   [myname+28],edx
  267.     mov   eax,$80000004
  268.     cpuid
  269.     mov   [myname+32],eax
  270.     mov   [myname+36],ebx
  271.     mov   [myname+40],ecx
  272.     mov   [myname+44],edx
  273.     jmp   red
  274.  
  275. .noname:
  276. red:
  277.  
  278. ;mov byte [multiplier], 115;     ; for testing
  279.  
  280. call decode_sse3
  281.  
  282. call multipl                          ; get multiplier
  283. mov byte [multiplier], cl
  284.  
  285. mov   dword [freqbb], 0
  286. mov   dword [freqll], 0
  287.  
  288. mov   ebx, dword [multiplier]
  289. test  ebx, ebx
  290. jz output
  291.  
  292. calc:
  293.  
  294. mov eax,dword [ost]   ; example 166474
  295. imul eax, 10          ; example 1664740
  296. xor edx,edx
  297. div ebx               ; get system clock (if multiplier detected)
  298.  
  299. xor edx, edx                    ; example eax=16647
  300. mov ebx, 100
  301. div ebx
  302. mov dword [freqbb], eax         ; example 166
  303. mov dword [freqll], edx         ; example 47
  304.  
  305. xor edx, edx
  306.     mov eax,dword[multiplier]  ; example 115
  307.     mov  ebx,10
  308.     div  ebx
  309.     mov dword[multb], eax  ;   example 11
  310.     mov dword[multa], edx    ; example 5
  311.  
  312. output:
  313.  
  314.    call draw_window    ;     Draw window
  315.  
  316. ;HRERE
  317.  
  318. PROCCORE:    ;   Who are you?
  319. ; Intel - "GenuineIntel"           +
  320. ; AMD - "AuthenticAMD"             +
  321. ; Cyrix - "CyrixInstead"           +
  322. ; UMC - "UMC UMC UMC "
  323. ; NexGen - "NexGenDriven"
  324. ; Centaur - "CentaurHauls"         +
  325. ; Rise Technology - "RiseRiseRise"
  326. ; SiS - "SiS SiS SiS "
  327. ; Transmeta - "GenuineTMx86"       +
  328. ; National Semiconductor - "Geode by NSC"
  329. ; Vortex - "Vortex86 SoC"       + initial support
  330.   cmp dword[smallvendor], 'ntel'   ;1
  331.   jz Intel
  332.   cmp dword[smallvendor], 'cAMD'   ;2
  333.   jz AMD
  334.   cmp dword[smallvendor], 'tead'   ;3
  335.   jz Cyrix
  336.   cmp dword[smallvendor], 'auls'    ;4
  337.   jz Centaur
  338.   cmp dword[smallvendor], 'Mx86'    ;5
  339.   jz Transmeta
  340.   cmp dword[smallvendor], ' SoC'    ;6
  341.   jz Vortex
  342.  
  343. ; cmp ecx, 'UMC '
  344. ; jz .UMC
  345. ; cmp ecx, 'iven'
  346. ; jz .NexGen
  347. ; cmp ecx, 'Rise'
  348. ;  jz .Rise
  349. ; cmp ecx, 'SiS '
  350. ; jz .SiS
  351. ; cmp ecx, ' NSC'
  352. ; jz .NSC
  353. ; jmp Other   ;  I don't know what to do with you...
  354. Other:
  355. Text 75,70,0x00000000,other, otherlen-other
  356.  
  357. mov esi, other
  358. mov edi, [saveproc]
  359. call concatname
  360.  
  361.     jmp MMXtest
  362. ;-------------------------
  363.  
  364. AMD:
  365.  
  366. ;-------------------------------------------------------------------------------
  367.  
  368. Text 15, 190,0x00000000,cache, cachelen-cache
  369.  
  370. Text 75,70,,AMDn, AMDnlen-AMDn
  371. mov esi, AMDnNew
  372. mov edi, saveproc
  373. call concatname
  374.         mov     esi, amd
  375.         call    load_gif
  376. PutImage 135,107,201,49,img_area+8
  377. MOV [codeN], 2
  378. ;         place   size
  379.  
  380. ; Relax, man. AMD made PRETTY SIMPLE cache detection routine
  381. ;CACHE1:
  382. mov eax, 80000005h
  383.     cpuid
  384.  
  385. movzx eax, cl
  386. mov [lineld], eax
  387.  
  388. mov eax, ecx
  389. ;shl eax, 8
  390. ;shr eax, 24
  391.  
  392. and eax,00FF0000h
  393. shr eax, 16
  394. mov [wayld], eax
  395.  
  396. shr ecx, 24
  397. mov [L1d], ecx
  398.  
  399.  
  400. movzx eax, dl
  401. mov [lineli], eax
  402.  
  403. mov eax, edx
  404. ;shl eax, 8
  405. ;shr eax, 24
  406.  
  407. and eax,00FF0000h
  408. shr eax, 16
  409. mov [wayli], eax
  410.  
  411.  
  412. shr edx, 24
  413. mov [L1i], edx
  414.  
  415.  
  416. ;CACHE2:
  417. mov eax, 80000006h
  418.     cpuid
  419.  
  420. movzx eax, cl
  421. mov dword[linel2], eax
  422.  
  423. push ecx
  424. shr ecx, 12+1
  425. and ecx, 0x7
  426. mov eax, 1
  427. shl eax, cl
  428. mov dword [wayl2], eax
  429. pop ecx
  430.  
  431. shr ecx, 16
  432. mov [L2],ecx
  433.  
  434. ;CACHE3: edx provides l3
  435.  
  436. mov eax, 80000006h
  437.     cpuid
  438.  
  439. movzx eax, cl       ;mov cl to eax, zero extend; cl is counter reg for loop,shifts
  440. mov dword[linel3], eax
  441.  
  442. push edx
  443. shr edx, 12+1
  444. and edx, 0x7
  445. mov eax, 1
  446. shl eax, cl
  447. mov dword [wayl3], eax
  448. pop edx
  449.  
  450. shr edx, 18
  451. mov [L3],ecx
  452.  
  453.     cmp [f], $5
  454.     jz .fiv
  455.     cmp [f], $6
  456.     jz .si
  457.     cmp [f], $F
  458.     jz fif
  459.     cmp [f], $10   ;family 16, 010h,
  460.     jz ten
  461.  
  462.  
  463. .fiv:    ;     Family=5
  464.         mov     [micron], 50
  465.         mov     edx, A50
  466.         cmp     [m], $0
  467.         jz      @f
  468.         mov     [micron], 35
  469.         mov     edx, A51
  470.         cmp     [m], $1
  471.         jz      @f
  472.         mov     edx, A52
  473.         cmp     [m], $2
  474.         jz      @f
  475.         mov     edx, A53
  476.         cmp     [m], $3
  477.         jz      @f
  478.         mov     [micron], 30
  479.         mov     edx, A56
  480.         cmp     [m], $6
  481.         jz      @f
  482.         mov     [micron], 25
  483.         mov     edx, A57
  484.         cmp     [m], $7
  485.         jz      @f
  486.         mov     edx, A58
  487.         cmp     [m], $8
  488.         jz      @f
  489.         mov     edx, A59
  490.         cmp     [m], $9
  491.         jz      @f
  492.         mov     [micron], 18
  493.         mov     edx, A5D
  494. @@:
  495.         jmp     @f
  496.  
  497. .si:   ;    Family=6
  498.         mov     [micron], 25
  499.         mov     edx, At1
  500.         cmp     [m], $1
  501.         jz      @f
  502.         mov     [micron], 18
  503.         mov     edx, At2
  504.         cmp     [m], $2
  505.         jz      @f
  506.         mov     edx, At3
  507.         cmp     [m], $3
  508.         jz      @f
  509.         mov     edx, At4
  510.         cmp     [m], $4
  511.         jz      @f
  512.         cmp     [m], $6
  513.         jz      A6
  514.         mov     [micron], 13
  515.         mov     edx, At7
  516.         cmp     [m], $7
  517.         jz      @f
  518.         cmp     [m], $8
  519.         jz      A8
  520.         jmp     AA
  521. @@:
  522.         Text    100,70,0x80000000
  523.         jmp     MMXtest
  524. A6:
  525. ;mov     [FRS], 266  ;!!!!!!
  526. ;Number  315,90,0,3,dword [FRS],0x000000; MHz
  527.  
  528.         call    newrating; !!!!
  529.  
  530.         Text    245,70,0x00000000,pr, prlen-pr
  531.         Number  310,70,0,4,dword [rating],0x000000
  532.         mov     edx, At6
  533.         jmp     @b
  534.  
  535. A8:
  536.  
  537. ;mov     [FRS], 266     ;!!!!!!
  538. ;Number  315,90,0,3,dword [FRS],0x000000; MHz
  539.  
  540.         cmp     [L2], 256
  541.         jl      .App  ; Applebred
  542.  
  543.         call    newrating;!!!!
  544.  
  545.         Text    245,70,0x00000000,pr, prlen-pr
  546.         Number  310,70,0,4,dword [rating],0x000000
  547.         mov     edx, At8
  548.         jmp     @b
  549.  
  550. .App:
  551.         mov     edx, At8a
  552.         jmp     @b
  553.  
  554. AA:
  555.  
  556. ;        mov     [FRS], 333; !!!!
  557.         Text    245,70,0x00000000,pr, prlen-pr
  558.  
  559. ;        Number  315,90,0,3,dword [FRS],0x000000; MHz
  560.  
  561.         mov     edx, Atat
  562.         cmp     [L2], 256
  563.         jl      .Tho ; Thorton
  564.         mov     edx, Ata
  565. .Tho:
  566.         push    edx
  567.  
  568.         call    newrating;!!!!!
  569.  
  570.         Number  310,70,0,4,dword [rating],0x000000
  571.         pop     edx
  572.         jmp     @b
  573.  
  574. fif:  ;  AMD-64    Family=15
  575.  
  576. ;here is a need to rewrite detection of AMD F-th family according to "Revision Guide for
  577. ;AMD AthlonTM 64 and  AMD OpteronTM  Processors" 25759.pdf
  578.  
  579.  
  580.    cmp [m],$1   ;Dual-core Opteron
  581.     jz   AF1.
  582.    cmp [m],$3   ;Toledo 1024 0.09
  583.     jz  AF3.
  584.    cmp [m],$4   ;Athlon 64 Mobile Athlon 64 FX  ClawHammer (1024) 0.13
  585.     jz AF4.
  586.    cmp [m],$5   ;Opteron Athlon 64 FX 0.13 (1024)
  587.     jz AF5.
  588.    cmp [m],$7   ;Athlon 64 Athlon 64 FX  Clawhammer(1024) 0.13   Sledgehammer(1024)  0.13  // SSE3+ SanDiego(1024)
  589.     jz AF7.
  590.    cmp [m],$8   ;Athlon 64 Mobile Athlon 64 FX ClawHammer (1024) 0.13
  591.     jz AF8.
  592.    cmp [m],$B   ;Athlon 64
  593.     jz AFB.
  594.    cmp [m],$C   ;Athlon 64 Newcastle(512) 0.13  Sempron> Paris (256)   0.13  |SSE3+ Sempron >  Palermo FC0 0.09  // (Venice)
  595.     jz AFC.
  596.    cmp [m],$E   ;Athlon 64
  597.     jz AFE.
  598.    cmp [m],$F   ;Athlon 64 Winchester(512) |SSE3+ SanDiego(1024)  Venice (512)  Palermo (256) 0.09
  599.     jz AFF.
  600.     jmp next_generation
  601.  
  602. ten:      ;family = 10h
  603.  
  604. cmp [m],$2
  605.    jz AB23.
  606. cmp [m], $8
  607.    jz AB83.
  608. cmp [m], $9
  609.   jz AB9.
  610. cmp [m], $2
  611.   jz AB8check2.
  612.  
  613. AB8check2.:
  614. cmp [s],03h
  615.     jz AB8right2.
  616. cmp [m],$2
  617.   jz athlonCheck
  618.  
  619. athlonCheck:
  620. cmp [s],03h
  621.     jz athlonKuma
  622.  
  623. cmp [m], $5
  624.  jz AB4.
  625. cmp [m],$1
  626.    jz AB1.
  627. cmp [m],$4
  628.     jz AB8check.
  629.  
  630. AB8check.:
  631. cmp [s],02h
  632.     jz ABC2.
  633. cmp [s],01h
  634.      jz ABC3.
  635. cmp [m], $9
  636.     jz AB6.
  637. cmp [m], $2
  638.     jz AB8check.
  639. cmp [m], 06h
  640.       jz ABM.
  641.  
  642. athlonKuma:
  643.       mov [micron], 65
  644.       Text 100,70,0x00000000,AthlonKuma, AthlonKumalen-AthlonKuma
  645.       mov esi, AthlonKuma
  646.       mov edi, saveproc + 0x4
  647.       call concatname
  648.       jmp MMXtest
  649.  
  650. AB23.:
  651.       mov [micron], 65
  652.       Text 100,70,0x00000000,AB23, AB23len-AB23
  653.       mov esi, AB23
  654.       mov edi, saveproc + 0x4
  655.       call concatname
  656.       jmp MMXtest
  657.  
  658. AB83.:
  659.       mov [micron], 65
  660.       Text 100,70,0x00000000,AB83, AB83len-AB83
  661.       mov esi, AB83
  662.       mov edi, saveproc + 0x4
  663.       call concatname
  664.       jmp MMXtest
  665.  
  666. AB9.:
  667.       mov [micron], 65
  668.       Text 100,70,0x00000000,AB9, AB9len-AB9
  669.       mov esi, AB9
  670.       mov edi, saveproc + 0x4
  671.       call concatname
  672.       jmp MMXtest
  673.  
  674. AB8right2.:
  675.        mov [micron], 65
  676.       Text 100,70,0x00000000,AB8right2, AB8right2len-AB8right2
  677.       mov esi, AB8right2
  678.       mov edi, saveproc + 0x4
  679.       call concatname
  680.       jmp MMXtest
  681.  
  682. AB4.:
  683.       mov [micron], 45
  684.       Text 100,70,0x00000000,AB4, AB4len-AB4
  685.       mov esi, AB4
  686.       mov edi, saveproc + 0x4
  687.       call concatname
  688.       jmp MMXtest
  689.  
  690. AB1.:
  691.       mov [micron], 65
  692.       Text 100,70,0x00000000,AB1, AB1len-AB1
  693.       mov esi, AB1
  694.       mov edi, saveproc + 0x4
  695.       call concatname
  696.       jmp MMXtest
  697.  
  698. ABC2.:
  699.       mov [micron], 45
  700.       Text 100,70,0x00000000,ABC2, ABC2len-ABC2
  701.       mov esi, ABC2
  702.       mov edi, saveproc + 0x4
  703.       call concatname
  704.       jmp MMXtest
  705.  
  706. AB6.:
  707.       mov [micron], 45
  708.       Text 100,70,0x00000000,AB6, AB6len-AB6
  709.       mov esi, AB6
  710.       mov edi, saveproc + 0x4
  711.       call concatname
  712.       jmp MMXtest
  713.  
  714. ABC3.:
  715.       mov [micron], 45
  716.       Text 100,70,0x00000000,ABC3, ABC3len-ABC3
  717.       mov esi, ABC3
  718.       mov edi, saveproc + 0x4
  719.       call concatname
  720.       jmp MMXtest
  721.  
  722. ABM.:
  723.       mov [micron], 45
  724.       Text 100,70,0x00000000,ABM2, ABM2len-ABM
  725.       mov esi, ABM2
  726.       mov edi, saveproc + 0x4
  727.       call concatname
  728.       jmp MMXtest
  729.  
  730. AF1.:
  731.     mov [micron], 09  ;?
  732.     Text 100,70,0x00000000,AF1, AF1len-AF1
  733.     mov esi, AF1
  734.     mov edi, saveproc + 0x4
  735.     call concatname
  736.     jmp MMXtest
  737. AF3.:
  738.     mov [micron], 09
  739.     Text 100,70,0x00000000,AF3, AF3len-AF3
  740.     mov esi, AF3
  741.     mov edi, saveproc + 0x4
  742.     call concatname
  743.     jmp MMXtest
  744. AF4.:
  745.     mov [micron], 13
  746.     Text 100,70,0x00000000,AF4, AF4len-AF4
  747.     mov esi, AF4
  748.     mov edi, saveproc + 0x4
  749.     call concatname
  750.     jmp MMXtest
  751. AF5.:
  752.     mov [micron], 13
  753.     Text 100,70,0x00000000,AF5, AF5len-AF5
  754.     jmp MMXtest
  755.  
  756. AF7.:
  757.     mov [micron], 13
  758.     Text 100,70,0x00000000,AF5, AF5len-AF5
  759.     mov esi, AF5
  760.     mov edi, saveproc + 0x4
  761.     call concatname
  762.     jmp MMXtest
  763.  
  764. AF8.:
  765.    mov [micron], 13
  766.    Text 100,70,0x00000000,AF4, AF4len-AF4
  767.    mov esi, AF4
  768.     mov edi, saveproc + 0x4
  769.     call concatname
  770.    jmp MMXtest
  771.  
  772. AFB.:
  773.     mov [micron], 13
  774.     Text 100,70,0x00000000,AF4, AF4len-AF4
  775.     mov esi, AF4
  776.     mov edi, saveproc + 0x4
  777.     call concatname
  778.  jmp MMXtest
  779.  
  780. AFC.:
  781. cmp [L2], 512
  782. je AFC.n
  783.  
  784. cmp [sse3sup], 1
  785. je AFC.npal
  786.  
  787. AFC.npar:  ; paris
  788.     mov [micron], 13
  789.     Text 100,70,0x00000000,AFCs, AFCslen-AFCs
  790.     mov esi, AFCs
  791.     mov edi, saveproc + 0x4
  792.     call concatname
  793.     jmp MMXtest
  794.  
  795. AFC.npal: ; palermo
  796.     mov [micron], 9
  797.     Text 100,70,0x00000000,AFCsp, AFCsplen-AFCsp
  798.     mov esi, AFCsp
  799.     mov edi, saveproc + 0x4
  800.     call concatname
  801.     jmp MMXtest
  802.  
  803. AFC.n: ;newcastle
  804.     mov [micron], 13
  805.     Text 100,70,0x00000000,AFC, AFClen-AFC
  806.     mov esi, AFC
  807.     mov edi, saveproc + 0x4
  808.     call concatname
  809.     jmp MMXtest
  810.  
  811. AFE.:   ; error in cpu
  812.  jmp AFC.
  813.  
  814. AFF.:
  815.  
  816. cmp [sse3sup], 1
  817. je .AFFsse
  818.  
  819. .win:
  820. mov [micron], 9    ; winchester
  821. jmp MMXtest
  822.  
  823. .AFFsse:
  824. mov [micron], 9
  825. cmp [L2], 1024
  826. jz .AFs
  827. cmp [L2], 512
  828. jz .AFd
  829. cmp [L2], 256
  830. jz .AFp
  831.  
  832. .AFs:
  833. Text 100,70,0x00000000,AFS, AFSlen-AFS
  834.  mov esi, AFS
  835.  mov edi, saveproc + 0x4
  836.  call concatname
  837.  jmp MMXtest
  838.  
  839. .AFd:
  840. Text 100,70,0x00000000,AFV, AFVlen-AFV
  841. mov esi, AFV
  842.     mov edi, saveproc + 0x4
  843.     call concatname
  844.  jmp MMXtest
  845.  
  846. .AFp:
  847. Text 100,70,0x00000000,AFCsp, AFCsplen-AFCsp
  848. mov esi, AFCsp
  849.     mov edi, saveproc + 0x4
  850.     call concatname
  851.  jmp MMXtest
  852. ;-----------------------------------------------
  853. Intel:
  854. mov [codeN], $1
  855. Text 75,70,0x00000000,Inteln, Intelnlen-Inteln
  856.         mov esi, IntelnNew
  857.         mov edi, saveproc
  858.         call concatname
  859.         mov     esi, intel
  860.         call    load_gif
  861. PutImage 135,107,201,49,img_area+8
  862.  
  863. det:
  864.     cmp [f], $5
  865.     jz five
  866.     cmp [f], $6
  867.     jz six
  868.     cmp [f], $7
  869.     jz sev
  870.     cmp [f], $F
  871.     jz fift
  872. five:        ;Family=5
  873.  
  874. Text 15, 190,0x00000000,cache, cachelen-cache
  875.  
  876.     cmp [m],$0
  877.     jz .I0
  878.     cmp [m],$1
  879.     jz .I1
  880.     cmp [m],$2
  881.     jz .I2
  882.     cmp [m],$3
  883.     jz .I3
  884.     cmp [m],$4
  885.     jz .I4
  886.     cmp [m],$7
  887.     jz .I7
  888.     cmp [m],$8
  889.     jz .I8
  890. .I0:
  891. Text 110,70,0x00000000,P50, P50len-P50
  892.     mov esi, P50
  893.     mov edi, saveproc + 0x6
  894.     call concatname
  895.    mov [L1d], 8
  896.    mov [L1i], 8
  897.    mov [L2], 256
  898.    mov [micron], 80
  899.  jmp MMXtest
  900. .I1:
  901. Text 110,70,0x00000000,P5, P5len-P5
  902. mov esi, P5
  903.     mov edi, saveproc + 0x6
  904.     call concatname
  905.    mov [L1d], 8
  906.    mov [L1i], 8
  907.    mov [L2], 256
  908.    mov [micron], 50
  909.  jmp MMXtest
  910.  
  911. .I2:
  912. Text 110,70,0x00000000,P54C, P54Clen-P54C
  913. mov esi, P54C
  914.     mov edi, saveproc + 0x6
  915.     call concatname
  916.    mov [L1d], 8
  917.    mov [L1i], 8
  918.    mov [L2], 256
  919.    mov [micron], 50
  920.  jmp MMXtest
  921.  
  922. .I3:
  923. Text 110,70,0x00000000,P54T, P54Tlen-P54T
  924. mov esi, P54T
  925.     mov edi, saveproc + 0x6
  926.     call concatname
  927.    mov [L1d], 8
  928.    mov [L1i], 8
  929.    mov [L2], 256
  930.    mov [micron], 50
  931.  jmp MMXtest
  932.  
  933. .I4:
  934. Text 110,70,0x00000000,P55C, P55Clen-P55C
  935. mov esi, P55C
  936.     mov edi, saveproc + 0x6
  937.     call concatname
  938.    mov [L1d], 8
  939.    mov [L1i], 8
  940.    mov [L2], 256
  941.    mov [micron], 35
  942.  jmp MMXtest
  943.  
  944.  
  945. .I7:
  946. Text 110,70,0x00000000,P54C, P54Clen-P54C
  947. mov esi, P54C
  948.     mov edi, saveproc + 0x6
  949.     call concatname
  950.    mov [L1d], 8
  951.    mov [L1i], 8
  952.    mov [L2], 256
  953.    mov [micron], 35
  954.  jmp MMXtest
  955.  
  956. .I8:
  957. Text 110,70,0x00000000,P55C, P55Clen-P55C
  958. mov esi, P55C
  959.     mov edi, saveproc + 0x6
  960.     call concatname
  961.    mov [L1d], 16
  962.    mov [L1i], 16
  963.    mov [L2], 256
  964.    mov [micron], 35
  965.    jmp MMXtest
  966.  
  967. six:              ;Family=6
  968.  
  969. Text 15, 190,0x00000000,cache, cachelen-cache
  970. cmp [newpc],$0
  971. jnz NEWintel
  972.  
  973.     cmp [m],$0
  974.     jz .I60
  975.     cmp [m],$1
  976.     jz .I61
  977.     cmp [m],$3
  978.     jz .I63
  979.     cmp [m],$5
  980.     jz .I65
  981.     cmp [m],$6
  982.     jz .I66
  983.     cmp [m],$7
  984.     jz .I67
  985.     cmp [m],$8
  986.     jz .I68
  987.     cmp [m],$9
  988.     jz .I69
  989.     cmp [m],$A
  990.     jz .I6A
  991.     cmp [m],$B
  992.     jz .I6B
  993.    cmp [m],$D
  994.     jz .I6D
  995.     cmp [m],$E
  996.     jz .I6E
  997.    cmp [m],$F
  998.     jz .I6F
  999. .I60:
  1000.     mov [micron], 50
  1001.     Text 110,70,0x00000000,P60, P60len-P60
  1002.     mov esi, P60
  1003.     mov edi, saveproc + 0x6
  1004.     call concatname
  1005.     jmp MMXtest
  1006.  
  1007. .I61:
  1008.     mov [micron], 35
  1009.     Text 110,70,0x00000000,P61, P61len-P61
  1010.     mov esi, P61
  1011.     mov edi, saveproc + 0x6
  1012.     call concatname
  1013.     jmp MMXtest
  1014.  
  1015. .I63:
  1016.     mov [micron], 28
  1017.     Text 110,70,0x00000000,P63, P63len-P63
  1018.     mov esi, P63
  1019.     mov edi, saveproc + 0x6
  1020.     call concatname
  1021.     jmp MMXtest
  1022.  
  1023. .I65:
  1024.     mov [micron], 25
  1025.     cmp [L2], 0
  1026.     jne .pp65  ; Pentium
  1027.     Text 110,70,0x00000000,P65c, P65clen-P65c
  1028.     mov esi, P65c
  1029.     mov edi, saveproc + 0x6
  1030.     call concatname
  1031.     jmp MMXtest
  1032.  
  1033. .pp65:
  1034.     Text 110,70,0x00000000,P65, P65len-P65
  1035.     mov esi, P65
  1036.     mov edi, saveproc + 0x6
  1037.     call concatname
  1038.     jmp MMXtest
  1039. .I66:
  1040.     mov [micron], 25
  1041. Text 110,70,0x00000000,P66, P66len-P66
  1042. mov esi, P66
  1043.     mov edi, saveproc + 0x6
  1044.     call concatname
  1045.     jmp MMXtest
  1046. .I67:
  1047.     mov [micron], 25
  1048. Text 110,70,0x00000000,P67, P67len-P67 ;but if SSE4.1 supported then it is Intel Core (Penryn)
  1049.     mov esi, P67
  1050.     mov edi, saveproc + 0x6
  1051.     call concatname
  1052.     jmp MMXtest
  1053.  
  1054. .I68:
  1055.     mov [micron], 18
  1056.     cmp [L2], 128
  1057.     jne .pp68  ; Pentium
  1058. Text 110,70,0x00000000,P68c, P68clen-P68c
  1059. mov esi, P68c
  1060.     mov edi, saveproc + 0x6
  1061.     call concatname
  1062.     jmp MMXtest
  1063.  
  1064.  .pp68:
  1065. Text 110,70,0x00000000,P68, P68len-P68
  1066. mov esi, P68
  1067.     mov edi, saveproc + 0x6
  1068.     call concatname
  1069.     jmp MMXtest
  1070.  
  1071. .I69:
  1072.     mov [micron], 13
  1073. Text 110,70,0x00000000,P69 , P69len-P69
  1074. mov esi, P69
  1075.     mov edi, saveproc + 0x6
  1076.     call concatname
  1077.     jmp MMXtest
  1078.  
  1079. .I6A:
  1080.     mov [micron], 18
  1081. Text 110,70,0x00000000,P6A, P6Alen-P6A ;but if SSE4.2 supported then it is Intel Core (Nehalem)
  1082.     mov esi, P6A
  1083.     mov edi, saveproc + 0x6
  1084.     call concatname
  1085.     jmp MMXtest
  1086.  
  1087. .I6B:
  1088.     mov [micron], 13
  1089.     cmp [L2], 256
  1090.     jne .pp6B  ; Pentium
  1091. Text 110,70,0x00000000,P6Bc, P6Bclen-P6Bc
  1092. mov esi, P6Bc
  1093.     mov edi, saveproc + 0x6
  1094.     call concatname
  1095.     jmp MMXtest
  1096.  
  1097. .pp6B:
  1098. Text 110,70,0x00000000,P6B, P6Blen-P6B
  1099. mov esi, P6B
  1100.     mov edi, saveproc + 0x6
  1101.     call concatname
  1102.     jmp MMXtest
  1103.  
  1104. .I6D:
  1105.     mov [micron], 9
  1106. Text 110,70,0x00000000,P6D, P6Dlen-P6D
  1107. mov esi, P6D
  1108.     mov edi, saveproc + 0x6
  1109.     call concatname
  1110.     jmp MMXtest
  1111.  
  1112. .I6E:
  1113.     mov [micron], 6
  1114. Text 110,70,0x00000000,P6E, P6Elen-P6E
  1115. mov esi, P6E
  1116.     mov edi, saveproc + 0x6
  1117.     call concatname
  1118.     jmp MMXtest
  1119.  
  1120. .I6F:
  1121.     mov [micron], 6
  1122. Text 110,70,0x00000000,P6F, P6Flen-P6F
  1123. mov esi, P6F
  1124.     mov edi, saveproc + 0x6
  1125.     call concatname
  1126.     jmp MMXtest
  1127.  
  1128. ;06Ex - Pentium M Yonah 0.065
  1129. ;06Fx - Pentium D Conroe 0.065, Xeon Woodcrest, Celeron D AllenDale, Core 2 Kentsfield
  1130.  
  1131. NEWintel:
  1132.  
  1133.    cmp [em],$3A   ;IvyBridge
  1134.     jz I3A
  1135.    cmp [em],$2A   ;SandyBridge
  1136.     jz I2A
  1137.    cmp [em],$2D  ;SandyBridge-E/EN/EP
  1138.     jz I2D
  1139.    cmp [em],$25   ;Arrandale/Clarksdale
  1140.     jz I25
  1141.    cmp [em],$2C   ;Gulftown/Westmere-EP
  1142.     jz I2C        ;westmere-EP stepping B1 -> micron 0.032
  1143.    cmp [em],$2F   ;Westmere-EX
  1144.     jz I2F
  1145.    cmp [em],$1E   ;Clarksfield/Lynnfield/Jasper Forest
  1146.     jz I1E
  1147.    cmp [em],$1A   ;Bloomfield/Nehalem-EP
  1148.     jz I1A
  1149.    cmp [em],$2E   ;Nehalem-EX
  1150.     jz I2E
  1151.    cmp [em],$17   ;Yorkfield/Wolfdale/Penryn/Harpertown (DP)
  1152.     jz I17
  1153.    cmp [em],$1D   ;Dunnington (MP)
  1154.     jz I1D
  1155.    cmp [em],$0F   ;Clovertown/Kentsfield/Conroe/Merom/Woodcrest
  1156.     jz I0F
  1157.    cmp [em],$16   ;Merom Conroe
  1158.     jz I16
  1159.    cmp [em],$06   ;Cedar Mill/Presler
  1160.     jz I06
  1161.    cmp [em],$03   ;Nocona Irwindale / Prescott
  1162.     jz I03
  1163.    cmp [em],$04   ;NoconaIrwindale / Prescott
  1164.     jz I03
  1165.    cmp [em],$0D   ;Dothan
  1166.     jz I0D
  1167.    cmp [em],$36   ;Cedarview
  1168.     jz I36
  1169.    cmp [em],$26   ;Lincroft
  1170.     jz I26
  1171.    cmp [em],$1C   ;Pineview/Silverthorne
  1172.     jz I1C
  1173.         jnz no_known
  1174.  
  1175. Inewunknown:
  1176.     jmp MMXtest
  1177.  
  1178. I3A:
  1179. mov [micron], 32
  1180. ;Text 110,70,0x00000000,P3A, P3Alen-P3A
  1181. mov [cname], P3A
  1182. mov esi, P3A
  1183. mov edi, saveproc + 0x10
  1184. call concatname
  1185. jmp MMXtest
  1186.  
  1187. I2A:
  1188. mov [micron], 32
  1189. ;Text 110,70,0x00000000,P2A, P2Alen-P2A
  1190. mov [cname], P2A
  1191. mov esi, P2A
  1192. mov edi, saveproc + 0x10
  1193. call concatname
  1194. jmp MMXtest
  1195.  
  1196. I2D:
  1197. mov [micron], 32
  1198. ;Text 110,70,0x00000000,P2D, P2Dlen-P2D
  1199. mov [cname], P2D
  1200. mov esi, P2D
  1201. mov edi,saveproc + 0x10
  1202. call concatname
  1203. jmp MMXtest
  1204.  
  1205. I25:
  1206. mov [micron], 32
  1207. ;Text 110,70,0x00000000,P25, P25len-P25
  1208. mov [cname], P25  ;P25
  1209. mov esi, P25
  1210. mov edi, saveproc + 0x10  ;12
  1211. call concatname
  1212. jmp MMXtest
  1213.  
  1214. I2C:
  1215. mov [micron], 32
  1216. ;Text 110,70,0x00000000,P2C, P2Clen-P2C
  1217. mov [cname], P2C
  1218. mov esi, P2C
  1219. mov edi,saveproc + 0x10
  1220. call concatname
  1221.     jmp MMXtest
  1222.  
  1223. I2F:
  1224. mov [micron], 32
  1225. ;Text 110,70,0x00000000,P2F, P2Flen-P2F
  1226. mov [cname], P2F
  1227. mov esi, P2F
  1228. mov edi, saveproc + 0x10
  1229. call concatname
  1230.     jmp MMXtest
  1231.  
  1232. I1E:
  1233. mov [micron], 32
  1234. ;Text 110,70,0x00000000,P1E, P1Elen-P1E
  1235. mov [cname], P1E
  1236. mov esi, P1E
  1237. mov edi, saveproc + 0x10
  1238. call concatname
  1239.     jmp MMXtest
  1240.  
  1241. I1A:
  1242. mov [micron], 45
  1243. ;Text 110,70,0x00000000,P1A, P1Alen-P1A
  1244. mov [cname], P1A
  1245. mov esi, P1A
  1246. mov edi, saveproc + 0x10
  1247. call concatname
  1248.     jmp MMXtest
  1249.  
  1250. I2E:
  1251. mov [micron], 45
  1252. ;Text 110,70,0x00000000,P2E, P2Elen-P2E
  1253. mov [cname], P2E
  1254. mov esi, P2E
  1255. mov edi, saveproc + 0x10
  1256. call concatname
  1257.     jmp MMXtest
  1258.  
  1259. I17:
  1260. mov [micron], 45
  1261. ;Text 110,70,0x00000000,P17, P17len-P17
  1262. mov [cname], P17
  1263. mov esi, P17
  1264. mov edi, saveproc + 0x10
  1265. call concatname
  1266.     jmp MMXtest
  1267.  
  1268. I1D:
  1269. mov [micron], 45
  1270. ;Text 110,70,0x00000000,P1D, P1Dlen-P1D
  1271. mov [cname], P1D
  1272. mov esi, P1D
  1273. mov edi, saveproc + 0x10
  1274. call concatname
  1275.     jmp MMXtest
  1276.  
  1277. I0F:
  1278. mov [micron], 65
  1279. ;Text 110,70,0x00000000,P0F, P0Flen-P0F
  1280. mov [cname], P0F
  1281. mov esi, P0F
  1282. mov edi, saveproc + 0x10
  1283. call concatname
  1284.     jmp MMXtest
  1285.  
  1286. I16:
  1287. mov [micron], 65
  1288. ;Text 110,70,0x00000000,P16, P16len-P16
  1289. mov [cname], P16
  1290. mov esi, P16
  1291. mov edi, saveproc + 0x10
  1292. call concatname
  1293.     jmp MMXtest
  1294.  
  1295. I06:
  1296. mov [micron], 32
  1297. ;Text 110,70,0x00000000,P06, P06len-P06
  1298. mov [cname], P06
  1299. mov esi, P06
  1300. mov edi, saveproc + 0x10
  1301. call concatname
  1302.     jmp MMXtest
  1303.  
  1304. I03:
  1305. mov [micron], 32
  1306. ;Text 110,70,0x00000000,P03, P03len-P03
  1307. mov [cname], P03
  1308. mov esi, P03
  1309. mov edi, saveproc + 0x10
  1310. call concatname
  1311.     jmp MMXtest
  1312.  
  1313. I0D:
  1314. mov [micron], 32
  1315. ;Text 110,70,0x00000000,P0D, P0Dlen-P0D
  1316. mov [cname], P0D
  1317. mov esi, P0D
  1318. mov edi, saveproc + 0x10
  1319. call concatname
  1320.     jmp MMXtest
  1321.  
  1322. I36:
  1323. mov [micron], 32
  1324. ;Text 110,70,0x00000000,P36, P36len-P36
  1325. mov [cname], P36
  1326. mov esi, P36
  1327. mov edi, saveproc + 0x10
  1328. call concatname
  1329.     jmp MMXtest
  1330.  
  1331. I26:
  1332. mov [micron], 32
  1333. ;Text 110,70,0x00000000,P26, P26len-P26
  1334. mov [cname], P26
  1335. mov esi, P26
  1336. mov edi, saveproc + 0x10
  1337. call concatname
  1338.     jmp MMXtest
  1339.  
  1340. I1C:
  1341. mov [micron], 32
  1342. ;Text 110,70,0x00000000,P1C, P1Clen-P1C
  1343. mov [cname], P1C
  1344. mov esi, P1C
  1345. mov edi, saveproc + 0x10
  1346. call concatname
  1347.     jmp MMXtest
  1348.  
  1349.  
  1350. ;;;;;;;;;;;;;;;;;;;
  1351. sev:    ;Family=7
  1352. .IS0:
  1353.  
  1354. Text 15, 190,0x00000000,cache, cachelen-cache
  1355. mov [micron], 18
  1356. Text 110,70,0x00000000,PS0, PS0len-PS0
  1357. mov esi, PS0
  1358. mov edi, saveproc + 0x6
  1359. call concatname
  1360.  jmp MMXtest
  1361.  
  1362. fift:    ;Family=15
  1363.  
  1364. Text 15, 190,0x00000000,cacheP4, cacheP4len-cacheP4
  1365.  
  1366.     cmp [m],$0
  1367.     jz .IF0
  1368.     cmp [m],$1
  1369.     jz .IF1
  1370.     cmp [m],$2
  1371.     jz .IF2
  1372.     cmp [m],$3
  1373.     jz .IF3
  1374.     cmp [m],$4
  1375.     jz .IF3 ;identical to F3xh
  1376.     cmp [m],$5
  1377.     jz .IF5
  1378.     cmp [m],$6
  1379.     jz .IF6
  1380.     jmp next_generation
  1381. .IF0:
  1382.     mov [micron], 18
  1383.     cmp [L2], 128
  1384.     jne .ppF0  ; Pentium
  1385. Text 110,70,0x00000000,PF0c, PF0clen-PF0c
  1386. mov esi, PF0c
  1387.     mov edi, saveproc + 0x6
  1388.     call concatname
  1389.     jmp MMXtest
  1390. .ppF0:
  1391. Text 110,70,0x00000000,PF0, PF0len-PF0
  1392. mov esi, PF0
  1393.     mov edi, saveproc + 0x6
  1394.     call concatname
  1395.     jmp MMXtest
  1396. .IF1:
  1397.     mov [micron], 18
  1398.     cmp [L2], 128
  1399.     je .IF0;jne.ppF1  ; Pentium
  1400.   ;  mov   eax,dword 0x00000004
  1401.   ;  mov   ebx,115*65536+80
  1402.   ;  mov   ecx,dword 0x00000000
  1403.   ;  mov   edx,PF0c
  1404.   ;  mov   esi,PF0clen-PF0c
  1405.   ;  mcall
  1406.   ;jmp MMXtest
  1407. ;.ppF1:
  1408. Text 110,70,0x00000000,PF0, PF0len-PF0
  1409. mov esi, PF0
  1410.     mov edi, saveproc + 0x6
  1411.     call concatname
  1412.  jmp MMXtest
  1413. .IF2:
  1414.     mov [micron], 13
  1415.     cmp [L2], 128
  1416.     jne .ppF2  ; Pentium
  1417. Text 110,70,0x00000000,PF2c, PF2clen-PF2c
  1418. mov esi, PF2c
  1419.     mov edi, saveproc + 0x6
  1420.     call concatname
  1421.  jmp MMXtest
  1422. .ppF2:
  1423. Text 110,70,0x00000000,PF2, PF2len-PF2
  1424. mov esi, PF2
  1425.     mov edi, saveproc + 0x6
  1426.     call concatname
  1427.  jmp MMXtest
  1428. .IF3:
  1429.     mov [micron], 09
  1430.     cmp [L2], 256
  1431.     jne .ppF3  ; Pentium
  1432. Text 110,70,0x00000000,PF3c, PF3clen-PF3c
  1433. mov esi, PF3c
  1434.     mov edi, saveproc + 0x6
  1435.     call concatname
  1436.  jmp MMXtest
  1437. .ppF3:
  1438. Text 110,70,0x00000000,PF3, PF3len-PF3
  1439. mov esi, PF3
  1440.     mov edi, saveproc + 0x6
  1441.     call concatname
  1442.  jmp MMXtest
  1443.  
  1444. .IF5:
  1445.     mov [micron], 09
  1446.     cmp [L2], 512
  1447.     jae .ppF5  ; Pentium
  1448. Text 110,70,0x00000000,PF5c, PF5clen-PF5c
  1449. mov esi, PF5c
  1450.     mov edi, saveproc + 0x6
  1451.     call concatname
  1452.  jmp MMXtest
  1453. .ppF5:
  1454. Text 110,70,0x00000000,PF5, PF5len-PF5
  1455. mov esi, PF5
  1456.     mov edi, saveproc + 0x6
  1457.     call concatname
  1458.  jmp MMXtest
  1459.  
  1460.  .IF6:
  1461.     mov [micron], 06  ; 065
  1462.     cmp [L2], 512
  1463.     ja .ppF6  ; Pentium
  1464. Text 110,70,0x00000000,PF6c, PF6clen-PF6c
  1465. mov esi, PF6c
  1466.     mov edi, saveproc + 0x6
  1467.     call concatname
  1468.  jmp MMXtest
  1469. .ppF6:
  1470. Text 110,70,0x00000000,PF6, PF6len-PF6
  1471. mov esi, PF6
  1472.     mov edi, saveproc + 0x6
  1473.     call concatname
  1474.  jmp MMXtest
  1475.  
  1476.  
  1477.  next_generation:
  1478. Text 110,70,0x00000000,NG, NGlen-NG
  1479. mov esi, NG
  1480.     mov edi, saveproc + 0x6
  1481.     call concatname
  1482.   jmp MMXtest
  1483. ;----------------------------------
  1484. Cyrix:
  1485.  
  1486. mov [codeN], 3
  1487. Text 15, 190,0x00000000,cache, cachelen-cache
  1488.  
  1489.         mov     esi, cyrix
  1490.         call    load_gif
  1491. PutImage 135,107,201,49,img_area+8
  1492.  
  1493.  
  1494.     cmp [f], $5
  1495.     jz .fivv
  1496.     cmp [f], $6
  1497.     jz .sixx
  1498. .fivv:    ;Family=5
  1499.     cmp [m],$2
  1500.     jz .C52
  1501.     cmp [m],$4
  1502.     jz .C54
  1503. .C52:
  1504.     mov [micron], 50 ;35?
  1505.     mov [L1i], 8
  1506.     mov [L1d], 8
  1507.     mov [L2], 512
  1508. Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
  1509. mov esi, Cyrixn
  1510.     mov edi, saveproc
  1511.     call concatname
  1512. Text 110,70,0x00000000,C52, C52len-C52
  1513. mov esi, C52
  1514.     mov edi, saveproc + 0x6
  1515.     call concatname
  1516.     jmp MMXtest
  1517. .C54:
  1518.     mov [micron], 50
  1519.     mov [L1i], 8
  1520.     mov [L1d], 8
  1521.     mov [L2], 512
  1522. Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
  1523. mov esi, Cyrixn
  1524.     mov edi, saveproc
  1525.     call concatname
  1526. Text 110,70,0x00000000,C54, C54len-C54
  1527. mov esi, C54
  1528.     mov edi, saveproc + 0x6
  1529.     call concatname
  1530.     jmp MMXtest
  1531.  
  1532. .sixx:     ;Family=6
  1533.    cmp [m],$0
  1534.    jz .C60
  1535.    cmp [m],$5
  1536.    jz .C65
  1537. .C60:
  1538.     mov [micron], 25
  1539.     mov [L1i], 32
  1540.     mov [L1d], 32
  1541.     mov [L2], 512
  1542. Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
  1543. mov esi, Cyrixn
  1544.     mov edi, saveproc
  1545.     call concatname
  1546. Text 110,70,0x00000000,C60, C60len-C60
  1547. mov esi, C60
  1548.     mov edi, saveproc + 0x6
  1549.     call concatname
  1550.     jmp MMXtest
  1551. .C65:
  1552.     mov [micron], 25 ;35?
  1553.     mov [L1i], 32
  1554.     mov [L1d], 32
  1555.     mov [L2], 512
  1556. Text 75,70,0x00000000,Centaurn, Centaurnlen-Centaurn
  1557. mov esi, Centaurn
  1558.     mov edi, saveproc
  1559.     call concatname
  1560.     mov edx,C65
  1561.     mov esi,C65len-C65
  1562.     jmp OutProcName
  1563. ;---------------------
  1564. Centaur:
  1565.  
  1566. Text 15, 190,0x00000000,cache, cachelen-cache
  1567.  
  1568. ;CACHE1:
  1569. mov eax, 80000005h
  1570.     cpuid
  1571. shr ecx, 24
  1572. mov [L1d], ecx
  1573. shr edx, 24
  1574. mov [L1i], edx
  1575.  
  1576. ; cache detection routine
  1577. ;CACHE1:
  1578. mov eax, 80000005h
  1579.     cpuid
  1580.  
  1581. movzx eax, cl
  1582. mov [lineld], eax
  1583.  
  1584. mov eax, ecx
  1585. shr eax, 16
  1586. and eax,000000FFh
  1587. mov [wayld], eax
  1588.  
  1589. shr ecx, 24
  1590. mov [L1d], ecx
  1591.  
  1592. movzx eax, dl
  1593. mov [lineli], eax
  1594.  
  1595. mov eax, edx
  1596.  
  1597. shr eax, 16
  1598. and eax,000000FFh
  1599. mov [wayli], eax
  1600.  
  1601. shr edx, 24
  1602. mov [L1i], edx
  1603.  
  1604.  
  1605. ;CACHE2:
  1606. mov eax, 80000006h
  1607.     cpuid
  1608.  
  1609. cmp [f], $6
  1610.     jz vn
  1611.     jmp vl2old  ; if not then old identification
  1612. vn:
  1613.     cmp [m],$9
  1614.     jl vl2old
  1615. ; else  new
  1616. movzx eax, cl
  1617. mov dword[linel2], eax
  1618.  
  1619. mov eax, ecx
  1620. shl eax, 16
  1621. shr eax, 28
  1622.  
  1623. mov dword[wayl2], eax
  1624.  
  1625. shr ecx, 16  ; it is 16 bits now
  1626. mov [L2],ecx
  1627.  
  1628.  
  1629.  
  1630. vl2old:
  1631. movzx eax, cl
  1632. mov dword[linel2], eax
  1633.  
  1634. mov eax, ecx
  1635. shl eax, 8
  1636. shr eax, 24
  1637.  
  1638. mov dword[wayl2], eax
  1639.  
  1640. shr ecx, 24  ; it was 8 bits earlier
  1641. mov [L2],ecx
  1642.  
  1643.  
  1644.     cmp [f], $5
  1645.     jz fivC
  1646.     cmp [f], $6
  1647.     jz sixC
  1648.  
  1649. fivC:              ;Family=5
  1650.  
  1651.         mov     esi, idt
  1652.         call    load_gif
  1653. PutImage 135,107,201,49,img_area+8
  1654. ;PutImage 125,107,201,49,img_area+8
  1655. ;         place   size
  1656.  
  1657. Text 75,70,0x00000000,IDTn, IDTnlen-IDTn
  1658. mov esi, IDTn
  1659.     mov edi, saveproc + 0x4
  1660.     call concatname
  1661.     cmp [m],$4
  1662.     jz .V54
  1663.     cmp [m],$8
  1664.     jz .V58
  1665.     cmp [m],$9
  1666.     jz .V59
  1667. .V54:
  1668.    mov [micron], 35
  1669.    mov edx,V54
  1670.    mov esi,V54len-V54
  1671.     jmp OutProcName
  1672. .V58:
  1673.     mov [micron], 25
  1674.     mov edx,V58
  1675.     mov esi,V58len-V58
  1676.     jmp OutProcName
  1677. .V59:
  1678.     mov [micron], 25
  1679.     mov edx,V59
  1680.     mov esi,V59len-V59
  1681.     jmp OutProcName
  1682.  
  1683. sixC:   ;Family=6
  1684.  
  1685.         mov     esi, via
  1686.         call    load_gif
  1687. PutImage 135,107,201,49,img_area+8
  1688.  
  1689.  
  1690. Text 75,70,0x00000000,Centaurn, Centaurnlen-Centaurn
  1691. mov esi, Centaurn
  1692.     mov edi, saveproc
  1693.     call concatname
  1694.     cmp [m],$6
  1695.     jz .V66
  1696.     cmp [m],$7
  1697.     jz .V67
  1698.     cmp [m],$8
  1699.     jz .V68
  1700.     cmp [m],$9
  1701.     jz .V69
  1702.     cmp [m],$A
  1703.     jz .V6A
  1704. .V66:
  1705.    mov [micron], 18 ; 25?
  1706.    mov edx,V66
  1707.    mov esi,V66len-V66
  1708.     jmp OutProcName
  1709. .V67:
  1710.     mov [micron], 15
  1711.     mov edx,V67
  1712.     mov esi,V67len-V67
  1713.     jmp OutProcName
  1714. .V68:
  1715.     mov [micron], 13
  1716.     mov edx,V68
  1717.     mov esi,V68len-V68
  1718.     jmp OutProcName
  1719. .V69:
  1720.    mov [micron], 13
  1721.    mov edx,V69
  1722.    mov esi,V69len-V69
  1723.    jmp OutProcName
  1724. .V6A:
  1725.    mov [micron], 9
  1726.    mov edx,VA
  1727.    mov esi,VAlen-VA
  1728.    jmp OutProcName
  1729. ;-----------
  1730. Transmeta:
  1731.  
  1732. Text 15, 190,0x00000000,cache, cachelen-cache
  1733.  
  1734. Text 75,70,,Tranmsmetan, Tranmsmetanlen-Tranmsmetan
  1735. mov esi, Tranmsmetan
  1736.     mov edi, saveproc
  1737.     call concatname
  1738.  
  1739.         mov     esi, transmeta
  1740.         call    load_gif
  1741. PutImage 135,107,201,49,img_area+8
  1742.  
  1743. ; cache detection routine - it is the same as for AMD (almost)
  1744. ;CACHE1:
  1745. mov eax, 80000005h
  1746.     cpuid
  1747.  
  1748. movzx eax, cl
  1749. mov [lineld], eax
  1750.  
  1751. mov eax, ecx
  1752.  
  1753. shr eax,16
  1754. and eax,000000FFh
  1755. mov [wayld], eax
  1756.  
  1757. shr ecx, 24
  1758. mov [L1d], ecx
  1759.  
  1760. movzx eax, dl
  1761. mov [lineli], eax
  1762.  
  1763. mov eax, edx
  1764.  
  1765. shr eax, 16
  1766. and eax,000000FFh
  1767. mov [wayli], eax
  1768.  
  1769. shr edx, 24
  1770. mov [L1i], edx
  1771.  
  1772.  
  1773. ;CACHE2:
  1774. mov eax, 80000006h
  1775.     cpuid
  1776.  
  1777. movzx eax, cl
  1778. mov dword[linel2], eax
  1779.  
  1780. mov eax, ecx
  1781. shl eax, 16
  1782. shr eax, 28
  1783.  
  1784. mov dword[wayl2], eax
  1785.  
  1786. shr ecx, 16
  1787. mov [L2],ecx
  1788.  
  1789.  
  1790.     cmp [f], $5
  1791.     jz .fivt
  1792.     cmp [f], $F
  1793.     jz .fift
  1794. .fivt:    ;     Family=5
  1795.  
  1796.     mov edx,T5
  1797.     mov esi,T5len-T5
  1798.     jmp @f
  1799.  
  1800. .fift:    ;     Family=F
  1801.     mov edx,TF
  1802.     mov esi,TFlen-TF
  1803. @@:
  1804.     mov [micron], 13 ;
  1805.     Text 140,70,0
  1806.     jmp MMXtest
  1807.  
  1808. OutProcName:
  1809.         Text    100,70,0
  1810.  
  1811. ;----
  1812. ;---------------------------------- new
  1813. Vortex:
  1814.  
  1815. Text 15, 190,0x00000000,cache, cachelen-cache
  1816.  
  1817.         mov     esi, vortex
  1818.         call    load_gif
  1819. PutImage 135,107,201,49,img_area+8
  1820. ;PutImage 130,127,201,49,img_area+8
  1821. ;         place   size
  1822.  
  1823.     cmp [f], $5
  1824.     jz .V54 ;fivvtx
  1825. ;.fivvtx:         ;Family=5
  1826. ;    cmp [m],$4
  1827. ;    jz .V54
  1828. .V54:
  1829.     mov [micron], 13
  1830.     mov [L1i], 16
  1831.     mov [L1d], 16
  1832.     mov [L2], 256
  1833.     mov [wayl2], 4
  1834.     mov [wayli], 4
  1835.     mov [wayld], 4
  1836. Text 75,70,0x00000000,Vortexn, Vortexnlen-Vortexn
  1837. mov esi, Vortexn
  1838.     mov edi, saveproc
  1839.     call concatname
  1840. ;Text 110,70,0x00000000,V54, V54len-V54
  1841.     jmp MMXtest
  1842.  
  1843. ;---------------------
  1844.  
  1845.  
  1846.  
  1847. MMXtest:             ; MMX test and Brand ID decoding
  1848.  
  1849. call decodebrand  ; get Brand ID
  1850.  
  1851. call decode_standard_features
  1852.  
  1853. call decode_extended_features
  1854.       xor eax,eax
  1855.       inc eax
  1856.       cpuid
  1857. HTTtest:
  1858.   test  edx, $10000000; ;Test bit 28
  1859.   jz .ELN
  1860.  
  1861. .EL:   ;HTT technology is supported
  1862.    and ebx,00FF0000h ; numbers of logical processors
  1863.    cmp ebx, 1 shl 16
  1864.    ;   mov [number_of_log_cpus], ebx
  1865.    je .ELN  ; HHT not enabled (Celeron)
  1866.  
  1867.    mov  dword [HTTn+9], $736579
  1868.    mov  dword [HTT+ 6], $736579
  1869.    jmp TEXTOUT
  1870. .ELN:
  1871.  
  1872.    mov  dword [HTTn+ 9],  $6F6E
  1873.    mov  dword [HTT+ 6],  $6F6E
  1874.  
  1875. TEXTOUT:
  1876.  
  1877. Text 275,290,0x00000000,HTT, HTTlen-HTT
  1878. Text 275,310,,sse3, sse3len-sse3
  1879. Text 15,290,,MMXs, MMXslen-MMXs
  1880. Text 15,310,,SSE, SSElen-SSE
  1881. Text 95,310,,SSE2, SSE2len-SSE2
  1882.  
  1883. ;-------------------
  1884. TEST3DNOW:
  1885.  
  1886.   xor edx, edx
  1887.   cmp [smallvendor], 'ntel'
  1888. ;  je @f  ;recent change
  1889. jne .t
  1890.  
  1891. .t:
  1892.  
  1893.   mov   eax, $80000001 ;// Setup extended function 8000_0001h
  1894.   cpuid
  1895.  
  1896.   test  edx, $80000000 ;// Test bit 31
  1897.   jnz   .XIT
  1898.  
  1899. .NOEXTENDED: ;// 3DNow! technology is supported
  1900.    mov  dword [now+ 9], $6F6E
  1901.    jmp TEST3DNOWP
  1902. .XIT:
  1903.    mov  dword [now+ 9],  $736579
  1904.    jmp TEST3DNOWP
  1905.  
  1906. TEST3DNOWP:
  1907.  
  1908.   cmp [smallvendor], 'ntel'
  1909.   je .NOEXTENDEDP
  1910.  
  1911. .tp:
  1912.  
  1913.   mov   eax, $80000001 ;// Setup extended function 8000_0001h
  1914.   cpuid
  1915.  
  1916. test    edx, $40000000 ;// Test bit 30
  1917.   jnz   .XITP  ;// 3DNow! technology is supported
  1918.  
  1919. .NOEXTENDEDP:
  1920.    mov  dword [nowp+ 9], $6F6E
  1921.    jmp TESTMMXP
  1922. .XITP:
  1923.    mov  dword [nowp+ 9],  $736579
  1924.    jmp TESTMMXP
  1925.  
  1926.  
  1927. TESTMMXP:
  1928.  
  1929.     mov   eax,$80000000
  1930.     cpuid
  1931.  
  1932.     test eax, 80000000h
  1933.     jna NOEXTENDEDM
  1934.  
  1935.   ;cmp   eax, $80000000 ;// Is 800_0001h supported?
  1936.   ;jz   .NOEXTENDEDM    ;// If not, 3DNow! technology is not supported
  1937.   mov   eax, $80000001 ;// Setup extended function 8000_0001h
  1938.   cpuid
  1939.   cmp [smallvendor], 'tead'
  1940.   jne noCyr
  1941. Cyrmx:
  1942.   test  edx, $01000000 ;// Test bit 24
  1943.   jnz   XITM  ;// 3DNow! technology is supported
  1944.   jz NOEXTENDEDM
  1945. noCyr:
  1946.   test  edx, $00400000 ;// Test bit 22
  1947.   jnz   XITM  ;// 3DNow! technology is supported
  1948.   ;jz   .NOEXTENDEDM
  1949.  
  1950. NOEXTENDEDM:
  1951.    mov  dword [mmxp+ 7], $6F6E
  1952.    mov  dword [MMXPi+ 8], $6F6E
  1953.    jmp text3d
  1954. XITM:
  1955.    mov  dword [mmxp+ 7],  $736579
  1956.    mov  dword [MMXPi+ 8],  $736579
  1957.  
  1958. text3d:
  1959.  
  1960. Text 15,330,0x00000000,now, nowlen-now
  1961. Text 95,330,,nowp, nowplen-nowp
  1962. Text 95,290,,mmxp, mmxplen-mmxp
  1963.  
  1964. jmp still
  1965.  
  1966. ;--------------------------
  1967. NO_CPUID:
  1968.  mov [nocpuid], 1
  1969.  Text 15,50,0x00000000,oblom, oblomlen-oblom
  1970.  
  1971. FREEZE:
  1972. nop
  1973. jmp FREEZE ; maybe we should close application or just made some Warning and jump to still:
  1974. ;----------------
  1975. still:
  1976.  
  1977. ; waiting for events
  1978. event_wait:
  1979.  
  1980.     ;================_RAM_==============
  1981.   Number 200,350,0,4,dword [ram_size_a],0xFFFFFF ;Number 200,340,0,4,dword [ram_size_a],0xFFFFFF
  1982.  
  1983.   mov eax, 18
  1984.   mov ebx, 16
  1985.   mcall
  1986.  
  1987.   shr eax, 10
  1988.  
  1989.   mov [ram_size_a], eax
  1990.  
  1991.   mov eax, 18
  1992.   mov ebx, 17
  1993.   mcall
  1994.  
  1995.   shr eax, 10
  1996.  
  1997.   mov [ram_size_t], eax
  1998.  
  1999.   Text 115,350,0x00000000,ram, ramlen-ram
  2000.   Number 200,350,0,4,dword [ram_size_a],0x000000
  2001.   Number 270,350,,,dword [ram_size_t]
  2002.  
  2003.  
  2004. ;==============================
  2005.  
  2006.         mov     eax,23       ; function 23 - event wait
  2007.         mov     ebx,50       ; wait for 0.5 second
  2008.         mcall
  2009.  
  2010.     cmp  eax,1          ;
  2011.     je   red            ;  redraw
  2012.     je   red2
  2013.     cmp  eax,2          ;
  2014.     je   key            ;  key
  2015.     cmp  eax,3          ;
  2016.     je   button         ;  button
  2017.     jmp  still          ;
  2018.   key:                  ;
  2019.     mcall               ;
  2020.     jmp  still          ;
  2021.   button:               ;
  2022.     mov  eax,17         ;
  2023.     mcall               ;
  2024.     cmp  ah,1           ;  = 1 ?
  2025.     je  close           ; close
  2026.  
  2027.     cmp  ah,2           ;  = 2 ?
  2028.     je  thread_start    ;
  2029.  
  2030.     cmp  ah, 3
  2031.     je call_OpenDialog
  2032.  
  2033.      mov        eax,11       ; function 23 - event wait
  2034.    mov  ebx,1
  2035.    mcall
  2036.  
  2037.    mov  eax,15       ; function 23 - event wait
  2038.    mov  ebx,3
  2039.    mcall
  2040.  
  2041. ;    cmp  ah,3          ;  = 3 ?
  2042.     jne  still
  2043.  
  2044. close:
  2045.     mov   eax,-1
  2046.     mcall
  2047.  
  2048. ;**************************** THREAD-SECOND WINDOW
  2049. thread_start:
  2050.  
  2051.     cmp  [num_win2],0
  2052.  
  2053.     jne  still
  2054.  
  2055. ;================================================RSA test
  2056.  
  2057. ;test rsa coding speed
  2058.         call    init_test
  2059. ;length of module - 256 bit
  2060.   mov  eax,26
  2061.   mov  ebx,9
  2062.   mcall
  2063.   add  eax,100 ;test lasts 1 second.
  2064.   push eax
  2065. .loop:
  2066.   push 4     ;do 4 iterations - this reduces number of calls mcall.
  2067. .loop1:
  2068.   call rsa_test   ;this procedure change all registers
  2069.   dec  dword [esp]
  2070.   jnz  .loop1
  2071.   pop  ecx
  2072.   mov  eax,26
  2073.   mov  ebx,9
  2074.   mcall
  2075.   cmp  eax,dword [esp]   ;Is time changed?
  2076.   jl   .loop
  2077.   pop  eax
  2078.   shr  dword [iter],4 ;[iter] - speed in Kb/sec. (every iteration codes 64 bytes)
  2079. CreateTread window_2,thread2_esp
  2080.   jmp  still
  2081.  
  2082. window_2:
  2083.     mov  [num_win2],1
  2084.     call draw_window_2
  2085.  
  2086. still_2:
  2087.  
  2088.     mov  eax,10
  2089.     mcall
  2090.  
  2091.     cmp  eax,1
  2092.     je   window_2       ;  window_2
  2093.     cmp  eax,2          ;
  2094.     je   key_2          ;  key_2
  2095.     cmp  eax,3          ;
  2096.     je   button_2       ;  button_2
  2097.  
  2098.     jmp  still_2        ;
  2099.  
  2100.   key_2:                ;
  2101.     mcall               ;
  2102.     jmp  still_2        ;
  2103.  
  2104.   button_2:             ;
  2105.     mov  eax,17         ; 17
  2106.     mcall               ;
  2107.  
  2108.     cmp  ah,1           ; = 1 ?
  2109.     jne  still_2        ; noclose
  2110.  
  2111.     mov  [num_win2],0   ;
  2112.  
  2113.     or   eax,-1         ;
  2114.     mcall
  2115.  
  2116.  
  2117. draw_window_2:
  2118.  
  2119.     ;call prepare_text_area
  2120.  
  2121.     mov  eax,12                    ; function 12:tell os about windowdraw
  2122.     mov  ebx,1h                     ; 1, start of draw
  2123.     mcall
  2124.  
  2125.  
  2126. Window 250,250,420,520, 0x33FFFFFF, 0x805080d0, standard  ;460
  2127. ; place size
  2128.  
  2129.  
  2130. Text 15, 10,0x00000000, STDCA, STDCAlen-STDCA
  2131. Text 215, 10,, EXTCA, EXTCAlen-EXTCA
  2132.  
  2133. Text 15, 30,0x00000000, FPU, FPUlen-FPU
  2134. Text 115, 30,, VME, VMElen-VME
  2135. Text 215, 30,, DE,  DElen-DE
  2136. Text 315, 30,, PSE, PSElen-PSE
  2137.  
  2138. Text 15, 50,,TSC, TSClen-TSC
  2139. Text 115,50,,MSR, MSRlen-MSR
  2140. Text 215,50,,PAE, PAElen-PAE
  2141. Text 315,50,,MCE, MCElen-MCE
  2142.  
  2143. Text 15,70,,CX8, CX8len-CX8
  2144. Text 115,70,,APIC, APIClen-APIC
  2145. Text 215,70,,Res, Reslen-Res
  2146. Text 315,70,,SEP, SEPlen-SEP
  2147.  
  2148. Text 15,90,,MTRR, MTRRlen-MTRR
  2149. Text 115,90,,PGE, PGElen-PGE
  2150. Text 215,90,,MCA, MCAlen-MCA
  2151. Text 315,90,,CMOV, CMOVlen-CMOV
  2152.  
  2153. Text 15,110,,PAT, PATlen-PAT
  2154. Text 115,110,,PSE36, PSE36len-PSE36
  2155. Text 215,110,,PSNUM, PSNUMlen-PSNUM
  2156. Text 315,110,,CLFLUSHn, CLFLUSHnlen-CLFLUSHn
  2157.  
  2158. Text 15,130,,Res, Reslen-Res
  2159. Text 115,130,,DTS, DTSlen-DTS
  2160. Text 215,130,,ACPI, ACPIlen-ACPI
  2161. Text 315,130,,MMX, MMXlen-MMX
  2162.  
  2163. Text 15,150,,FXSR, FXSRlen-FXSR
  2164. Text 115,150,,SSE, SSElen-SSE
  2165. Text  215,150,,SSE2, SSE2len-SSE2
  2166. Text 315,150,,SSn, SSnlen-SSn
  2167.  
  2168. Text 15,170,,HTT, HTTnlen-HTTn
  2169. Text 115,170,,TM, TMlen-TM
  2170. Text 215,170,,IA64, IA64len-IA64
  2171. Text 315,170,,PBE, PBElen-PBE
  2172. ;---------------
  2173. DrawLine 0,  410, 185,185,0x8080FF  ;10
  2174.  
  2175. mov   eax,$80000000
  2176. cpuid
  2177. ;mov eax, $03020101  \A0for test of reaction
  2178. test eax, eax
  2179. js  goooddd
  2180.  
  2181. baaadd:
  2182. Text 95,235,0x00000000,NEF, NEFlen-NEF
  2183. jmp too
  2184.  
  2185. goooddd:
  2186. Text 15,195,0x00000000,SS3, SS3len-SS3
  2187. Text 15,215,,MON, MONlen-MON
  2188. Text 15,235,,DS_CPL, DS_CPLlen-DS_CPL
  2189. Text 15,255,,EST, ESTlen-EST
  2190. Text 15,275,,TM2, TM2len-TM2
  2191. Text 15,295,,VMX, VMXlen-VMX
  2192. Text 15,315,,SVM, SVMlen-SVM
  2193.  
  2194. Text 15,355,0x00000000,SMX, SMXlen-SMX
  2195. Text 15,335,0x00000000,PAGE, PAGElen-PAGE
  2196. Text 15,375,0x00000000,MIS, MISlen-MIS
  2197. Text 115,355,0x00000000,WDT, WDTlen-WDT
  2198.  
  2199. Text 115,195,,CNXT_ID, CNXT_IDlen-CNXT_ID
  2200. Text 115,215,,CX16, CX16len-CX16
  2201. Text 115,235,,ETPRD, ETPRDlen-ETPRD
  2202. Text 115,255,,SYS, SYSlen-SYS
  2203. Text 115,275,,LAF, LAFlen-LAF
  2204. Text 115,295,,SSSE3, SSSE3len-SSSE3
  2205. Text 115,315,,MCR8, MCR8len-MCR8
  2206.  
  2207.  
  2208. Text 115,335,0x00000000,EAS, EASlen-EAS
  2209.  
  2210. Text 115,375,0x00000000,DNP, DNPlen-DNP
  2211.  
  2212.  
  2213. Text 315,375,0x00000000,SSE5, SSE5len-SSE5
  2214.  
  2215. Text 215,195,,MP, MPlen-MP
  2216. Text 215,215,,NX, NXlen-NX
  2217. Text 215,235,,MMXPi, MMXPilen-MMXPi
  2218. Text 215,255,,MMXn, MMXnlen-MMXn
  2219. Text 215,275,,FXSRn, FXSRnlen-FXSRn
  2220. Text 215,295,,DCA,DCAlen-DCA
  2221.  
  2222. Text 315,295,0x00000000,SSE41,SSE41len-SSE41
  2223. Text 215,335,0x00000000,x2APIC,x2APIClen-x2APIC
  2224. Text 215,355,0x00000000,ABM,ABMlen-ABM
  2225. Text 215,375,0x00000000,OSVW,OSVWlen-OSVW
  2226.  
  2227. Text 315,195,,FFXSR, FFXSRlen-FFXSR
  2228. Text 315,215,,TSCP, TSCPlen-TSCP
  2229. Text 315,235,,LM, LMlen-LM
  2230. Text 315,255,,DNo, DNolen-DNo
  2231. Text 315,275,,DN, DNlen-DN
  2232. Text 215,315,,CMPL, CMPLlen-CMPL
  2233. Text 315,315,0x00000000,SS42,SS42len-SS42
  2234. Text 315,335,0x00000000,PPCNT,PPCNTlen-PPCNT
  2235. Text 315,295,0x00000000,SSE4A,SSE4Alen-SSE4A
  2236. Text 315,355,0x00000000,SKINIT_,SKINIT_len-SKINIT_
  2237.  
  2238. too:
  2239. DrawLine 10,  400, 430,430,0x8080FF  ;10
  2240.  
  2241. Text 15,415,0x00000000,speed, speedlen-speed
  2242. Text 130,415,,kbpersec, kbperseclen-kbpersec
  2243.  
  2244. DrawLine 10, 80, 400, 400, 0x8080FF
  2245.  
  2246.  Text 90,400,0x80000000,performancestr, 0
  2247. DrawLine 322, 400, 400, 400, 0x8080FF
  2248. DrawLine 10, 10, 400, 490, 0x8080FF
  2249. DrawLine 400, 400, 400, 490, 0x8080FF
  2250.  
  2251. DrawLine 10, 400, 490, 490, 0x8080FF
  2252.  
  2253.               ; your proc
  2254.                 Text 20,415,0x808080FF,currentcpu, 0
  2255.                 Number 170,415,0,5,dword [iter],0x000000       ; + 15
  2256.                 ;Text 115,370,,kbpersec, kbperseclen-kbpersec  ;+ 355
  2257.                 mov eax, dword[iter]
  2258.                 ;mov ebx, 100
  2259.                 ;mul ebx
  2260.                 add eax, 215
  2261.                 mov word[linelen], ax   ; need to store it as drawline corrupts eax
  2262.                 DrawLine 215,  [linelen], 416,416,0x8080FF  ;10 + 355 , 357
  2263.                 DrawLine 215,  [linelen], 417,417,0x8080FF  ;10
  2264.                 DrawLine 215,  [linelen], 418,418,0x8080FF  ;10
  2265.         ;;;     DrawLine 20,  390, 371,371,0x8080FF  ;10
  2266.  
  2267.                 ; sample proc 1
  2268.                 Text 20,435,0x80000000,samplename1,0       ; 10 + 40 + 40 +40 + 380
  2269.                 Number 170,435,0,5,dword [samplespeed1],0x000000;   ; 25 + 40 + 40 +40 + 380
  2270.                 ;Text 115,470,0,kbpersec, kbperseclen-kbpersec  ; 25 + 40 + 40 +40 + 380
  2271.                 mov eax, dword[samplespeed1]
  2272.                 add eax, 215
  2273.                 mov dword[linelen], eax   ; need to store it as drawline corrupts eax
  2274.                 DrawLine 215,  [linelen], 436,436,0x8080FF  ;27+40 + 40 +40  + 380
  2275.                 DrawLine 215,  [linelen], 437,437,0x8080FF  ;10
  2276.                 DrawLine 215,  [linelen], 438,438,0x8080FF  ;10
  2277.  
  2278.                 ; sample proc 2
  2279.                 Text 20,455,0x80000000,samplename2,0     ; 10 + 40 + 350
  2280.                 Number 170,455,0,5,dword [samplespeed2],0x000000;   ; 25 + 40 + 350
  2281.                 ;Text 115,410,0,kbpersec, kbperseclen-kbpersec  ; 25 + 40 + 350
  2282.                 mov eax, dword[samplespeed2]
  2283.                 add eax, 215
  2284.                 mov dword[linelen], eax   ; need to store it as drawline corrupts eax
  2285.                 DrawLine 215,  [linelen], 456,456,0x8080FF  ;27+40 + 355
  2286.                 DrawLine 215,  [linelen], 457,457,0x8080FF  ;10
  2287.                 DrawLine 215,  [linelen], 458,458,0x8080FF  ;10
  2288.  
  2289.                ; sample proc 3
  2290.                 Text 20,475,0x80000000,samplename3,0     ; 10 + 40 + 40 + 38
  2291.                 Number 170,475,0,5,dword [samplespeed3],0x000000;   ; 25 + 40 + 40 + 355
  2292.                 ;Text 115,440,0,kbpersec, kbperseclen-kbpersec  ; 25 + 40 + 40 + 380
  2293.                 mov eax, dword[samplespeed3]
  2294.                 add eax, 215
  2295.                 mov dword[linelen], eax   ; need to store it as drawline corrupts eax
  2296.                 DrawLine 215,  [linelen], 476,476,0x8080FF  ;27+40 + 40
  2297.                 DrawLine 215,  [linelen], 477,477,0x8080FF  ;10
  2298.                 DrawLine 215,  [linelen], 478,478,0x8080FF  ;10
  2299.  
  2300.     mov  eax,12
  2301.     mov  ebx,2h
  2302.     mcall
  2303.  
  2304.     ret
  2305.  
  2306. linelen  dd 0
  2307. currentcpu db 'Current CPU',0
  2308. samplename1 db 'Intel Core i5 CPU', 0x000000    ; not real results!
  2309. samplespeed1 dd 62
  2310. samplename2 db 'Intel Core i3 CPU', 0
  2311. samplespeed2 dd 48
  2312. samplename3 db 'Intel Pentium Dual CPU', 0
  2313. samplespeed3 dd 35
  2314. performancestr db 'PERFORMANCE (KB/S in RSA test 256 bit)',0
  2315. ptsstring db ''
  2316. num_win2 db 0
  2317.  
  2318. ;   *******  main window *******
  2319.  
  2320. draw_window:
  2321.    mov eax,12
  2322.    mov  ebx,1h
  2323.    mcall
  2324.  
  2325.  Window 150,150,350,430, 0x34FFFFFF, 0x805080d0, title
  2326.           ; place size
  2327.  
  2328.    Button 15,345,92,23,2+0x40000000,0x03FFFFFF ; button "press for more"
  2329.  
  2330.         mov     esi, knopka
  2331.         mov     edi, img_area2
  2332.         call    ReadGIF
  2333. PutImage 15,345,93,24,img_area2+8 ; image "press for more"
  2334. ;         place   size
  2335.  
  2336.  
  2337.   Button 15,380,92,23,3+0x40000000,0x03FFFFFF ; button "save"
  2338.  
  2339.         mov     esi, knopka2
  2340.         mov     edi, img_area3
  2341.         call    ReadGIF
  2342.   PutImage 15,380,93,24,img_area3+8   ; image "save"
  2343. ;         place   size
  2344.  
  2345.     mov  eax,12
  2346.     mov  ebx,2h
  2347.     mcall
  2348.  
  2349.     Text 130,270,0x00000000,instruct, instructlen-instruct
  2350.     DrawLine  10,  330, 340,340,0x8080FF
  2351.     DrawLine 330,  330, 275,340;,0x8080FF
  2352.     DrawLine  10,   10, 275,340;,0x8080FF
  2353.     DrawLine  10,  125, 275,275;,0x8080FF
  2354.     DrawLine 230,  330, 275,275;,0x8080FF
  2355.  
  2356.   cmp dword[smallvendor], 'cAMD'
  2357.   jne cont
  2358.   cmp [f], $6
  2359.   jne cont
  2360.  
  2361. ;   Button 240,85,69,15,3,0x030000FF  ;  button for rating
  2362. ;    Text 245,90,0x00FFFFFF,FR, FRlen-FR ; text at button
  2363.  
  2364.    call newrating; !!!!
  2365.  
  2366.      cont:
  2367.     Text 15,50,0x00000000,tsum, tsumlen-tsum   ;
  2368.  
  2369. ;Number 82,50,0,4,dword [total],0x000000; MHz
  2370.     mov esi, total
  2371.     mov edi, tsum + 0xB  ;0xA
  2372.     call savenumber
  2373.  
  2374.     ;Number 110,50,0,2,dword [sot]; KHz
  2375.     mov esi, sot
  2376.     mov edi, tsum + 0x10
  2377.     call savenumber
  2378.  
  2379.     ;Number 75,110,1*256,1,dword [f],0x000000 ;
  2380.     mov esi, f
  2381.     mov edi, fam + 0x8     ;0x9
  2382.     call savenumber
  2383.  
  2384.     ;Number 75,130,,,dword [m]
  2385.     mov esi, m
  2386.     mov edi, mode + 0x7
  2387.     call savenumber
  2388.  
  2389.     ;Number 75,150,,,dword [s]
  2390.     mov esi, s
  2391.     mov edi, step + 0xa   ;0x9
  2392.     call savenumber
  2393.  
  2394.     ;Number 110,110,1*256,2,dword [ef]
  2395.     mov esi, ef
  2396.     mov edi, fam + 0xE    ;0x9
  2397.     call savenumber
  2398.  
  2399.     ;Number 110,130,,,dword [em]
  2400.     mov esi, em
  2401.     mov edi, mode + 0xE   ;0xD
  2402.     call savenumber
  2403.  
  2404.     mov esi, multb
  2405.     mov edi, multil + 0xB
  2406.     call savenumber
  2407.  
  2408.     ;Number 105,30,0,1,dword [multa]
  2409.     mov esi, multa
  2410.     mov edi, multil + 0xf
  2411.     call savenumber
  2412.  
  2413.     ;Number 140,170,0,2,dword [wayld],0x000000
  2414.     mov esi, wayld
  2415.     mov edi, cache2 + 0x14   ;0x14
  2416.     call savenumber
  2417.  
  2418.    ;Number 218,170,,,dword [lineld]
  2419.     mov esi, lineld
  2420.     mov edi, cache2 + 0x21
  2421.     call savenumber
  2422.  
  2423.     ;Number 140,190,,,dword [wayli]
  2424.     mov esi, wayli
  2425.     mov edi, cache + 0x14
  2426.     call savenumber
  2427.     ;Number 218,190,,,dword [lineli]
  2428.     mov esi, lineli
  2429.     mov edi, cache + 0x21
  2430.     call savenumber
  2431.  
  2432.     ;Number 140,210,,,dword [wayl2]
  2433.     mov esi, wayl2
  2434.     mov edi, cache3 + 0x14
  2435.     call savenumber
  2436.     ;Number 218,210,,,dword [linel2]
  2437.     mov esi, linel2
  2438.     mov edi, cache3 + 0x21
  2439.     call savenumber
  2440.  
  2441.     ;Number 140,230,,,dword [wayl3]
  2442.     mov esi, wayl3
  2443.     mov edi, cache4 + 0x14
  2444.     call savenumber
  2445.     ;Number 218,230,,,dword [linel3]
  2446.     mov esi, linel3
  2447.     mov edi, cache4 + 0x21
  2448.     call savenumber
  2449.  
  2450.     mov esi, L1d
  2451.     mov edi, cache2 + 0xa
  2452.     call savenumber
  2453.  
  2454. ;Number 75,190,,,dword [ L1i]
  2455.     mov esi, L1i
  2456.     mov edi, cache + 0xa
  2457.     call savenumber
  2458.  
  2459. ;Number 41,210,0,4,dword[L2]
  2460.     mov esi, L2
  2461.     mov edi, cache3 + 0x4    ;0x3
  2462.     call savenumber
  2463.  
  2464. ;Number 35,230,0,5,dword[L3]
  2465.     mov esi, L3
  2466.     mov edi, cache4 + 0x4   ;0x3
  2467.     call savenumber
  2468.  
  2469. ;-----------Features
  2470. ;Number 258,50,0,2,dword [micron]  ; micron
  2471.     mov esi, micron
  2472.     mov edi, tech + 0xE
  2473.     call savenumber
  2474.  
  2475.     mov esi, stdc
  2476.     mov edi, STDCA + 0x14
  2477.     call savenumber
  2478.  
  2479. ;Number 335,10,,,dword [extc],
  2480.     mov esi, extc
  2481.     mov edi, EXTCA + 0x14
  2482.     call savenumber
  2483.  
  2484.     Text 15,90,,cpuname, cpunamelen-cpuname;
  2485.     Text 255,250,,typen, typenlen-typen
  2486.     Text 175, 50,,tech, techlen-tech;
  2487.  
  2488.    red2:
  2489.  
  2490.     ;;;;;;;;;;;;;;;;;;;;;;;;
  2491.     goon:
  2492.  
  2493.     call decodebrand
  2494.  
  2495.    typedetect:
  2496.         mov     edx, t1
  2497.         cmp     [t], 00b
  2498.         jz      @f
  2499.         mov     edx, t2
  2500.         cmp     [t], 01b
  2501.         jz      @f
  2502.         mov     edx, t3
  2503.         cmp     [t], 11b
  2504.         jz      @f
  2505.         mov     edx, t4
  2506. @@:
  2507.         mov     ebx, 290*65536 + 250
  2508.         mov     ecx, 0x80000000
  2509.         mcall   4
  2510.  
  2511.     Text 15,250,,brandid, brandidlen-brandid
  2512.  
  2513.     Text 15,110,0x00000000,fam, famlen-fam
  2514.     Text 15,130,0x00000000,mode, modelen-mode
  2515.     Text 15,150,0x00000000,step, steplen-step
  2516.  
  2517.     Text 275,290,0x00000000,HTT, HTTlen-HTT
  2518.     Text 275,310,,sse3, sse3len-sse3
  2519.  
  2520.     Text 175,290,0x00000000,SSE41, SSE41len-SSE41
  2521.     Text 175,310,0x00000000,SSE42, SSE42len-SSE42
  2522.     Text 175,330,0x00000000,SSE5, SSE5len-SSE5
  2523.  
  2524.  
  2525.     Text 15,70,,name, namelen-name
  2526.     Text 15,290,,MMXs, MMXslen-MMXs
  2527.     Text 15,310,,SSE, SSElen-SSE
  2528.     Text 95,310,,SSE2, SSE2len-SSE2
  2529.  
  2530.     Text 95,290,,mmxp, mmxplen-mmxp
  2531.     Text 15,330,0x00000000,now, nowlen-now
  2532.     Text 95,330,,nowp, nowplen-nowp
  2533.  
  2534.     Text 115,350,0x00000000,ram, ramlen-ram
  2535.     Number 200,350,0,4,dword [ram_size_a],0x000000
  2536.  
  2537.     Number 270,350,0,4,dword [ram_size_t]
  2538.     Text 300,350,0x00000000,mb, mblen-mb
  2539.  
  2540.     Text 15, 190,0x00000000,cache, cachelen-cache
  2541.     Text 15,170,0x00000000,cache2, cache2len-cache2
  2542.     Text 15,210,,cache3, cache3len-cache3
  2543.     Text 15,230,,cache4, cache4len-cache4
  2544.     Text 110,70,0x00000000,dword[cname], 40
  2545.     call        load_gif
  2546.  
  2547.     cmp [nomultiplier], $1
  2548.     je nomultip
  2549. Text   15,30,0x00000000,multil2, multil2len-multil2
  2550. Text   175,30,0x00000000,freql2, freql2len-freql2
  2551. Number 85,30,0,2,dword [multb],0x000000;
  2552. Number 105,30,0,1,dword [multa]
  2553. Number 259,30,0,4,dword [freqbb]
  2554. Number 289,30,0,2,dword [freqll]
  2555.  
  2556.      JumpForCodename:
  2557.     cmp [codeN], $1
  2558.     je codeNIntel
  2559.     cmp [codeN], $2
  2560.     je codeNAMD
  2561.     cmp [codeN], $3
  2562.     je codeNCyrix
  2563.     cmp [codeN], $4
  2564.     je codeNCentaur
  2565.     cmp [codeN],$5
  2566.     je codeNTransmeta
  2567.     cmp [codeN], $6
  2568.     je codeNVortex
  2569.  
  2570. codeNIntel:
  2571. Text 75,70,0x00000000,Inteln, Intelnlen-Inteln
  2572. mov     esi, intel
  2573. call    load_gif
  2574. PutImage 135,107,201,49,img_area+8
  2575. jmp nnn
  2576.  
  2577. codeNAMD:
  2578. Text 75,70,,AMDn, AMDnlen-AMDn
  2579. mov     esi, amd
  2580. call    load_gif
  2581. PutImage 135,107,201,49,img_area+8
  2582. jmp nnn
  2583.  
  2584. codeNCyrix:
  2585. Text 75,70,0x00000000,Cyrixn, Cyrixnlen-Cyrixn
  2586. mov     esi, cyrix
  2587. call    load_gif
  2588. PutImage 135,107,201,49,img_area+8
  2589. jmp nnn
  2590.  
  2591. codeNCentaur:
  2592. Text 75,70,0x00000000,IDTn, IDTnlen-IDTn
  2593. mov     esi, idt
  2594. call    load_gif
  2595. PutImage 135,107,201,49,img_area+8
  2596. jmp nnn
  2597.  
  2598. codeNTransmeta:
  2599. Text 75,70,,Tranmsmetan, Tranmsmetanlen-Tranmsmetan
  2600. mov     esi, transmeta
  2601. call    load_gif
  2602. PutImage 135,107,201,49,img_area+8
  2603. jmp nnn
  2604.  
  2605. codeNVortex:
  2606. Text 75,70,0x00000000,Vortexn, Vortexnlen-Vortexn
  2607. mov     esi, vortex
  2608. call    load_gif
  2609. PutImage 135,107,201,49,img_area+8
  2610. jmp nnn
  2611.  
  2612. nomultip:
  2613. Text   15,30,0x00000000,multi3, multi3len-multi3
  2614. Text   175,30,0x00000000,freql3, freql3len-freql3
  2615. Text 259,30,0x00000000, clock0, clock0len-clock0
  2616.  
  2617. jmp JumpForCodename
  2618.  
  2619.  nnn:
  2620.  
  2621. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2622.  
  2623.     Text 15,10,0x00000000,stm, stmlen-stm
  2624. ;  Fix for deleting leading whitespaces
  2625. ;  in Intel P4's internal name
  2626. ;  by Madis Calme
  2627. ;  23.12.2004 ver. 0.81
  2628.     cld
  2629.     mov  edi,myname
  2630.     mov  al,20h
  2631.     or   ecx,-1
  2632.     repe scasb
  2633.     dec  edi
  2634.     mov  esi,mynamelen
  2635.     sub  esi,edi
  2636.     Text 105, 10, 0x00000000, edi, esi
  2637. ;-
  2638. Text 15,250,,brandid, brandidlen-brandid
  2639.  
  2640.     ret                 ;
  2641.  
  2642. call_OpenDialog:
  2643.  
  2644.     mov     [OpenDialog_data.type],1        ; Save
  2645.  
  2646.     push    dword OpenDialog_data
  2647.     call    [OpenDialog_Start]
  2648.  
  2649.     cmp     [OpenDialog_data.status],2      ; OpenDialog does not start
  2650.     je      .save_file_default_path
  2651.  
  2652.     cmp     [OpenDialog_data.status],1
  2653.     jne     still
  2654.  
  2655.     call    store_data
  2656.     jmp     still
  2657.  
  2658. .save_file_default_path:
  2659.      mov     edi,file_name
  2660.      mov     esi,file_default_path
  2661.      call    copy_file_name_path
  2662.      call    store_data
  2663.      jmp     still
  2664.  
  2665. copy_file_name_path:
  2666.         xor     eax,eax
  2667.         cld
  2668. @@:
  2669.         lodsb
  2670.         stosb
  2671.         test    eax,eax
  2672.         jnz     @r
  2673.         ret
  2674. ;-----------------------------------------------------------------------------
  2675. prepare_text_area:
  2676.         mov     edi,[store_text_area_start]
  2677.  
  2678.         push    edi
  2679.         mov     ecx,4096
  2680.         mov     eax,dword '    '
  2681.         cld
  2682.         rep     stosd
  2683.         pop     edi
  2684.         mov     [store_text_area_end], edi
  2685.  
  2686.         mov esi,title
  2687.         call addstring
  2688.  
  2689.         mov esi, stm
  2690.         call addstring
  2691.  
  2692.         mov esi, myname
  2693.         call addstring
  2694.  
  2695.    cmp [nomultiplier], $1
  2696.         je noMult
  2697.         jne detMulti
  2698.          ;jne detFreq
  2699.  
  2700.         detMulti:
  2701.         mov esi,multil
  2702.         call addstring
  2703.         jmp detFreq
  2704.  
  2705.         detFreq:
  2706.         mov esi, freql
  2707.         call addstring
  2708.  
  2709.         noMult:
  2710.         mov esi,multi3
  2711.         call addstring
  2712.  
  2713.         mov esi,freql3
  2714.         call addstring
  2715.  
  2716.         mov esi, tech
  2717.         call addstring
  2718.  
  2719.         mov esi, saveproc
  2720.         call addstring
  2721.  
  2722.         mov esi, cpuname
  2723.         call addstring
  2724.  
  2725.         mov esi, fam
  2726.         call addstring
  2727.  
  2728.         mov esi, mode
  2729.         call addstring
  2730.  
  2731.         mov esi, step
  2732.         call addstring
  2733.  
  2734.         mov esi, cache2
  2735.         call addstring
  2736.  
  2737.         mov esi, cache
  2738.         call addstring
  2739.  
  2740.         mov esi, cache3
  2741.         call addstring
  2742.  
  2743.         mov esi, cache4
  2744.         call addstring
  2745.  
  2746.         mov esi, brandid
  2747.         call addstring
  2748.  
  2749.         mov esi, MMXs
  2750.         call addstring
  2751.  
  2752.         mov esi, mmxp
  2753.         call addstring
  2754.  
  2755.         mov esi, now
  2756.         call addstring
  2757.  
  2758.         mov esi, HTT
  2759.         call addstring
  2760.  
  2761.         mov esi, SSE
  2762.         call addstring
  2763.  
  2764.         mov esi, SSE41
  2765.         call addstring
  2766.  
  2767.         mov esi, SSE42
  2768.         call addstring
  2769.  
  2770.         mov esi, SSE5
  2771.         call addstring
  2772.  
  2773.         mov esi, SSE2
  2774.         call addstring
  2775.  
  2776.         mov esi, nowp
  2777.         call addstring
  2778.  
  2779.         mov esi, sse3
  2780.         call addstring
  2781.  
  2782.         mov esi, standard
  2783.         call addstring
  2784.  
  2785.         mov esi, STDCA
  2786.         call addstring
  2787.  
  2788.         mov esi, EXTCA
  2789.         call addstring
  2790.  
  2791.         mov esi, FPU
  2792.         call addstring
  2793.  
  2794.         mov esi, VME
  2795.         call addstring
  2796.  
  2797.         mov esi, DE
  2798.         call addstring
  2799.  
  2800.         mov esi, PSE
  2801.         call addstring
  2802.  
  2803.         mov esi, TSC
  2804.         call addstring
  2805.  
  2806.         mov esi, MSR
  2807.         call addstring
  2808.  
  2809.         mov esi, PAE
  2810.         call addstring
  2811.  
  2812.         mov esi, MCE
  2813.         call addstring
  2814.  
  2815.         mov esi, CX8
  2816.         call addstring
  2817.  
  2818.         mov esi, APIC
  2819.         call addstring
  2820.  
  2821.         mov esi, Res
  2822.         call addstring
  2823.  
  2824.         mov esi, SEP
  2825.         call addstring
  2826.  
  2827.         mov esi, MTRR
  2828.         call addstring
  2829.  
  2830.         mov esi, PGE
  2831.         call addstring
  2832.  
  2833.         mov esi, MCA
  2834.         call addstring
  2835.  
  2836.         mov esi, CMOV
  2837.         call addstring
  2838.  
  2839.         mov esi, PAT
  2840.         call addstring
  2841.  
  2842.         mov esi, PSE36
  2843.         call addstring
  2844.  
  2845.         mov esi, PSNUM
  2846.         call addstring
  2847.  
  2848.         mov esi, CLFLUSHn
  2849.         call addstring
  2850.  
  2851.         mov esi, Res
  2852.         call addstring
  2853.  
  2854.         mov esi, DTS
  2855.         call addstring
  2856.  
  2857.         mov esi, ACPI
  2858.         call addstring
  2859.  
  2860.         mov esi, MMX
  2861.         call addstring
  2862.  
  2863.         mov esi, FXSR
  2864.         call addstring
  2865.  
  2866.         mov esi, SSE
  2867.         call addstring
  2868.  
  2869.  
  2870.         mov esi, SSn
  2871.         call addstring
  2872.  
  2873.         mov esi, HTT
  2874.         call addstring
  2875.  
  2876.         mov esi, TM
  2877.         call addstring
  2878.  
  2879.         mov esi, IA64
  2880.         call addstring
  2881.  
  2882.         mov esi, PBE
  2883.         call addstring
  2884.  
  2885.         mov esi, SS3
  2886.         call addstring
  2887.  
  2888.         mov esi, CNXT_ID
  2889.         call addstring
  2890.  
  2891.         mov esi, MP
  2892.         call addstring
  2893.  
  2894.         mov esi, FFXSR
  2895.         call addstring
  2896.  
  2897.         mov esi, MON
  2898.         call addstring
  2899.  
  2900.         mov esi, CX16
  2901.         call addstring
  2902.  
  2903.         mov esi, NX
  2904.         call addstring
  2905.  
  2906.         mov esi, TSCP
  2907.         call addstring
  2908.  
  2909.         mov esi, DS_CPL
  2910.         call addstring
  2911.  
  2912.         mov esi, ETPRD
  2913.         call addstring
  2914.  
  2915.         mov esi, MMXPi
  2916.         call addstring
  2917.  
  2918.         mov esi, LM
  2919.         call addstring
  2920.  
  2921.         mov esi, EST
  2922.         call addstring
  2923.  
  2924.         mov esi, SYS
  2925.         call addstring
  2926.  
  2927.         mov esi, MMXn
  2928.         call addstring
  2929.  
  2930.         mov esi, DNo
  2931.         call addstring
  2932.  
  2933.         mov esi, TM2
  2934.         call addstring
  2935.  
  2936.         mov esi, LAF
  2937.         call addstring
  2938.  
  2939.         mov esi, FFXSR
  2940.         call addstring
  2941.  
  2942.         mov esi, DN
  2943.         call addstring
  2944.  
  2945.         mov esi, VMX
  2946.         call addstring
  2947.  
  2948.         mov esi, SSSE3
  2949.         call addstring
  2950.  
  2951.         mov esi, DCA
  2952.         call addstring
  2953.  
  2954.         mov esi, CMPL
  2955.         call addstring
  2956.  
  2957.         mov esi, SVM
  2958.         call addstring
  2959.  
  2960.         mov esi, MCR8
  2961.         call addstring
  2962.  
  2963.         mov esi, SMX
  2964.         call addstring
  2965.  
  2966.         mov esi, x2APIC
  2967.         call addstring
  2968.  
  2969.         mov esi, PPCNT
  2970.         call addstring
  2971.  
  2972.         mov esi, PAGE
  2973.         call addstring
  2974.  
  2975.         mov esi, EAS
  2976.         call addstring
  2977.  
  2978.         mov esi, ABM
  2979.         call addstring
  2980.  
  2981.   mov esi, MIS
  2982.   call addstring
  2983.  
  2984.   mov  esi,OSVW
  2985.   call addstring
  2986.  
  2987.   mov esi,SKINIT_
  2988.   call addstring
  2989.  
  2990.   mov esi, WDT
  2991.   call addstring
  2992.  
  2993.         ret
  2994.  
  2995. addstring:
  2996.         mov edi, [store_text_area_end]
  2997.         xor eax, eax
  2998.         xor ecx, ecx
  2999.         cld
  3000. @@:
  3001.         lodsb
  3002.         stosb
  3003.         inc     [store_text_area_end]
  3004.         cmp     [esi], byte 0x0
  3005.         jnz     @r
  3006.         mov     al,0Ah
  3007.         stosb
  3008.  
  3009.         mov     [store_text_area_end],edi
  3010.         xor     edi,edi
  3011.         xor     esi, esi
  3012. ret
  3013.  
  3014. savenumber:
  3015.         xor eax, eax
  3016.         cld
  3017.         lodsw
  3018.         call numbertostring
  3019.         xor esi, esi
  3020.         xor edi, edi
  3021.  
  3022. ret
  3023.  
  3024. savestring:
  3025.         xor eax, eax
  3026.         cld
  3027.         lodsw
  3028.         ;call numbertostring
  3029.         xor esi, esi
  3030.         xor edi, edi
  3031.  
  3032. ret
  3033.  
  3034. numbertostring:
  3035.         mov bx, 10
  3036.         xor cx, cx
  3037. @@m1:
  3038.         xor dx, dx
  3039.         div bx
  3040.         push dx
  3041.         inc cx
  3042.         test ax, ax
  3043.         jnz @@m1
  3044. @@m2:
  3045.          pop ax
  3046.          add al, '0'
  3047.          stosb
  3048.          loop @@m2
  3049. ret
  3050.  
  3051. concatname:
  3052.         ;mov edi, [saveproc]
  3053.         xor eax, eax
  3054.         xor ecx, ecx
  3055.         cld
  3056. @@:
  3057.         lodsb
  3058.         stosb
  3059.         cmp     [esi], byte 0x0
  3060.         jnz     @r
  3061.  
  3062.         xor     edi,edi
  3063.         xor     esi, esi
  3064. ret
  3065.  
  3066. store_data:
  3067.         call prepare_text_area
  3068.         mov     eax,[store_text_area_start]
  3069.         mov     [fileinfo.return],eax
  3070.         mov     ebx,[store_text_area_end]
  3071.         sub     ebx,eax
  3072.         inc     ebx
  3073.         mov     [fileinfo.size],ebx
  3074.         mcall   70,fileinfo
  3075. ret
  3076.  
  3077. load_gif:
  3078.         mov     edi, img_area
  3079.         jmp     ReadGIF
  3080.  
  3081.  
  3082. ; DATA AREA
  3083.  
  3084. title    db   'CPUID 2.29 by S.Kuzmin & the KolibriOS team',0
  3085.  
  3086. stm:
  3087.    db 'Internal name:', 0
  3088.  
  3089. stmlen:
  3090.  
  3091. SS42:
  3092.     db 'SSE4.2:       ',0
  3093. SS42len:
  3094.  
  3095. SMX:
  3096.     db 'SMX:       ',0
  3097. SMXlen:
  3098.  
  3099. x2APIC:
  3100.     db 'x2APIC:       '
  3101. x2APIClen:
  3102.  
  3103. PPCNT:
  3104.     db 'POPCNT:          '
  3105. PPCNTlen:
  3106.  
  3107. PAGE:
  3108.     db 'Page1Gb:     '
  3109. PAGElen:
  3110.  
  3111. EAS:
  3112.     db 'EAS:                       ',0
  3113. EASlen:
  3114.  
  3115. newLabel:
  3116.     db '3DNP:                       ',0
  3117. newLabellen:
  3118.  
  3119.  
  3120. ABM:
  3121.     db 'ABM:      '
  3122. ABMlen:
  3123.  
  3124. SSE4A:
  3125.     db 'SSE4A:       '
  3126. SSE4Alen:
  3127.  
  3128. MIS:
  3129.     db 'MIS:      ',0
  3130. MISlen:
  3131.  
  3132. DNP:
  3133.     db '3DNP:       '
  3134. DNPlen:
  3135.  
  3136. OSVW:
  3137.     db 'OSVW:       ',0
  3138. OSVWlen:
  3139.  
  3140. SKINIT_:
  3141.     db 'SKINIT:          ',0
  3142. SKINIT_len:
  3143.  
  3144. WDT:
  3145.     db 'WDT:            ',0
  3146. WDTlen:
  3147.  
  3148.  
  3149. saveproc:
  3150.    db '                                                   ',0
  3151.  
  3152. multil:
  3153.   db 'Multiplier:   .          ', 0
  3154.  
  3155. multillen:
  3156.  
  3157. multil2:
  3158.  
  3159.   db 'Multiplier              .'
  3160.  
  3161. multil2len:
  3162.  
  3163. multi3:
  3164.  
  3165.   db 'Multiplier: n/a',0
  3166.  
  3167. multi3len:
  3168.  
  3169. freql:
  3170.  
  3171.   db 'System clock:     .   MHz', 0
  3172. freqllen:
  3173.  
  3174. freql2:
  3175.  
  3176.   db 'System clock            .   MHz'
  3177.  
  3178.  
  3179. freql2len:
  3180.  
  3181. freql3:
  3182.  
  3183.   db 'System clock: n/a '
  3184.  
  3185.  
  3186. freql3len:
  3187.  
  3188. tsum:
  3189.  
  3190.     db 'Frequency:     .    MHz  ',0
  3191.  
  3192. tsumlen:
  3193.  
  3194. tech:
  3195.  
  3196.     db 'Technology: 0.   micron ', 0
  3197.  
  3198. techlen:
  3199.  
  3200. name:
  3201.  
  3202. if lang eq it
  3203.  
  3204.     db 'Codename:',0
  3205.  
  3206. else
  3207.  
  3208.     db 'CODENAME:',0
  3209.  
  3210.  
  3211. end if
  3212.  
  3213. namelen:
  3214.  
  3215. vendorname:
  3216.  
  3217. if lang eq it
  3218.  
  3219.      db 'Vendor CPU              ', 0
  3220.  
  3221. else
  3222.  
  3223.      db 'CPU VENDOR:             ', 0
  3224.  
  3225. end if
  3226.  
  3227. vendornamelen:
  3228.  
  3229. cpuname:
  3230.  
  3231. if lang eq it
  3232.  
  3233.      db 'Vendor CPU              ', 0
  3234.  
  3235. else
  3236.  
  3237.      db 'CPU VENDOR:             ', 0
  3238.  
  3239. end if
  3240.  
  3241. cpunamelen:
  3242.  
  3243.  
  3244. fam:
  3245.  
  3246. if lang eq it
  3247.  
  3248.      db 'Famiglia:   std   ext', 0
  3249.  
  3250. else
  3251.  
  3252.      db 'FAMILY:   std   ext', 0
  3253.  
  3254. end if
  3255.  
  3256. famlen:
  3257.  
  3258. mode:
  3259.  
  3260. if lang eq it
  3261.  
  3262.       db 'Modello:    std    ext', 0
  3263.  
  3264. else
  3265.  
  3266.       db 'MODEL:    std    ext', 0
  3267.  
  3268. end if
  3269.  
  3270. modelen:
  3271.  
  3272. step:
  3273.  
  3274. if lang eq it
  3275.  
  3276.        db 'Stepping:        ', 0
  3277.  
  3278. else
  3279.  
  3280.        db 'STEPPING:        ', 0
  3281.  
  3282. end if
  3283.  
  3284. steplen:
  3285.  
  3286. cache:
  3287.  
  3288.     db 'L1(inst):     KB       -way set     -byte line size',0
  3289.  
  3290. cachelen:
  3291.  
  3292. cache2:
  3293.  
  3294.      db 'L1(data):     KB       -way set     -byte line size',0
  3295.  
  3296. cache2len:
  3297.  
  3298.  
  3299. cache3:
  3300.  
  3301.     db 'L2:      KB            -way set     -byte line size',0
  3302.  
  3303. cache3len:
  3304.  
  3305. cache4:
  3306.  
  3307.    db 'L3:      KB            -way set     -byte line size',0
  3308.  
  3309. cache4len:
  3310.  
  3311. brandid:
  3312.  
  3313.     db 'Brand:', 0
  3314.  
  3315. brandidlen:
  3316.  
  3317. MMXs:
  3318.  
  3319.     db 'MMX:         ',0
  3320.  
  3321. MMXslen:
  3322.  
  3323.  
  3324. total dd 0x0
  3325.  
  3326. total1 dd 0x0
  3327.  
  3328. rating dd 0x0
  3329.  
  3330. rat dd 0x0  ;
  3331.  
  3332.  
  3333.  
  3334. ram:
  3335.  
  3336. if lang eq it
  3337.  
  3338.                 db 'RAM libera:        su'
  3339.  
  3340. else
  3341.  
  3342.                 db 'Available RAM:     out of'
  3343.  
  3344. end if
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350. ramlen:
  3351.  
  3352.  
  3353.  
  3354. NEF:
  3355.  
  3356. db 'EXTENDED FEATURES ARE NOT AVAILABLE',0
  3357.  
  3358. NEFlen:
  3359.  
  3360.  
  3361.  
  3362. mb :
  3363.  
  3364. db 'MB'
  3365.  
  3366. mblen:
  3367.  
  3368.  
  3369.  
  3370. logcpus :
  3371.  
  3372. db 'Number of logical CPU:'
  3373.  
  3374. logcpuslen:
  3375.  
  3376.  
  3377.  
  3378. speed :
  3379.  
  3380. if lang eq it
  3381.  
  3382. ;               db 'Performance',0
  3383.  
  3384. else
  3385.  
  3386. ;               db 'PERFORMANCE:',0
  3387.  
  3388. end if
  3389.  
  3390. speedlen:
  3391.  
  3392.  
  3393.  
  3394. kbpersec:
  3395.  
  3396. db 'KB/SEC'
  3397.  
  3398. kbperseclen:
  3399.  
  3400.  
  3401.  
  3402. instruct:
  3403.  
  3404. if lang eq it
  3405.  
  3406.                 db 'Set istruzioni'
  3407.  
  3408. else
  3409.  
  3410.                 db 'Instruction sets'
  3411.  
  3412. end if
  3413.  
  3414. instructlen:
  3415.  
  3416.  
  3417.  
  3418. standard    db 'Standard and Extended features plus Performance test',0
  3419.  
  3420.  
  3421. STDCA:
  3422.  
  3423.     db 'Highest STD call is         ',0
  3424.  
  3425. STDCAlen:
  3426.  
  3427.  
  3428.  
  3429. EXTCA:
  3430.  
  3431.     db 'Highest EXT call is         h',0
  3432.  
  3433. EXTCAlen:
  3434.  
  3435.  
  3436. oblom:
  3437.  
  3438. if lang eq it
  3439.  
  3440.                 db 'CPUID non e disponibile'
  3441.  
  3442. else
  3443.  
  3444.                 db 'SORRY, CPUID IS NOT AVAILABLE'
  3445.  
  3446. end if
  3447.  
  3448. oblomlen:
  3449.  
  3450.  
  3451. other:
  3452.  
  3453. if lang eq it
  3454.  
  3455.                 db 'Questo vendor non e supportato'
  3456.  
  3457. else
  3458.  
  3459.                 db 'SORRY, THIS VENDOR IS NOT SUPPORTED YET'
  3460.  
  3461. end if
  3462.  
  3463. otherlen:
  3464.  
  3465. cacheP4:
  3466.  
  3467.     db 'L1(inst):     Kuops    -way set     -byte line size'
  3468.  
  3469. cacheP4len:
  3470.  
  3471.  
  3472.  
  3473.  
  3474. typen:
  3475.  
  3476. if lang eq it
  3477.  
  3478.                 db 'Tipo:'
  3479.  
  3480. else
  3481.  
  3482.                 db 'Type:'
  3483.  
  3484. end if
  3485.  
  3486.  
  3487.  
  3488. typenlen:
  3489.  
  3490.  
  3491.  
  3492. pr:
  3493.  
  3494.   db 'P-rating:'
  3495.  
  3496. prlen:
  3497.  
  3498.  
  3499.  
  3500.  
  3501. AMDn:
  3502.  
  3503.     db 'AMD',0
  3504.  
  3505. AMDnlen:
  3506.  
  3507. AMDnNew:
  3508.  
  3509.     db 'CODENAME: AMD',0
  3510.  
  3511. AMDnNewlen:
  3512.  
  3513. Inteln:
  3514.  
  3515.     db 'Intel',0
  3516.  
  3517. Intelnlen:
  3518.  
  3519. IntelnNew:
  3520.  db 'CODENAME: Intel',0
  3521.  
  3522. IntelnNewlen:
  3523.  
  3524.  
  3525. Cyrixn:
  3526.  
  3527.     db 'Cyrix',0
  3528.  
  3529. Cyrixnlen:
  3530.  
  3531. IDTn:
  3532.  
  3533.      db 'IDT/Centaur',0
  3534.  
  3535. IDTnlen:
  3536.  
  3537. Centaurn:
  3538.  
  3539.      db 'VIA',0
  3540.  
  3541. Centaurnlen:
  3542.  
  3543.  
  3544.  
  3545. Tranmsmetan:
  3546.  
  3547.      db 'Transmeta',0
  3548.  
  3549. Tranmsmetanlen:
  3550.  
  3551.  
  3552. Vortexn:
  3553.     db 'Vortex86',0
  3554. Vortexnlen:
  3555.  
  3556.  
  3557. mmxp:
  3558.  
  3559.     db 'MMX+:         ',0
  3560.  
  3561. mmxplen:
  3562.  
  3563.  
  3564.  
  3565. HTT:
  3566.  
  3567.     db 'HTT:          ',0
  3568.  
  3569. HTTlen:
  3570.  
  3571.  
  3572. HTTn:
  3573.  
  3574.     db 'HTT:         ',0
  3575.  
  3576. HTTnlen:
  3577.  
  3578.  
  3579. sse3:
  3580.  
  3581.     db 'SSE3:         ',0
  3582.  
  3583. sse3len:
  3584.  
  3585. SSE41:
  3586.     db 'SSE4.1:          ',0
  3587. SSE41len:
  3588.  
  3589. SSE42:
  3590.     db 'SSE4.2:             ',0
  3591. SSE42len:
  3592.  
  3593. SSE5:
  3594.     db 'SSE5:               ',0
  3595. SSE5len:
  3596.  
  3597. now:
  3598.  
  3599.     db '3DNOW!:         ',0
  3600.  
  3601. nowlen:
  3602.  
  3603. nowp:
  3604.  
  3605.     db '3DNOW!+:         ',0
  3606.  
  3607. nowplen:
  3608.  
  3609. ;-Type
  3610.  
  3611. t1      db      'OEM',0
  3612.  
  3613. t2      db      'Overdrive',0
  3614.  
  3615. t3      db      'Dual',0
  3616.  
  3617. t4      db      'Unknown',0
  3618.  
  3619.  
  3620.  
  3621. ;----------Intel
  3622.  
  3623. P50:
  3624.  
  3625. db 'P5 A-step',0
  3626.  
  3627. P50len:
  3628.  
  3629. P5:
  3630.  
  3631. db 'P5',0
  3632.  
  3633. P5len:
  3634.  
  3635. P54T:
  3636.  
  3637. db 'P24T Overdrive',0
  3638.  
  3639. P54Tlen:
  3640.  
  3641. P54C:
  3642.  
  3643. db 'P54C',0
  3644.  
  3645. P54Clen:
  3646.  
  3647. P55C:
  3648.  
  3649. db 'P55C (with MMX)',0
  3650.  
  3651. P55Clen:
  3652.  
  3653. ; ---
  3654.  
  3655. P60:
  3656.  
  3657. db 'Pentium Pro A-step',0
  3658.  
  3659. P60len:
  3660.  
  3661. P61:
  3662.  
  3663. db 'Pentium Pro',0
  3664.  
  3665. P61len:
  3666.  
  3667. P63:
  3668.  
  3669. db 'Pentium II (Klamath)',0
  3670.  
  3671. P63len:
  3672.  
  3673. P65:
  3674.  
  3675. db 'Pentium II (Deschutes)',0
  3676.  
  3677. P65len:
  3678.  
  3679. P66:
  3680.  
  3681. db 'Celeron (Medocino)',0
  3682.  
  3683. P66len:
  3684.  
  3685. P67:
  3686.  
  3687. db 'Pentium III (Katmai)',0
  3688.  
  3689. P67len:
  3690.  
  3691. P68:
  3692.  
  3693. db 'Pentium III (Coppermine)',0
  3694.  
  3695. P68len:
  3696.  
  3697. P69:
  3698.  
  3699. db 'Pentium M (Banias)',0
  3700.  
  3701. P69len:
  3702.  
  3703. P6A:
  3704.  
  3705. db 'Pentium III Xeon (Cascades)',0
  3706.  
  3707. P6Alen:
  3708.  
  3709. P6B:
  3710.  
  3711. db 'Pentium III (Tualatin)',0
  3712.  
  3713. P6Blen:
  3714.  
  3715. P6D:
  3716.  
  3717. db 'Pentium M (Dothan)',0
  3718.  
  3719. P6Dlen:
  3720.  
  3721. P6E:
  3722.  
  3723. db 'Pentium M (Yonah)/ Core',0
  3724.  
  3725. P6Elen:
  3726.  
  3727. P6F:
  3728.  
  3729. db 'Pentium D (Conroe)/ Core 2 (Kentsfield)',0
  3730.  
  3731. P6Flen:
  3732.  
  3733. ;---
  3734.  
  3735. PS0:
  3736.  
  3737. db 'Itanium (IA-64)',0
  3738.  
  3739. PS0len:
  3740.  
  3741. ;------------
  3742.  
  3743. PF0:
  3744.  
  3745. db 'Pentium 4 (Willamete)',0
  3746.  
  3747. PF0len:
  3748.  
  3749. PF2:
  3750.  
  3751. db 'Pentium 4 (Northwood)',0
  3752.  
  3753. PF2len:
  3754.  
  3755. PF3:
  3756.  
  3757. db 'Pentium 4 (Prescott)',0
  3758.  
  3759. PF3len:
  3760.  
  3761. PF5:
  3762.  
  3763. db 'Pentium 4 (Tejas)',0
  3764.  
  3765. PF5len:
  3766.  
  3767. PF6:
  3768.  
  3769. db 'Pentium 4 (Presler)',0
  3770.  
  3771. PF6len:
  3772.  
  3773. ;----------------Intel Celerons
  3774.  
  3775. P65c:
  3776.  
  3777. db 'Celeron (Covington)',0
  3778.  
  3779. P65clen:
  3780.  
  3781. P68c:
  3782.  
  3783. db 'Celeron (Coppermine)',0
  3784.  
  3785. P68clen:
  3786.  
  3787. P6Bc:
  3788.  
  3789. db 'Celeron (Tualatin)',0
  3790.  
  3791. P6Bclen:
  3792.  
  3793. PF0c:
  3794.  
  3795. db 'Celeron (Willamete)',0
  3796.  
  3797. PF0clen:
  3798.  
  3799. PF2c:
  3800.  
  3801. db 'Celeron (Northwood)',0
  3802.  
  3803. PF2clen:
  3804.  
  3805. PF3c:
  3806.  
  3807. db 'Celeron (Prescott)',0
  3808.  
  3809. PF3clen:
  3810.  
  3811. PF5c:
  3812.  
  3813. db 'Celeron D (Texas)',0
  3814.  
  3815. PF5clen:
  3816.  
  3817. PF6c:
  3818.  
  3819. db 'Celeron D (Presler)',0
  3820.  
  3821. PF6clen:
  3822.  
  3823. ;---------New Intel
  3824. P3A:
  3825.  
  3826. db 'IvyBridge',0
  3827.  
  3828. P3Alen:
  3829.  
  3830. P2A:
  3831.  
  3832. db 'Sandy Bridge',0
  3833.  
  3834. P2Alen:
  3835.  
  3836. P2D:
  3837. db 'Sandy bridge-E',0
  3838.  
  3839. P2Dlen:
  3840.  
  3841.  
  3842. P25:
  3843. db 'Arrandale',0
  3844. P25len:
  3845.  
  3846. P2C:
  3847. db 'Gulftown',0
  3848. P2Clen:
  3849.  
  3850. P2F:
  3851. db 'Westmere-EX',0
  3852. P2Flen:
  3853.  
  3854. P1E:
  3855. db 'Clarksfield',0
  3856. P1Elen:
  3857.  
  3858. P1A:
  3859. db 'Bloomfield',0
  3860. P1Alen:
  3861.  
  3862. P2E:
  3863. db 'Nehalem-EX',0
  3864. P2Elen:
  3865.  
  3866. P17:
  3867. db 'Yorkfield',0
  3868. P17len:
  3869.  
  3870. P1D:
  3871. db 'Dunnington',0
  3872. P1Dlen:
  3873.  
  3874. P0F:
  3875. db 'Clovertown',0
  3876. P0Flen:
  3877.  
  3878. P16:
  3879. db 'Merom Conroe',0
  3880. P16len:
  3881.  
  3882. P06:
  3883. db 'Cedar Mill',0
  3884. P06len:
  3885.  
  3886. P03:
  3887. db 'Nocona Irwindale',0
  3888. P03len:
  3889.  
  3890. P04:
  3891. db 'NoconaIrwindale',0
  3892. P04len:
  3893.  
  3894. P0D:
  3895. db 'Dothan',0
  3896. P0Dlen:
  3897.  
  3898. P36:
  3899. db 'Cedarview',0
  3900. P36len:
  3901.  
  3902. P26:
  3903. db 'Lincroft',0
  3904. P26len:
  3905.  
  3906. P1C:
  3907. db 'Pineview',0
  3908. P1Clen:
  3909.  
  3910. no_known:
  3911. db 'SORRY, CODENAME IS NOT SUPPORTED YET '
  3912.  
  3913. ;---------AMD
  3914.  
  3915. A50     db 'K5 (PR75, PR90, PR100)',0
  3916.  
  3917. A51     db '5k86 (PR120, PR133)',0
  3918.  
  3919. A52     db '5k86 (PR166)',0
  3920.  
  3921. A53     db '5k86 (PR200)',0
  3922.  
  3923. A56     db 'K6',0
  3924.  
  3925. A57     db 'K6',0
  3926.  
  3927. A58     db 'K6-2',0
  3928.  
  3929. A59     db 'K6-III',0
  3930.  
  3931. A5D     db 'K6-2+ or K6-III+',0
  3932.  
  3933. ;-------------------
  3934.  
  3935. At1     db 'Athlon',0
  3936.  
  3937. At2     db 'Athlon',0
  3938.  
  3939. At3     db 'Duron (Spitfire)',0
  3940.  
  3941. At4     db 'Athlon (Thunderbird)',0
  3942.  
  3943. At6     db 'AthlonXP (Palomino)',0
  3944.  
  3945. At7     db 'Duron (Morgan)',0
  3946.  
  3947. At8     db 'AthlonXP (Thoroughbred)',0
  3948.  
  3949. At8a    db 'Duron (Applebred)',0
  3950.  
  3951. Ata     db 'AthlonXP (Barton)',0
  3952.  
  3953. Atat    db 'AthlonXP (Thorton)',0
  3954.  
  3955. ;-------------------
  3956. AthlonKuma:
  3957.  
  3958. db 'AMD Athlon 7750 Black Edition',0
  3959.  
  3960. AthlonKumalen:
  3961.  
  3962. AB23:
  3963.  
  3964. db 'Opteron 2300-series',0
  3965.  
  3966. AB23len:
  3967.  
  3968. AB83:
  3969.  
  3970. db 'Opteron 8300-series',0
  3971.  
  3972. AB83len:
  3973.  
  3974. AB9:
  3975. db 'Phenom X4',0
  3976.  
  3977. AB9len:
  3978.  
  3979. AB8right2:
  3980.  
  3981. db 'Phenom X3',0
  3982.  
  3983. AB8right2len:
  3984.  
  3985. AB4:
  3986.  
  3987. db 'Athlon X2',0
  3988.  
  3989. AB4len:
  3990.  
  3991. AB1:
  3992.  
  3993. db 'Sempron',0
  3994.  
  3995. AB1len:
  3996.  
  3997. ABC2:
  3998.  
  3999. db 'Opteron (Shanghai) 2387',0
  4000.  
  4001. ABC2len:
  4002.  
  4003. AB6:
  4004.  
  4005. db 'Opteron (Magny-Cours)',0
  4006.  
  4007. AB6len:
  4008.  
  4009. ABC3:
  4010.  
  4011. db 'Opteron (Shanghai) 8300 series',0
  4012.  
  4013. ABC3len:
  4014.  
  4015. ABM2:
  4016.  
  4017. db 'Turion II ',0
  4018.  
  4019. ABM2len:
  4020.  
  4021. ;---
  4022.  
  4023. AF1:
  4024.  
  4025. db 'Dual-core Opteron',0
  4026.  
  4027. AF1len:
  4028.  
  4029. AF3:
  4030.  
  4031. db 'Athlon 64 (Toledo)',0
  4032.  
  4033. AF3len:
  4034.  
  4035. AF4:
  4036.  
  4037. db 'Athlon 64 (ClawHammer)',0
  4038.  
  4039. AF4len:
  4040.  
  4041. AF5:
  4042.  
  4043. db 'Opteron/Athlon 64 FX (SledgeHammer)',0
  4044.  
  4045. AF5len:
  4046.  
  4047.  
  4048. AFC:
  4049.  
  4050. db 'Athlon 64 (Newcastle)',0
  4051.  
  4052. AFClen:
  4053.  
  4054.  
  4055. AFF:
  4056.  
  4057. db 'Athlon 64 (Winchester)',0
  4058.  
  4059. AFFlen:
  4060.  
  4061.  
  4062. AFS:
  4063.  
  4064. db 'Athlon 64 (San Diego)',0
  4065.  
  4066. AFSlen:
  4067.  
  4068.  
  4069. AFV:
  4070.  
  4071. db 'Athlon 64 (Venice)',0
  4072.  
  4073. AFVlen:
  4074.  
  4075.  
  4076. AFCs:
  4077.  
  4078. db 'Sempron (Paris)',0
  4079.  
  4080. AFCslen:
  4081.  
  4082.  
  4083.  
  4084. AFCsp:
  4085.  
  4086. db 'Sempron (Palermo)',0
  4087.  
  4088. AFCsplen:
  4089.  
  4090.  
  4091.  
  4092. ;---------Cyrix
  4093.  
  4094. C52:
  4095.  
  4096. db '6x86 M1',0
  4097.  
  4098. C52len:
  4099.  
  4100. C54:
  4101.  
  4102. db 'MediaGX',0
  4103.  
  4104. C54len:
  4105.  
  4106. C60:
  4107.  
  4108. db '6x86MX M2',0
  4109.  
  4110. C60len:
  4111.  
  4112. C65:
  4113.  
  4114. db 'C3 (Cyrix M2)',0 ;?
  4115.  
  4116. C65len:
  4117.  
  4118. ;--------IDT
  4119.  
  4120. V54:
  4121.  
  4122. db 'WinChip C6',0
  4123.  
  4124. V54len:
  4125.  
  4126. V58:
  4127.  
  4128. db 'WinChip 2',0
  4129.  
  4130. V58len:
  4131.  
  4132. V59:
  4133.  
  4134. db 'WinChip 3',0
  4135.  
  4136. V59len:
  4137.  
  4138. ;-------VIA
  4139.  
  4140. V66:
  4141.  
  4142. db 'C3 (Samuel)',0  ; Joshua is unreleased 065
  4143.  
  4144. V66len:
  4145.  
  4146. V67:
  4147.  
  4148. db 'C3 (Samuel2/Ezra)',0 ; ?
  4149.  
  4150. V67len:
  4151.  
  4152. V68:
  4153.  
  4154. db 'C3 (Ezra-T/Eden)',0 ;?
  4155.  
  4156. V68len:
  4157.  
  4158. V69:
  4159.  
  4160. db 'C3 (Antaur/Nehemiah)',0 ;?
  4161.  
  4162. V69len:
  4163.  
  4164. VA:
  4165.  
  4166. db 'C7 (Esther)',0 ;?
  4167.  
  4168. VAlen:
  4169.  
  4170. ;---------Transmeta
  4171.  
  4172. T5:
  4173.  
  4174. db 'Crusoe',0 ;
  4175.  
  4176. T5len:
  4177.  
  4178. TF:
  4179.  
  4180. db 'Efficeon',0 ;
  4181.  
  4182. TFlen:
  4183.  
  4184. ;---------
  4185.  
  4186. NG:
  4187.  
  4188.     db 'Next generation CPU',0
  4189.  
  4190. NGlen:
  4191.  
  4192.  
  4193. athloncoef      db      110, 115, 120, 125, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 120
  4194.  
  4195.                 db      190, 120, 200, 130, 135, 140, 210, 150, 220, 160, 165, 170, 180, 230, 240
  4196.  
  4197. athlonmcoef:    db      110, 115, 120, 125, 50, 55, 60, 65,  70, 75, 80, 85, 90, 95, 100, 105
  4198.  
  4199.                 db      30, 190, 40, 200, 130, 135, 14, 210, 150, 220, 160, 165, 170, 230, 240
  4200.  
  4201. athloncoef3     db      45, 50, 40, 55, 25, 30, 60, 35
  4202.  
  4203. p4coef          db      160, 170, 180, 190, 200, 210, 220, 230, 80, 90, 100, 110, 120, 130, 140, 150    ; Pentium 4 (Willamete)
  4204.  
  4205. 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
  4206.  
  4207. 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
  4208.  
  4209. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4210. I_END:
  4211.  
  4212. img_area:          ; image is going to be unpacked to here
  4213. rb 201*49*3+8      ; image resolution (bits to reserve)
  4214.  
  4215. img_area2:         ; image is going to be unpacked to here
  4216. rb 93*24*3+8       ; image resolution (bits to reserve)
  4217.  
  4218. img_area3:         ; image is going to be unpacked to here
  4219. rb 93*24*3+8       ; image resolution (bits to reserve)
  4220.  
  4221. gif_hash_area:
  4222. rd 4096+1          ;hash area size for unpacking gif
  4223. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4224.  
  4225. system_dir_ProcLib      db '/sys/lib/proc_lib.obj',0
  4226.  
  4227. err_message_found_lib2  db 'proc_lib.obj - Not found!',0
  4228.  
  4229. err_message_import2     db 'proc_lib.obj - Wrong import!',0
  4230.  
  4231. head_f_i:
  4232. head_f_l        db 'error',0
  4233. ;---------------------------------------------------------------------
  4234. l_libs_start:
  4235.  
  4236. library02  l_libs system_dir_ProcLib+9, path, library_path, system_dir_ProcLib, \
  4237. err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
  4238.  
  4239. end_l_libs:
  4240. ;---------------------------------------------------------------------
  4241. align 4
  4242. ProcLib_import:
  4243. OpenDialog_Init         dd aOpenDialog_Init
  4244. OpenDialog_Start        dd aOpenDialog_Start
  4245. ;OpenDialog__Version    dd aOpenDialog_Version
  4246.         dd      0
  4247.         dd      0
  4248. aOpenDialog_Init        db 'OpenDialog_init',0
  4249. aOpenDialog_Start       db 'OpenDialog_start',0
  4250. ;aOpenDialog_Version    db 'Version_OpenDialog',0
  4251. ;---------------------------------------------------------------------
  4252. align 4
  4253. OpenDialog_data:
  4254. .type                   dd 0
  4255. .procinfo               dd Proc_Info    ;+4
  4256. .com_area_name          dd communication_area_name      ;+8
  4257. .com_area               dd 0    ;+12
  4258. .opendir_pach           dd temp_dir_pach        ;+16
  4259. .dir_default_pach       dd communication_area_default_pach      ;+20
  4260. .start_path             dd open_dialog_path     ;+24
  4261. .draw_window            dd draw_window  ;+28
  4262. .status                 dd 0    ;+32
  4263. .openfile_pach          dd file_name    ;+36
  4264. .filename_area          dd filename_area        ;+40
  4265. .filter_area            dd Filter
  4266. .x:
  4267. .x_size                 dw 420 ;+48 ; Window X size
  4268. .x_start                dw 10 ;+50 ; Window X position
  4269. .y:
  4270. .y_size                 dw 320 ;+52 ; Window y size
  4271. .y_start                dw 10 ;+54 ; Window Y position
  4272.  
  4273. communication_area_name:
  4274.         db 'FFFFFFFF_open_dialog',0
  4275. open_dialog_path:
  4276.         db '/sys/File Managers/opendial',0
  4277. communication_area_default_pach:
  4278.         db '/sys',0
  4279. Filter:
  4280. dd      Filter.end - Filter.1
  4281. .1:
  4282. db      'TXT',0
  4283. db      'LOG',0
  4284. .end:
  4285. dd      0
  4286.  
  4287. file_default_path:
  4288.         db '/sys/'
  4289. start_temp_file_name:
  4290.         db 'CPUID.txt',0
  4291.  
  4292. ;---------------------------------------------------------------------
  4293. align   4
  4294. fileinfo:
  4295. .subfunction    dd 2
  4296. .Offset         dd 0
  4297. .Offset_1       dd 0
  4298. .size           dd 4096
  4299. .return         dd 0
  4300.                 db 0
  4301. .name:          dd file_name
  4302.  
  4303. store_text_area_start   dd ?
  4304. store_text_area_end     dd ?
  4305. store_text_size         dd ?
  4306.  
  4307. ;---------------------------------------------------------------------
  4308. library_path:
  4309.         rb 4096
  4310. ;---------------------------------------------------------------------
  4311. path:
  4312.         rb 4096
  4313. ;---------------------------------------------------------------------
  4314. temp_dir_pach:
  4315.         rb 4096
  4316. ;---------------------------------------------------------------------
  4317. file_name:
  4318.         rb 4096
  4319. ;---------------------------------------------------------------------
  4320. file_name_1:
  4321.         rb 4096
  4322. ;---------------------------------------------------------------------
  4323. filename_area:
  4324.         rb 256
  4325. ;---------------------------------------------------------------------
  4326.         rb 4096
  4327. stacktop:
  4328. ;---------------------------------------------------------------------
  4329. Proc_Info       process_information
  4330. ; RSA test data
  4331. align 4
  4332.   num1 rd 40
  4333.   num2 rd 40
  4334.   num3 rd 40
  4335.   iter rd 1
  4336.   openkey rd 1
  4337.  
  4338.  
  4339. IncludeUGlobals
  4340.  
  4341. nocpuid db ?
  4342. ost dd ?
  4343. sot dd ?
  4344. f dd ?
  4345. m dd ?
  4346. s dd ?
  4347. t dd ?
  4348.  
  4349. ef dd ?
  4350. em dd ?
  4351.  
  4352. multiplier dd ?
  4353. multa dd ?
  4354. multb dd ?
  4355. smallvendor dd ?
  4356. L1d  dd ?
  4357. L1i  dd ?
  4358. L2   dd ?
  4359. L3   dd ?
  4360. micron dd ?
  4361. brand  dd ?
  4362. newpc  dd ?
  4363. nomultiplier dd ?
  4364. ram_size_a dd ?
  4365. ram_size_t dd ?
  4366.  
  4367. stdc dd ?
  4368. extc dd ?
  4369.  
  4370. FRS dd ?
  4371. freqsel db ?
  4372. sse3sup db ?
  4373. sse41sup dd ?
  4374. sse42sup dd ?
  4375. sse5sup dd ?
  4376.  
  4377. freqbb dd ?
  4378. freqll dd ?
  4379.  
  4380. wayli dd ?
  4381. lineli dd ?
  4382.  
  4383. wayld dd ?
  4384. lineld dd ?
  4385.  
  4386. wayl2 dd ?
  4387. linel2 dd ?
  4388.  
  4389. wayl3 dd ?
  4390. linel3 dd ?
  4391. che db ? ; numbers of calls for Intel caches detection
  4392. cname dd ?
  4393. codeN dd ?
  4394.  
  4395. myname:
  4396.    rb 48
  4397.  
  4398. mynamelen:
  4399.    db ?
  4400.  
  4401. align 4
  4402.   thread2_stack_area rb 64
  4403.   thread2_esp = $
  4404. U_END:
  4405.