Subversion Repositories Kolibri OS

Rev

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