Subversion Repositories Kolibri OS

Rev

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