Subversion Repositories Kolibri OS

Rev

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

  1. ;
  2. ; Ghost Monitor - óòèëèòà (ñòðåññ) òåñòèðîâàíèÿ è ìîíèòîðèíãà ñèñòåìû
  3. ; Copyright (C) 2005, 2006, 2007 Mihailov Ilia (ghost.nsk@mail.ru)
  4. ; All Right Reserved
  5.  
  6. ;
  7. ;
  8. ; Âêëàäêà èíôîðìàöèè î ñèñòåìå
  9. ;
  10. ; Äîïèñàòü åù¸ ÷òîèòü (ìàëîâàòî áóäåò)
  11. ;
  12. ;
  13.  
  14.         ; Ïèøåì ïàðàìåòðû
  15.         mov     edx, lab_info_tab
  16.         mov     ebx, 17 * 65536 + 285
  17.         call    show_text
  18.  
  19.         ; Ïèøåì ïðîèçâîäèòåëÿ ïðîöåññîðà
  20.         mov     edx, Vendor
  21.         mov     esi, 12
  22.         mov     ebx, 160 * 65536 + 285
  23.         int     0x40
  24.         ; Ïîääåðæêà MMX
  25.         mov     ebx, 160 * 65536 + 305
  26.         mov     esi, 3
  27.         mov     edx, msg_yes
  28.         cmp     byte[CPU_mmx], 1
  29.         je      mmx_en
  30.         mov     edx, msg_no
  31. mmx_en: int     0x40
  32.         ; ×èï ìîíèòîðèíãà
  33.         mov     edx, [hwm_chip_name]
  34.         mov     al, byte[edx]
  35.         movzx   esi, al
  36.         inc     edx
  37.         mov     ebx, 160 * 65536 + 325
  38.         mov     al, 4
  39.         int     0x40
  40.         ; ×àñòîòà ïðîöåññîðà
  41.         mov     eax, 18
  42.         mov     ebx, 5
  43.         int     0x40
  44.  
  45.         xor     edx, edx
  46.         mov     ebx, 1000000
  47.         div     ebx
  48.         mov     ecx, eax
  49.         call    digit_len
  50.         mov     eax, 47
  51.         mov     edx, 160 * 65536 + 295
  52.         xor     esi, esi
  53.         int     0x40
  54.        
  55.         ; push  eax                     ; Âåðíóòü êîä ïîñëå èñïðàâëåíèÿ ftoa
  56.         ; fild  dword[esp]
  57.         ; push  1000;000
  58.         ; fidiv dword[esp]
  59.         ; fidiv dword[esp]
  60.         ; fstp  dword[esp]
  61.         ; mov   esi, esp
  62.         ; call  ftoa
  63.         ; mov   ebx, 160 * 65536 + 295
  64.         ; mov   edx, Data_String
  65.         ; mov   eax, 4
  66.         ; mov   esi, 7
  67.         ; xor   ecx, ecx
  68.         ; int   0x40
  69.         ; pop   eax
  70.         ; pop   eax
  71.        
  72.         ; Ñåìåéñòâî è ìîäåëü ïðîöåññîðà
  73.         mov     eax, 47
  74.         mov     ebx, 0x10100
  75.         xor     ecx, ecx
  76.         mov     cl, [CPU_fam]
  77.         mov     edx, 250 * 65536 + 285
  78.         xor     esi, esi
  79.         int     0x40
  80.         mov     cl, [CPU_mod]
  81.         add     edx, 10 * 65536
  82.         int     0x40
  83.        
  84.         ; êîýôôèöèåíò óìíîæåíèÿ
  85.         call    multiplier
  86.         test    ecx, ecx
  87.         jz      @f
  88.         movzx   ecx, cl
  89.         push    ecx
  90.         fild    dword[esp]
  91.         push    10
  92.         fidiv   dword[esp]
  93.         fstp    dword[esp]
  94.         mov     esi, esp
  95.         call    ftoa
  96.         mov     ebx, 160 * 65536 + 315
  97.         mov     edx, Data_String
  98.         mov     eax, 4
  99.         mov     esi, eax
  100.         xor     ecx, ecx
  101.         int     0x40
  102.         pop     eax
  103.         pop     eax
  104. @@:
  105.         ; Ñâîáîäíàÿ ïàìÿòü
  106. if (OS_version >= 0x0530)
  107.         mov     eax, 18
  108.         mov     ebx, 16
  109.         int     0x40
  110.         mov     ecx, eax
  111.         call    digit_len
  112.         mov     eax, 47
  113.         mov     edx, 160 * 65536 + 335
  114.         xor     esi, esi
  115.         int     0x40
  116. end if
  117.        
  118.         ; Ðàññòàâëÿåì äâîåòî÷èÿ
  119.         mov     eax, 4
  120.         mov     ebx, 152 * 65536 + 285
  121.         mov     edx, dub_p
  122.         mov     esi, 1
  123.         mov     ecx, 6          ; <- êîëè÷åñòâî ñòðîê
  124. nxt_dp: push    ecx
  125.         mov     ecx, 0x10000000
  126.         int     0x40
  127.         add     ebx, 10
  128.         pop     ecx
  129.         loop    nxt_dp
  130. ;--------------------------------------------------------------------- 
  131.         jmp     end_drow_tab
  132. dub_p   db      ':'
  133.  
  134. lab_info_tab mls \
  135.         'CPU Vendor',\
  136.         'CPU frequency (MHz)',\
  137.         'MMX tehnology',\
  138.         'Multiplier',\
  139.         'Monitoring chip',\
  140.         'Free memory (Kb)'
  141.