* GMon now support ABIT uGuru

* kernel.asm free port area 0xe0-0xe4 (special for uGuru)
+ CPUID by Wildwest
* APM GDT limit fix 3

git-svn-id: svn://kolibrios.org@223 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Iliya Mihailov (Ghost) 2006-11-28 15:54:36 +00:00
parent b648a77792
commit 8871a59fcf
33 changed files with 6273 additions and 448 deletions

View File

@ -59,17 +59,17 @@ os_data_l:
; --------------- APM ---------------------
apm_code_32:
dw 0x10 ; limit 64kb
dw 0x0f ; limit 64kb
db 0, 0, 0
dw 11010000b *256 +10011010b
db 0x00
apm_code_16:
dw 0x10
dw 0x0f
db 0, 0, 0
dw 10010000b *256 +10011010b
db 0x00
apm_data_16:
dw 0x10
dw 0x0f
db 0, 0, 0
dw 10010000b *256 +10010010b
db 0x00

View File

@ -912,12 +912,21 @@ reserve_irqs_ports:
; RESERVE PORTS
mov edi,1 ; 0x00-0xff
mov edi,1 ; 0x00-0xdf
mov [0x2d0000],edi
shl edi,4
mov [0x2d0000+edi+0],dword 1
mov [0x2d0000+edi+4],dword 0x0
mov [0x2d0000+edi+8],dword 0xdf
inc dword [0x2d0000] ; 0xe5-0xff
mov edi,[0x2d0000]
shl edi,4
mov [0x2d0000+edi+0],dword 1
mov [0x2d0000+edi+4],dword 0xe5
mov [0x2d0000+edi+8],dword 0xff
; cmp [0xf604],byte 2 ; com1 mouse -> 0x3f0-0x3ff
; jne ripl1
; inc dword [0x2d0000]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,185 @@
;******************************************************************************
; project name: CPUID
; target platform: KolibriOS, x86 (IA-32), x86-64 achitectures
; compability: probably some functions would work in MenuetOS 32 and MenuetOS 64, may be even in Miraculix;
; CPUID (versions before 2.00) works in MS Windows by means of emulators
; compiler: flat assembler 1.67.5
; version: 2.05
; last update: 1st November 2006
; maintained by: Sergey Kuzmin aka Wildwest
; e-mail: kuzmin_serg@list.ru
; site: http://coolthemes.narod.ru/files.html
;******************************************************************************
; Summary:
; supported vendors - Intel, AMD, VIA, Cyrix, IDT (Centaur),Transmeta
; displayed features - CPU frequency;
; Internal Name;
; Multiplier and System Clock frequency;
; Standard and Extended Features;
; CPU signature (family, model,stepping);
; Codename;
; L1, L2 and L3 Caches;
; Technology;
; CPU Vendor;
; Type and Brand ID;
; Logo for Vendors;
; calculation of PR-rating for AMD AthlonXP;
; Amout of RAM (available and total)
; Highest input values for standard and extended calls
; performed tests - Performance test (RSA encoding)
;******************************************************************************
;HISTORY:
;2.1: CPUID 01/11/2006 (not finished)
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features:
; (+) detection of dual-core AMD Opteron, but I came to conclusion that detection of AMD Fxxh CPU's should be changed (don't know how yet)
; (+) new caches for Intel
; (+) fixed Celeron detection based on L2 cache size for newest Intel CPU (there are Celeron models with 512 Kb);
; (+) CPUID now display System Clock with accuracy 0.01 MHz;
; (+) new logo for Intel (they changed it some time ago);
;Known issues: Sempron marked as AthlonXP
; second window doesn't closed when you close main window
;-----------------------------------------------------------------------------
;2.0: CPUID 31/10/2006
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
; Eugeniy Grechnikov aka Diamond <diamondz@land.ru>
; Iliya Mikhailov aka Ghost <Ghost.nsk@gmail.com>
;Features:
; (+) detection of Brand ID of AMD CPU's (Opteron etc - not finished)
; (+) detection of Extended family and Model of AMD CPU's
; (+) interface+(redesign)
; (+) calculation of System Clock
; (++) added multiplier detection for AMD and Intel (thanks a lot to Ghost)
; (+) optimization of GIF decoder, code cleanup and bugfix by Diamond;
; (+) fixed bug with MMX+ detection for Cyrix CPU (in second window;
; it was properly recognized in main window);
; (+) we show appropiate message in second window if Extended Features
; ($8000_000x) aren't available;
; (+) we mark unknown CPU models as "Next generation CPU";
;Known issues: Sempron marked as AthlonXP
; second window doesn't closed when you close main window
;-----------------------------------------------------------------------------
;1.1: CPUID 17/03/2006
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features:
; (+) performance test now runs after click at "Press for more" button => we start app without test, i.e.
; immediately, but application can be unstable during multiple switching between windows(need testing)
; (++) added detection of total and available amount of RAM (would work only in KolibriOS)
; (++) added detection of extended family and model (not shown, but if you want...);
; (++) added detection of effective family and model;
; (+) more codenames: Intel Tejas, Presler, Yonah, Conroe;
; (+) more codenames: AMD Toledo;
; (+) interface+(redesign).
;Bugs: probably some non-critical graphical issues
;Known issues: Sempron is not supported (marked as AthlonXP)
;-----------------------------------------------------------------------------
;1.0: CPUID 26/09/2005
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Additions: Marat Zakiyanov aka Mario79 <mario79@bk.ru>
; Andrey Halyavin aka halyavin <halyavin@land.ru>
;Features:
; (+) fixed bug, when processor doesn't support extented features and program don't report 'no' in such case
; (+) fixed bug in CPU Type detection
; (+) fixed bug, when program crashes on AMD AthlonXP when after click on 'Press for more' button
; you click on 'Choose FSB' button;
; (+) added output of highest standard and extended calls
; (+) Extended Features(phase 1 - big part of AMD/Intel specific EF)
; (+) reworked P-rating calculation for AMD AthlonXP ->
; now one program for 266, 333, 400 MHz FSB
; (but unstable - see Bugs section)
; (+) support for Intel F5x, renamed C3(Esther) to C7(Esther)
; (+) more codenames
; (Intel: new Prescott's model; Dothan; VIA: Esther;
; AMD: Newcastle, Paris, Winchester, San Diego, Venice, Palermo)
; (+) performance test (RSA encoding, fixed-point arithmetics)
; by Andrey Halyavin
; (+) interface+(thanks to Mario79 for additional window
; and to me for nice button)
;Bugs: probably some non-critical graphical issues
;Known issues: Sempron is not supported (marked as AthlonXP)
;-----------------------------------------------------------------------------
;0.9: CPUID 24/01/2005
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Additions: Madis Kalme aka Madis731 <madis.kalme@mail.ee>
; Jeffrey Amelynck aka Profkid <the_adams_familie@hotmail.com>
;Features:
; (+) deleting leading whitespaces in Intel P4's internal name
; by Madis Kalme
; (+) all standard features
; (+) more codenames (Transmeta series)
; (+) caches for Cyrix
; (+) Brand ID for Intel
; (+) detect L3 cache for Intel
; (+) detect Xeon (will be improved later, at this moment see Brand)
; (+) interface+(redesign and grafical logos for vendors)
; (+) MMX+ test for Cyrix
; (+) Type for Intel
;Bugs: no !!!
;Known issues: Sempron is not supported (marked as AthlonXP)
; caches for IDT is not detected
;-----------------------------------------------------------------------------
;0.8: CPUID 10/12/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: (+) CPUID now display frequency in Mhz with accuracy 0.01 MHz
; (+) more codenames - Intel Itanium :-)
; (+) display Internal Name
; (+) caches for Intel Pentium
; (+) Technology
; (+) detect L1 Trace Instruction cache and some new caches for Intel
; (+) detect Celerons based on Pentium III/4 kernels
; (+) interface+(redesign) and Logo for Vendors
; (+) fix for HTT detection on Celeron(it wasn't bug, just Intel's marketing)
; (+) test for MMX+ and 3DNow!+
;Bugs: no !!!
;Known issues: Sempron not supported (marked as AthlonXP)
; Xeon is not fully supported (marked as Pentium except some models)
;-----------------------------------------------------------------------------
;0.7: CPUID 28/11/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: updated calculation of PR-rating for AMD AthlonXP,
; more codenames (AMD series: Applebred, Thorton),
; added L1 and L2 cache size detection,
; fix for 3DNow! detection on non-AMD CPU's
;Bugs: HTT detection on Celeron 4 (really Celeron 4 have HTT,
; but Intel disabled it in microcode)
;-----------------------------------------------------------------------------
;0.6: CPUID 28/10/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: added calculation of PR-rating for AMD AthlonXP(on request of
; RU-team), more codenames (VIA, Cyrix, IDT (Centaur) series),
; interface+ (redesign), added output of CPU frequency in MHz,
; fix for CPU clock detection (needs changes in kernel.asm),
; fixed bugs which were founded during public testing,
; decreased required memory 0x100000->0x340
;Bugs: problem with 3DNow! detection on non-AMD CPU's (VIA C3 and others)
;-----------------------------------------------------------------------------
;0.5: CPUID 16/10/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: added test for Hyper-Threading Technology support,
; more codenames (Intel and AMD series)
; fasm 1.50 compability, interface+ (window type 2->3 and redesign)
; fix for window redrawing bug
;Bugs: error in CPU clock detection (cause: error in sysfunc 18 subfunc 5)
;-----------------------------------------------------------------------------
;0.4: CPUID 27/09/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: added processor codename's detection engine and little database of
; codenames (P1 and K7)
;Bugs: window redrawing bug, error in CPU clock detection
;-----------------------------------------------------------------------------
;0.3: CPUID 26/09/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: display CPU frequency; CPU Vendor;
; CPU signature(family, model,stepping),
; test for MMX,SSE,SSE2,SSE3,3DNow!
;Bugs: window redrawing bug, error in CPU clock detection
;-----------------------------------------------------------------------------
;0.2: TIMES from old OFFICIAL distribution 11/10/2001
;Author: unknown hero (VT?)
;Features: display CPU frequency, CPU Vendor,
; test for MMX, Process Management
;-----------------------------------------------------------------------------
;0.1: CPUSPEED from OFFICIAL distribution 21/05/2001
;Author: unknown hero (VT?)
;Features: display CPU frequency
;*****************************************************************************

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,81 @@
WINDOWS (1251) CODEPAGE
ENGLISH
Hi! My name is Sergey Kuzmin aka Wildwest.
This is one of the mostly famous program for KolibriOS/MenuetOS.
I called it CPUID. CPUID talks with you CPU and show log.
Current version is 2.05 and you can use it on your own risk without any warranty.
E-mail me (kuzmin_serg@list.ru) if you have some problems or suggestions.
All righs on this program are mine, except parts of code written by other developers.
Further versions will be soon on my site: http://coolthemes.narod.ru/files.html
People from international KolibriOS/MenuetOS team help me and I wish to mention his effort here:
Ville Turjanmaa (Finland), which wrote MenuetOS and programs TIMES&CPUSPEED
Ivan Poddubny and /^S0rG^\ (Russia) for useful macroces
Madis Kalme (Estonia), which wrote fix for strange Intel's Internal names
Jeffrey Amelynck (Belgium), who send me logos and code for its displaying
(code was based on macros, written by Evgeniy Pavlyushin (Russia), which was
just a shell for GIF decoding routine made by Andrey Ivushkin (Ukraine))
Marat Zakiyanov (Russia) for its kind propose of help in creating additional window
Andrey Halyavin (Russia) for his patience during debugging performance test
Eugeniy Grechnikov (Russia) for great code clean-up and optimization
Iliya Mikhailov (Russia) for piece of code from his great GMON
Also I want to thank folks which help me by testing and suggestions -
Sonny, Smiddy and all the RU-Team.
Please, test it and e-mail me screenshot.
Bye...
RUSSIAN
Ïðèâåò! Ìåíÿ çîâóò Ñåðãåé Êóçüìèí aka Wildwest.
Ýòî îäíà èç ñàìûõ èçâåñòíûõ ïðîãðàìì äëÿ KolibriOS/MenuetOS.
Îíà íàçûâàåòñÿ CPUID è ïîêàçûâàåò ðåçóëüòàòû èäåíòèôèêàöèè ïðîöåññîðà.
Ýòî âåðñèÿ 2.05 è ÂÛ ìîæåòå å¸ èñïîëüçîâàòü íà ñâîé ñîáñòâåííûé ðèñê áåçî âñÿêèõ ãàðàíòèé.
Åñëè áóäóò êàêèå-òî ïðîáëåìû èëè ïðåäëîæåíèÿ, òî íàïèøèòå ìíå (kuzmin_serg@list.ru).
Âñå ïðàâà íà ïðîãðàììó ïðèíàäëåæàò ìíå, êðîìå ïðàâ íà ÷àñòè, íàïèñàííûõ îñòàëüíûìè ðàçðàáîò÷èêàìè.
Ñëåäóþùèå âåðñèè áóäóò âûêëàäûâàòüñÿ íà ñòðàíè÷êå: http://coolthemes.narod.ru/files.html
Ëþäè èç ìåæäóíàðîäíîé êîìàíäû MenuetOS ïîìîãàëè ìíå è ÿ õîòåë áû óïîìÿíóòü èõ çäåñü:
Ville Turjanmaa (Ôèíëÿíäèÿ), íàïèñàâøåãî MenuetOS, à òàêæå ïðîãðàììû TIMES è CPUSPEED
Èâàí Ïîääóáíîãî and /^S0rG^\ (Ðîññèÿ), íàïèñàâøèõ ïîëåçíûå ìàêðîñû
Madis Kalme (Ýñòîíèÿ), íàïèñàâøåãî îáðàáîò÷èê äëÿ ñòðàííûõ âíóòðåííèõ èìåí ïðîöåññîðîâ Èíòåë
Jeffrey Amelynck (Áåëüãèÿ), ïðèñëàâøåãî ìíå ëîãîòèïû è êîä äëÿ èõ ïîêàçà
(êîä îñíîâàí íà ìàêðîñå îò Åâãåíèÿ Ïàâëþøèíà (Ðîññèÿ), êîòîðûé áûë ïðîñòî îáåðòêîé
äëÿ àëãîðèòìà äåêîäèðîâàíèÿ GIF, ðåàëèçîâàííîãî Àíäðååì Èâóøêèíûì (Óêðàèíà))
Ìàðàòà Çàêèÿíîâà (Ðîññèÿ) çà åãî ëþáåçíîå ïðåäëîæåíèå ïîìî÷ü ñ ñîçäàíèåì äîïîëíèòåëüíîãî îêíà
Àíäðåÿ Õàëÿâèíà (Ðîññèÿ) çà åãî òåðïåíèå â ïðîöåññå îòëàäêè òåñòà ïðîèçîâèòåëüíîñòè
Åâãåíèÿ Ãðå÷íèêîâà (Ðîññèÿ) çà ÷èñòêó êîäà è îïòèìèçàöèþ
Èëüþ Ìèõàéëîâà (Ðîññèÿ) çà êóñîê êîäà èç åãî çàìå÷àòåëüíîé ïðîãðàììû GMON
Òàêæå ÿ õî÷ó ïîáëàãîäàðèòü ëþäåé, ïîìîãàâøèõ ìíå òåñòèðîâàíèåì è ïðåäëîæåíèÿìè -
Sonny, Smiddy è âñþ "ñîâåòñêóþ êîìàíäó" KolibriOS/MenuetOS .
Ïîæàëóéñòà, ïðîòåñòèðóéòå ïðîãðàììó è ïðèøëèòå ìíå ñêðèíøîò ïî e-mail.
Äî âñòðå÷ íà ôîðóìàõ( http://meos.sysbin.com, http://board.flatassembler.net/forum.php?f=12).

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,301 @@
COLOR_ORDER equ MENUETOS
gif_hash_offset = gif_hash_area
macro gif2img gifsrc,imgsrc
{
local hasharea, ReadGIF, nextblock,_null
local globalColor, img_count, cur_info, img_start
local codesize, compsize, bit_count, CC, EOI, Palette
local block_ofs, table_ptr, gifmacend
local no_gc, block_skip, no_comm, noextblock, uselocal
local setPal, filltable, reinit, cycle, zadd, noinc
local notintable, er, zend, nxt, continue, ex, Gif_skipmap
local Gif_get_sym, shift, nextbl, noblock, loop1, exx
local Gif_output, next, loop2
_null fix 0x1000 ; 0x1000
if ~gifsrc eq esi
mov esi,gifsrc
end if
if ~imgsrc eq edi
mov edi,imgsrc
end if
if defined gif_hash_offset
mov eax,gif_hash_offset
else
mov eax,hasharea
end if
call ReadGIF
jmp gifmacend
if defined gif_hash_offset
else
hasharea:
times 4096 dd 0 ;4096
end if
ReadGIF:
push esi edi
mov [table_ptr],eax
mov [cur_info],edi
xor eax,eax
mov [globalColor],eax
mov [img_count],eax
inc eax
cmp dword[esi],'GIF8'
jne er ; signature
mov ecx,[esi+0xa]
inc eax
add esi,0xd
mov edi,esi
bt ecx,7
jnc nextblock
mov [globalColor],esi
call Gif_skipmap
nextblock:
cmp byte[edi],0x21
jne noextblock
inc edi
cmp byte[edi],0xf9 ; Graphic Control Ext
jne no_gc
add edi,7
jmp nextblock
no_gc:
cmp byte[edi],0xfe ; Comment Ext
jne no_comm
inc edi
block_skip:
movzx eax,byte[edi]
lea edi,[edi+eax+1]
cmp byte[edi],0
jnz block_skip
inc edi
jmp nextblock
no_comm:
cmp byte[edi],0xff ; Application Ext
jne nextblock
add edi,13
jmp block_skip
noextblock:
cmp byte[edi],0x2c ; image beginning
jne er
inc [img_count]
inc edi
mov esi,[cur_info]
xchg esi,edi
; movsd
; movsd
mov bp,word[esi+4]
movzx ebx,bp
mov [edi],ebx
mov bp,word[esi+6]
movzx ebx,bp
mov [edi+4],ebx
add edi,8
add esi,8
push edi
movzx ecx,word[esi]
inc esi
bt ecx,7
jc uselocal
push [globalColor]
mov edi,esi
jmp setPal
uselocal:
call Gif_skipmap
push esi
setPal:
movzx ecx,byte[edi]
inc ecx
mov [codesize],ecx
dec ecx
pop [Palette]
lea esi,[edi+1]
mov edi,[table_ptr]
xor eax,eax
cld
lodsb ; eax - block_count
add eax,esi
mov [block_ofs],eax
mov [bit_count],8
mov eax,1
shl eax,cl
mov [CC],eax
inc eax
mov [EOI],eax
lea ecx,[eax-1]
mov eax, _null shl 16
filltable:
stosd
inc eax
loop filltable
pop edi
mov [img_start],edi
reinit:
mov edx,[EOI]
inc edx
push [codesize]
pop [compsize]
call Gif_get_sym
cmp eax,[CC]
je reinit
call Gif_output
cycle:
movzx ebx,ax
call Gif_get_sym
cmp eax,edx
jae notintable
cmp eax,[CC]
je reinit
cmp eax,[EOI]
je zend
call Gif_output
zadd:
push eax
mov eax,[table_ptr]
mov [eax+edx*4],ebx
pop eax
cmp edx,0xFFF
jae cycle
inc edx
bsr ebx,edx
cmp ebx,[compsize]
jne noinc
inc [compsize]
noinc:
jmp cycle
notintable:
push eax
mov eax,ebx
call Gif_output
push ebx
movzx eax,bx
call Gif_output
pop ebx eax
jmp zadd
er:
pop edi
jmp ex
zend:
; mov eax,[.cur_info] ; skip offset to next frame
; mov [eax],edi
mov [cur_info],edi
add esi,2
xchg esi,edi
nxt:
cmp byte[edi],0
jnz continue
inc edi
jmp nxt
continue:
; cmp byte[edi],0x3b ;read next frame
; jne nextblock
xor eax,eax
stosd
mov ecx,[img_count]
ex:
pop edi esi
ret
Gif_skipmap:
; in: ecx - image descriptor, esi - pointer to colormap
; out: edi - pointer to area after colormap
and ecx,111b
inc ecx ; color map size
mov ebx,1
shl ebx,cl
lea ebx,[ebx*2+ebx]
lea edi,[esi+ebx]
ret
Gif_get_sym:
mov ecx,[compsize]
push ecx
xor eax,eax
shift:
ror byte[esi],1
rcr eax,1
dec [bit_count]
jnz loop1
inc esi
cmp esi,[block_ofs]
jb noblock
push eax
xor eax,eax
lodsb
test eax,eax
jnz nextbl
mov eax,[EOI]
sub esi,2
add esp,8
jmp exx
nextbl:
add eax,esi
mov [block_ofs],eax
pop eax
noblock:
mov [bit_count],8
loop1:
loop shift
pop ecx
rol eax,cl
exx:
xor ecx,ecx
ret
Gif_output:
push esi eax edx
mov edx,[table_ptr]
next:
push word[edx+eax*4]
mov ax,word[edx+eax*4+2]
inc ecx
cmp ax,_null
jnz next
shl ebx,16
mov bx,[esp]
loop2:
pop ax
lea esi,[eax+eax*2]
add esi,[Palette]
if COLOR_ORDER eq MENUETOS
mov esi,[esi]
bswap esi
shr esi,8
mov [edi],esi
add edi,3
else
movsw
movsb
end if
loop loop2
pop edx eax esi
ret
globalColor dd 1
img_count dd 1
cur_info dd 1 ; image table pointer
img_start dd 1
codesize dd 1
compsize dd 1
bit_count dd 1
CC dd 1
EOI dd 1
Palette dd 1
block_ofs dd 1
table_ptr dd 1
gifmacend:
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,29 @@
amd:
file 'amd.gif' ;include gif file
rb 50 ;50 bytes temp back zone
cyrix:
file 'cyrix.gif' ;include gif file
rb 50 ;50 bytes temp back zone
idt:
file 'idt.gif' ;include gif file
rb 50 ;50 bytes temp back zone
intel:
file 'intel.gif' ;include gif file
rb 50 ;50 bytes temp back zone
transmeta:
file 'transmet.gif' ;include gif file
rb 50 ;50 bytes temp back zone
via:
file 'via.gif' ;include gif file
rb 50 ;50 bytes temp back zone
knopka:
file 'knopka.gif' ;include gif file
rb 50 ;50 bytes temp back zone

View File

@ -0,0 +1,607 @@
;testing speed of RSA coding (256 bit)
;for program CPUID (WildWest)
;author: halyavin
;structure of long number:
;rd 1 : length of number
;rd 39: digits of number
;length of zero number is equal to 1.
number_digits=39
number_size=4*(number_digits+1)
;calling convention:
;procedures can change eax,ecx,edx
init_rsatest:
;to do: add initialization which depends on processor.
ret
set_zero:
;eax - address of number
;[eax]:=0
;result: eax isn't changed
xor ecx,ecx
xor edx,edx
inc edx
mov dword [eax],edx
mov edx,39
add eax,4
.loop:
mov dword [eax],ecx
add eax,4
dec edx
jnz .loop
sub eax,160 ;size of number
ret
ladd:
;eax - first number
;edx - second number
;[eax]:=[eax]+[edx]
pushad
mov ecx,dword [eax]
mov esi,dword [edx]
mov ebp,eax
cmp ecx,esi
jg .l1
mov ecx,esi
.l1:
add eax,4
add edx,4
xor ebx,ebx
xor esi,esi
mov edi,ecx
.l2:
add ebx,dword [eax]
adc ebx,dword [edx]
adc esi,esi
mov dword [eax],ebx
mov ebx,esi
add eax,4
xor esi,esi
add edx,4
dec ecx
jnz .l2
test ebx,ebx
jz .lend
inc dword [eax]
inc edi
.lend:
mov eax,ebp
mov dword [eax],edi
popad
ret
lsub:
;eax - first number
;edx - second number
;[eax]=[eax]-[edx]
;[eax]>=[edx]
pushad
mov ecx,dword [eax]
mov edi,ecx
mov ebp,eax
add eax,4
add edx,4
xor ebx,ebx
xor esi,esi
.l1:
mov esi,dword [eax]
sub esi,ebx
sbb esi,dword [edx]
mov dword [eax],esi
sbb esi,esi
mov ebx,esi
neg ebx
add eax,4
add edx,4
dec ecx
jnz .l1
dec edi
jz .lend
sub eax,4
.l2:
mov ebx,dword [eax]
test ebx,ebx
jnz .lend
sub eax,4
dec edi
jnz .l2
.lend:
inc edi
mov eax,ebp
mov [eax],edi
popad
ret
lcmp:
;eax - address of number
;edx - address of number
;result: ecx=1 if eax>edx
; ecx=0 if eax=edx
; ecx=-1 if eax<edx
push ebx
mov ebx,dword [eax]
cmp ebx,dword [edx]
jg .l1
jl .l2
push esi
push eax
push edx
lea eax,[eax+4*ebx]
lea edx,[edx+4*ebx]
.l3:
mov esi,dword [eax]
cmp esi,dword [edx]
ja .l4
jb .l5
sub eax,4
sub edx,4
dec ebx
jnz .l3
xor ecx,ecx
.lend:
pop edx
pop eax
pop esi
pop ebx
ret
.l4:
mov ecx,1
jmp .lend
.l5:
mov ecx,-1
jmp .lend
.l1:
mov ecx,1
pop ebx
ret
.l2:
mov ecx,-1
pop ebx
ret
lshr:
;eax - number
;edx - shift
;[eax]=[eax] shr edx
cmp edx,32
jl .general
mov ecx,edx
shr ecx,5
and edx,31
push esi
mov esi,ecx
cmp ecx,dword [eax]
jng .norm
xor esi,esi
mov ecx,dword [eax]
.norm:
push edi
push ebp
mov ebp,eax
add eax,4
.loop1:
test esi,esi
jz .endloop1
mov edi,dword [eax+4*ecx]
mov dword [eax],edi
add eax,4
dec esi
jmp .loop1
.endloop1:
mov eax,ebp
mov esi,dword [eax]
lea eax,[eax+4*esi]
xor edi,edi
mov esi,ecx
.loop2:
mov dword [eax],edi
sub eax,4
dec ecx
jnz .loop2
mov eax,ebp
sub dword [eax],esi
jz .len0
.lend1:
pop ebp
pop edi
pop esi
jmp .general
.len0:
inc dword [eax]
jmp .lend1
.general:
test edx,edx
jz .lend
push ebx
push esi
push edi
push ebp
push eax
mov ebx,dword [eax]
lea eax,[eax+4*ebx]
mov ecx,edx
sub ecx,32
neg ecx
mov esi,1
shl esi,cl
dec esi
mov ecx,edx
xor ebp,ebp
.loop3:
mov edi,dword [eax]
ror edi,cl
mov edx,edi
and edx,esi
or edx,ebp
mov dword [eax],edx
mov edx,esi
not edx
and edi,edx
mov ebp,edi
sub eax,4
dec ebx
jnz .loop3
pop eax
mov ebx,dword [eax]
mov ecx,dword [eax+4*ebx]
dec ebx
jz .norm1
test ecx,ecx
jnz .norm1
dec dword [eax]
.norm1:
pop ebp
pop edi
pop esi
pop ebx
.lend:
ret
lshl:
;eax - number
;edx - shift
;[eax]:=[eax] shl edx
cmp edx,32
jl .general
cmp dword [eax],1
jnz .l1
cmp dword [eax+4],0
jnz .l1
ret
.l1:
push esi
push ebx
mov ecx,edx
shr ecx,5
and edx,31
mov ebx,dword [eax]
add dword [eax],ecx
lea eax,[eax+4*ebx]
.loop1:
mov esi,dword [eax]
mov dword [eax+4*ecx],esi
sub eax,4
dec ebx
jnz .loop1
xor esi,esi
lea eax,[eax+4*ecx]
.loop2:
mov dword [eax],esi
sub eax,4
dec ecx
jnz .loop2
pop ebx
pop esi
jmp .general
.general:
test edx,edx
jz .lend
pushad
mov ecx,edx
mov ebx,1
shl ebx,cl
dec ebx
mov edx,dword [eax]
xor esi,esi
lea eax,[eax+4*edx]
.loop3:
mov edi,dword [eax]
rol edi,cl
mov ebp,edi
and ebp,ebx
add esi,ebp
mov dword [eax+4],esi
mov ebp,ebx
not ebp
and edi,ebp
mov esi,edi
sub eax,4
dec edx
jnz .loop3
mov dword [eax+4],esi
mov edx,dword [eax]
cmp dword [eax+4*edx+4],0
jz .l2
inc dword [eax]
.l2:
popad
.lend:
ret
lwrite_bit:
;eax - address of number
;edx - number of bit
;set bit to 1. First bit has number 0.
mov ecx,edx
shr edx,5
inc edx
cmp dword [eax],edx
jg .norm
mov dword [eax],edx
.norm:
push ebx
mov ebx,1
shl ebx,cl
or dword [eax+4*edx],ebx
pop ebx
ret
lcopy:
;eax - address of first number
;edx - address of second number
;[eax]:=[edx]
push ebx
push esi
push eax
push edx
push dword [eax]
mov ebx,dword [edx]
mov ecx,ebx
add edx,4
add eax,4
.loop1:
mov esi,dword [edx]
mov dword [eax],esi
add eax,4
add edx,4
dec ecx
jnz .loop1
pop ecx
sub ecx,ebx
jng .l1
xor esi,esi
.loop2:
mov dword [eax],esi
add eax,4
dec ecx
jnz .loop2
.l1:
pop edx
pop eax
mov dword [eax],ebx
pop esi
pop ebx
ret
lmul:
;eax - first number
;edx - second number
;ecx - third number
;[eax]:=[ecx]*[edx]
push ecx
push edx
call set_zero
pop edx
pop ecx
pushad
sub esp,16 ; local variables
mov ebp,edx
mov ebx,dword [edx]
mov dword [esp],ebx
mov ebx,dword [ecx]
mov dword [esp+4],ebx
mov ebx,eax
add ebp,4
add ecx,4
add ebx,4
xor esi,esi
mov dword [esp+8],esi
.loop1:
xor esi,esi
mov dword [esp+12],esi
.loop2:
mov eax,dword [esp+12]
mov eax,dword [ecx+4*eax]
mov edi,dword [esp+8]
mov edi,dword [ebp+4*edi]
mul edi
add eax,esi
adc edx,0
mov edi,dword [esp+12]
add edi,dword [esp+8]
add eax,dword [ebx+4*edi]
adc edx,0
mov dword [ebx+4*edi],eax
mov esi,edx
inc dword [esp+12]
mov eax,dword [esp+4]
cmp dword [esp+12],eax
jnz .loop2
test esi,esi
jz .loop1end
mov eax,dword [esp+12]
add eax,dword [esp+8]
mov [ebx+4*eax],esi
.loop1end:
inc dword [esp+8]
mov eax,dword [esp]
cmp dword [esp+8],eax
jnz .loop1
add esp,16
sub ebx,4
mov ecx,39
xor edx,edx
.loop3:
cmp dword [ebx+4*ecx],edx
jnz .loop3end
dec ecx
jnz .loop3
.loop3end:
test ecx,ecx
jnz .l1
inc ecx
.l1:
mov dword [ebx],ecx
popad
ret
lmod:
;eax - address of first number
;edx - address of second number
;[eax]:=[eax] mod [edx]
mov ecx,dword [eax]
sub ecx,dword [edx]
jl .lend
pushad
inc ecx
mov ebp,eax
mov eax,edx
mov edi,eax
shl ecx,5
mov edx,ecx
mov esi,ecx
call lshl
.loop:
mov eax,ebp
mov edx,edi
call lcmp
test ecx,ecx
jl .l1
call lsub
.l1:
dec esi
js .endloop
mov eax,edx
mov edx,1
call lshr
jmp .loop
.endloop:
popad
.lend:
ret
rsacode:
;eax - address of message
;edx - open key
;ecx - address of module
;esi - temparary number1
;edi - temparary number2
;esi - [eax]^edx mod (ecx)
;[eax] is changed.
push eax
push edx
push ecx
xchg eax,esi
call set_zero
mov dword [eax+4],1
mov esi,eax
mov eax,edi
call set_zero
.loop:
mov ecx,dword [esp+4]
test ecx,1
jz .l1
mov eax,edi
mov edx,esi
mov ecx,dword [esp+8]
call lmul
mov edx,dword [esp]
call lmod
mov eax,esi
mov edx,edi
call lcopy
.l1:
shr dword [esp+4],1
jz .endloop
mov edx,dword [esp+8]
mov ecx,edx
mov eax,edi
call lmul
mov edx,dword [esp]
call lmod
mov eax,dword [esp+8]
mov edx,edi
call lcopy
jmp .loop
.endloop:
pop ecx
pop edx
pop eax
ret
rsa_test:
mov eax,num1
mov dword [eax],16
mov ecx,1
mov edx,16
.loop:
add eax,4
mov dword [eax],ecx
dec edx
jnz .loop
mov eax,num1
mov ebx,[iter]
mov dword [eax+4],ebx
inc dword [iter]
mov edx,[openkey]
mov ecx,module
mov esi,num2
mov edi,num3
call rsacode
ret
init_test:
xor eax,eax
mov [iter],eax
mov [openkey],10007
mov eax,num2
call set_zero
mov eax,num3
call set_zero
ret
module:
;module=p*q.
;where
;p=
;dd 9
;dd 147,2,3,4,5,6,7,8,9
;times 30 dd 0
;q=
;dd 9
;dd 163,4,5,6,7,8,9,10,11
;times 30 dd 0
dd 17
dd 23961,914,1232,1556,1887,2226,2574,2932,3301,288,308,314,305,280,238,178,99
times 22 dd 0
;in decimal
;p=1042128803351525332193283695592003066548124262686459610611886292768993621049491
;q=1273712981880077616387281148672409277231717442781838063285512054053473668300963
;n=1327372985619988354987062708438042005329282516404896732667039640816200186465366322016844458439816997285872910403676793109807015096535910981266920474905959833
macro udata
{
udata
num1 rd 40
num2 rd 40
num3 rd 40
iter rd 1
openkey rd 1
}

View File

@ -0,0 +1,2 @@
fasm cpuid.asm cpuid
pause

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,322 @@
; Brand
;======================
brand0:
db 'n/a'
brand0len:
brand01:
db '01 Celeron'
brand01len:
brand02:
db '02 Pentium III'
brand02len:
brand03:
db '03 Pentium III Xeon'
brand03len:
brand03d:
db '03 Celeron'
brand03dlen:
brand04:
db '04 Pentium III'
brand04len:
brand06:
db '06 Pentium III M'
brand06len:
brand07:
db '07 Celeron M'
brand07len:
brand08:
db '08 Pentium 4'
brand08len:
brand09:
db '09 Pentium 4'
brand09len:
brand0A:
db '0A Celeron'
brand0Alen:
brand0B:
db '0B Xeon'
brand0Blen:
brand0Bd:
db '0B Xeon MP'
brand0Bdlen:
brand0C:
db '0C Xeon MP'
brand0Clen:
brand0E:
db '0E Pentium 4 M'
brand0Elen:
brand0Ed:
db '0E Xeon'
brand0Edlen:
brand0F:
db '10 Celeron M'
brand0Flen:
brand11:
db '11 Mobile CPU'
brand11len:
brand12:
db '12 Celeron M'
brand12len:
brand13:
db '13 Celeron M'
brand13len:
brand14:
db '14 Celeron'
brand14len:
brand15:
db '15 Mobile CPU'
brand15len:
brand16:
db '16 Pentium M'
brand16len:
brand17:
db '17 Celeron M'
brand17len:
;======================
;features
FPU:
db 'FPU: '
FPUlen:
VME:
db 'VME: '
VMElen:
DE:
db 'DE: '
DElen:
PSE:
db 'PSE: '
PSElen:
TSC:
db 'TSC: '
TSClen:
MSR:
db 'MSR: '
MSRlen:
PAE:
db 'PAE: '
PAElen:
MCE:
db 'MCE: '
MCElen:
CX8:
db 'CX8: '
CX8len:
APIC:
db 'APIC: '
APIClen:
SEP:
db 'SEP: '
SEPlen:
MTRR:
db 'MTRR: '
MTRRlen:
PGE:
db 'PGE: '
PGElen:
MCA:
db 'MCA: '
MCAlen:
CMOV:
db 'CMOV: '
CMOVlen:
PAT:
db 'PAT: '
PATlen:
PSE36:
db 'PSE36: '
PSE36len:
PSNUM:
db 'PSNUM: '
PSNUMlen:
CLFLUSHn:
db 'CLFLSH: '
CLFLUSHnlen:
DTS:
db 'DTS: '
DTSlen:
ACPI:
db 'ACPI: '
ACPIlen:
MMX:
db 'MMX: '
MMXlen:
FXSR:
db 'FXSR: '
FXSRlen:
SSE:
db 'SSE: '
SSElen:
SSE2:
db 'SSE2: '
SSE2len:
SSn:
db 'SS: '
SSnlen:
TM:
db 'TM: '
TMlen:
IA64:
db 'IA64: '
IA64len:
PBE:
db 'PBE: '
PBElen:
Res:
db 'Reserved'
Reslen:
;Extended
SS3:
db 'SSE3: '
SS3len:
MON:
db 'MON: '
MONlen:
DS_CPL:
db 'DS-CPL: '
DS_CPLlen:
EST:
db 'EST: '
ESTlen:
TM2:
db 'TM2: '
TM2len:
CNXT_ID:
db 'CNXT-ID: '
CNXT_IDlen:
CX16:
db 'CX16: '
CX16len:
ETPRD:
db 'ETPRD: '
ETPRDlen:
;Extended2
SYS:
db 'SYSCALL: '
SYSlen:
MP:
db 'MP: '
MPlen:
NX:
db 'NX(XD): '
NXlen:
MMXPi:
db 'MMX+: '
MMXPilen:
MMXn:
db 'MMX: '
MMXnlen:
FXSRn:
db 'FXSR: '
FXSRnlen:
FFXSR:
db 'FFXSR: '
FFXSRlen:
TSCP:
db 'TSCP: '
TSCPlen:
LM:
db 'LM(AA64): '
LMlen:
DNo:
db '3DNow!+: '
DNolen:
DN:
db '3DNow!: '
DNlen:
LAF:
db 'LAHF: '
LAFlen:
;================================
abrand00:
db '8-bit Brand (no details)'
abrand00len:
abrand0:
db 'AMD Opteron UP'
abrand0len:
abrand1:
db 'AMD Opteron DP'
abrand1len:
abrand2:
db 'AMD Opteron MP'
abrand2len:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,67 @@
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
; SMBus interface
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
;include 'smb_nf2.inc'
smb_base dd 0 ; IO port base for SMBus acces
smb_slave dd 0 ; SMBus addres for monitoring chip
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
smbInit:
; Èçìåíèòü, êîä òîëüêî äëÿ òåñòèðîâàíèÿ !!!
; mov dword[IO_Read ], nf2_readb
; mov dword[IO_Write], nf2_writeb
; See pci_pm.c -> pci_pm_smb_prob
.exit_err:
stc
ret
.exit_ok:
clc
ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
; pci_bus_num: db 2 ; Íîìåð øèíû
; pci_devfn: db 255
; find_north_bridg:
; mov bl, 6
; xor cl, cl
; nbus: mov bh, [pci_bus_num]
; ndevfn: mov ch, [pci_devfn]
; mov eax, 62
; int 0x40
; cmp eax, 0xffffffff
; je bd_next
;;;;---------
; mov esi, bd_table_end - bd_table - 12
; @@: cmp eax, [bd_table + esi]
; je bd_found
; test esi, esi
; jz bd_next
; sub esi, 12
; jmp @b
;;;;---------
; bd_next:dec byte[pci_devfn]
; jns ndevfn
; mov byte[pci_devfn], 0
; dec byte[pci_bus_num]
; jns nbus
; ret
; bd_found:
; add esi, bd_table + 4
; mov edi, nb_name
; mov ecx, 2
; rep movsd
; mov [bd_id], eax
; ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
smbClose:
ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

View File

@ -1,4 +1,3 @@
nl equ 0x0d, 0x0a
; 0x00xx - Menuet 0.xx
; 0x0400 - Kolibi 4 (новое завершение процесса)
@ -6,3 +5,5 @@ nl equ 0x0d, 0x0a
; 0x0530 - всего/свободно памяти
; 0x0580 - новое завершение процесса
OS_version equ 0x0580
SMBus fix no ; yes

View File

@ -21,11 +21,11 @@ d_show:
mov ebx, 12 * 65536 + 13
xor eax, eax
lodsb
mov cx, 220
mov cx, 240
sub ecx, eax
@@: shl ecx, 16
mov cx, 220
mov cx, 240
lodsb
sub ecx, eax
mov eax, 38

View File

@ -38,6 +38,11 @@
; 18/07/2006 - Óëè÷øèë âûâîä ìíîæèòåëÿ, èñïðàâëåííû ìíîæèòåëè äëÿ P6 Tualatin, config.inc
; 22/07/2006 - P6 multiplier bugfix
; 30/07/2006 - P6 multiplier bugfix
; --- v 0.4 ---
; 10/08/2006 - íà÷àòà ðàáîòà ïî ïîääåðæêå SMBus, ïåðåïèñàíû ôóíêöèè äëÿ ÷èïîâ ìîíèòîðèíãà
; 24/08/2006 - äîáàâëåííà ÷àñòîòà ïðîöåññîðà
; 10/09/2006 - bugfix
; 25/11/2006 - äîáàâëåí ABIT uGuru
;
; Ýé! Ó ìåíÿ íåò ìíîãî âðåìåíè.
@ -46,7 +51,7 @@
; system.inc - âû÷èñëåíèå çàãðóçêè ïðîöåññîðà, çàâåðøåíèå òåñòà, etc...
; tests.inc - òåñòû ;-)
; diag.inc - ïîääåðæêà äèàãðàì
; *_tab.inc - ïðîöåäóðû îòðèñîâêè ñîîòâåòñòâóþøèõ âêëàäîê
; tab_*.inc - ïðîöåäóðû îòðèñîâêè ñîîòâåòñòâóþøèõ âêëàäîê
; Èäåíòèôèêàòîðû êíîïîê :
@ -202,22 +207,15 @@ no_ut_dec:
movzx ecx, ah
mov esi, [d_colors + ecx * 4]
mov eax, [esi]
call next_color
mov [esi], ebx
jmp draw_window
no_change_color:
jmp wait_for_event
;---------------------------------------------------------------------
; Öâåòà ãðàôèêîâ
colors: dd 0xff0000, 0xff00, 0xff, 0xffffff, tcol, 0xFF7E23, 0x8BA169, 0xff0000 ; ïåðâûé è ïîñëåäíèé ðàâíû
next_color:
mov ecx, (next_color - colors) / 4 ; êîëè÷åñòâî öâåòîâ
mov ecx, (colors_end - colors) / 4 ; êîëè÷åñòâî öâåòîâ
@@: dec ecx
cmp eax, [colors + ecx * 4]
jne @b
mov ebx, [colors + ecx * 4 - 4]
ret
mov [esi], ebx
jmp draw_window
no_change_color:
jmp wait_for_event
;---------------------------------------------------------------------
draw_window:
mov eax,12
@ -226,7 +224,7 @@ draw_window:
; Ñîçäà¸ì îêíî
xor eax, eax
mov ebx, 300 * 65536 + 309
mov ecx, 150 * 65536 + 430
mov ecx, 150 * 65536 + 450
mov edx, tcol + 0x3000000 ; color of work area RRGGBB,8->color
mov esi, 0x805080d0 ; color of grab bar RRGGBB,8->color
mov edi, 0x005080d0 ; color of frames RRGGBB
@ -234,20 +232,20 @@ draw_window:
; Ñîçäà¸ì ðàìêó ãðàôèêà
mov eax, 13
mov ebx, 10 * 65536 + 290
mov ecx, 118 * 65536 + 105
mov ecx, 138 * 65536 + 105
mov edx, atcol
int 0x40
mov ebx, 12 * 65536 + 286
mov ecx, 120 * 65536 + 101
mov ecx, 140 * 65536 + 101
mov edx, tcol
int 0x40
mov eax, 38
mov edx, atcol
mov ebx, 12 * 65536 + 286 + 12
mov ecx, 120 * 65536 + 120
mov ecx, 140 * 65536 + 140
@@: add ecx, 10 * 65536 + 10
int 0x40
cmp cx, 210 ; ïðèâÿçàíî ê êîîðäèíàòàì îêíà
cmp cx, 230 ; ïðèâÿçàíî ê êîîðäèíàòàì îêíà
jl @b
; Ïèøèì çàãîëîâîê
mov eax, 4
@ -310,7 +308,7 @@ draw_window:
cmp byte[hwm_enable], 0
jne show_mon
; Íåò äàò÷èêîâ - ïèøåì NO
mov ecx, 6 ;<- êîëè÷åñòâî ïàðàìåòðîâ
mov ecx, 8 ;<- êîëè÷åñòâî ïàðàìåòðîâ
mov eax, 4
mov ebx, 121 * 65536 + 50
mov edx, msg_no
@ -332,7 +330,7 @@ show_mon:
;---------------------------
; Òåìïåðàòóðó
mov ecx, 3
mov esi, temps
mov esi, hwm_temps
mov edx, 121 * 65536 + 50
xor eax, eax
sh_temp:push ecx
@ -360,25 +358,25 @@ sh_temp:push ecx
pop ecx
loop sh_temp
;;--- äîáàâëÿåì íà ãðàôèê temp1 ---
movzx eax, word[temps]
movzx eax, word[hwm_temps]
mov esi, d_temp1
call d_add
call d_show
;;--- äîáàâëÿåì íà ãðàôèê temp2 ---
movzx eax, word[temps + 2]
movzx eax, word[hwm_temps + 2]
mov esi, d_temp2
call d_add
call d_show
;;--- äîáàâëÿåì íà ãðàôèê temp3 ---
movzx eax, word[temps + 4]
movzx eax, word[hwm_temps + 4]
mov esi, d_temp3
call d_add
call d_show
;---------------------------
; Ñêîðîñòè âðàøåíèÿ âåíòèëåé
mov ecx, 3
mov esi, rpms
mov ecx, 5
mov esi, hwm_rpms
mov edx, 121 * 65536 + 80
sh_fan: push ecx
lodsd
@ -400,7 +398,7 @@ sh_fan: push ecx
;---------------------------
; Íàïðóãè
mov esi, Vcore
mov esi, hwm_voltages
mov edi, old_volts
mov ecx, 7
mov ebx, 260 * 65536 + 30
@ -441,7 +439,7 @@ volt_nxt:
no_monitor:
;---------------------------
; Ñîçäà¸ì êíîïêè âêëàäîê
mov edi, 230 * 65536 + 25
mov edi, 250 * 65536 + 25
mov ecx, 4
mov eax, 8
mov ebx, 10 * 65536 + 70
@ -459,7 +457,7 @@ na1: int 0x40
loop n_bt
; Ïèøèì íàçâàíèÿ âêëàäîê
mov eax, 4
mov ebx, 35 * 65536 + 240
mov ebx, 35 * 65536 + 260
mov edx, tab_lab
mov ecx, 0x10000000
mov esi, 39
@ -467,11 +465,11 @@ na1: int 0x40
; ñîçäà¸ì ðàìêó âíèçó ýêðàíà
mov eax, 13
mov ebx, 10 * 65536 + 290
mov ecx, 255 * 65536 + 160
mov ecx, 275 * 65536 + 160
mov edx, atcol
int 0x40
mov ebx, 12 * 65536 + 286
mov ecx, 257 * 65536 + 156
mov ecx, 277 * 65536 + 156
mov edx, tcol
int 0x40
; ðèñóåì âûáðàííóþ âêëàäêó
@ -490,16 +488,16 @@ end_drow_tab:
jmp wait_for_event
;--- Drow Info tab ---------------
info_tab:
include "info_tab.inc"
include "tab_info.inc"
;--- Drow test tab ---------------
test_tab:
include "test_tab.inc"
include "tab_test.inc"
;--- Drow Config tab -------------
config_tab:
include "conf_tab.inc"
include "tab_conf.inc"
;--- Drow About tab --------------
about_tab:
include "abou_tab.inc"
include "tab_about.inc"
;---------------------------------------------------------------------
include "system.inc"
include "hwm.inc"
@ -509,7 +507,7 @@ about_tab:
DATA
act_tab db 2 ; Íîìåð àêòèâíîé âêëàäêè
tab_lab db 'Info Tests Configs About'
title db 'Ghost Monitor v0.3 [30/07/06]'
title db 'Ghost Monitor v0.4 [25/11/06]'
msgs_mon mls \
'CPU Load (%)',\
@ -519,7 +517,9 @@ msgs_mon mls \
'Temp3',\
'Fan1',\
'Fan2',\
'Fan3'
'Fan3',\
'Fan4',\
'Fan5'
msgs_mon2 mls \
'Vcore',\
@ -536,6 +536,10 @@ msg_no db 'N/A'
update_time dd 300 ; ïåðèîä îáíîâëåíèÿ â ñîòûõ äîëÿõ ñåêóíäû
d_colors dd d_cpu_load, d_mem_usage, d_temp1, d_temp2, d_temp3
c_eps dd 0.01
; Öâåòà ãðàôèêîâ
colors: dd 0xff0000, 0xff00, 0xff, 0xffffff, tcol, 0xFF7E23, 0x8BA169, 0xff0000 ; ïåðâûé è ïîñëåäíèé ðàâíû
colors_end:
;---------------------------------------------------------------------
UDATA

View File

@ -1,11 +1,26 @@
;
; HWM abstract interface, provide:
; hwm_init, hwm_get_params, hwm_enable, hwm_temps, hwm_rpms, hwm_voltages, hwm_chip_name
;
if SMBus eq yes
include 'SMBus.inc'
end if
include 'hwm_wb.inc'
include 'hwm_it87.inc'
include 'hwm_uguru.inc'
;include 'hwm_via686.inc'
uglobal
hwm_enable:db 0 ; 0 - no, 1 - Winbond, 2 - ITE
temps db 0,0, 0,0, 0,0 ; ãðàäóñ, äåñÿòûå, ãðàäóñ, ...
rpms dd 0, 0, 0 ; fan1, fan2, fan3
hwm_enable:
dd 0 ; 0 - no, 1 - Winbond, 2 - ITE, ... see HWMProbe list
hwm_temps:
db 0,0, 0,0, 0,0 ; ãðàäóñ, äåñÿòûå, ãðàäóñ, ...
hwm_rpms:
dd 0, 0, 0, 0, 0 ; fan1, fan2, fan3, ...
hwm_voltages:
Vcore dd 0.0
Vin0 dd 0.0
Vin1 dd 0.0
@ -13,68 +28,126 @@ uglobal
Vin2 dd 0.0
V12 dd 0.0
V5 dd 0.0
vol8 dd 0.0
vol9 dd 0.0
vol10 dd 0.0
vol11 dd 0.0
acc_type db 0 ; 0 - ISA Bus, 1 - SMBus, 2 - other
endg
IO_Read dd isaRead ; In : al - addr, out : al - value
IO_Write dd isaWrite ; In : al - addr, bl - value
hwm_unk db 9, 'Not found'
hwm_chip_name dd hwm_unk
; NOTE !!!
; HWMProbe - ñïèñîê, ïðîöåäóð ïðîâåðêè ÷èïîâ, çàêàí÷èâàåòñÿ
; íóëåâûì äâîéíûì ñëîâîì
; HWMGetParam - ñïèñîê, ïðîöåäóð ïîëó÷åíèÿ ïàðàìåòðîâ
; îáà ýòè ñïèñêà äîëæíû ñîîòâåòñòâîâàòü äðóã äðóãó ïî
; ïî ïîðÿäêó ïðîöåäóð
HWMProbe: dd wb_init
dd it87_init
dd uGuru_init
dd 0 ; <- êîíåö ñïèñêà
HWMGetParam: dd wb_getparam
dd it87_getparam
dd uGuru_getparam
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
hwm_init:
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
pusha
; Èùåì äàò÷èêè íà øèíå ISA
call isaInit
jc @f
call chips_probe
cmp byte[hwm_enable], 0
jne .exit
@@: call isaClose
mov eax, 46 ; ðåçåðâèðóåì 0x295 è 0x296 ïîðòû
xor ebx, ebx
mov ecx, 0x295
mov edx, 0x296
int 0x40
; Èùåì äàò÷èêè íà øèíå SMBus
inc byte [acc_type]
if SMBus eq yes
call smbInit
jc @f
call chips_probe
cmp byte[hwm_enable], 0
jne .exit
@@: call smbClose
end if
; Èùåì äàò÷èêè íà ñîáñòâåííîé øèíå (LPC etc)
inc byte [acc_type]
call chips_probe
.exit: popa
ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
chips_probe:
; Íàõîäèì íóæíûé ÷èï
; Out : hwm_enable = !0 if found, else hwm_enable not changed
cld ; Paranoia
mov esi, HWMProbe
@@: lodsd
test eax, eax
jz hwm_ports_ok
hwm_no:
mov eax, 46 ; îñâîáîæäàåì 0x295 è 0x296 ïîðòû
xor ebx, ebx
inc ebx
jz @f ; Êîíåö ñïèñêà
call eax
jc @b
sub esi, HWMProbe
shr esi, 2
mov dword[hwm_enable], esi
@@: ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
hwm_get_params:
pusha
mov eax, [hwm_enable]
test eax, eax
jz @f
dec eax
sal eax, 2
call dword[eax + HWMGetParam]
@@: popa
ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
; ISA interface
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
isaRead:
push edx
mov dx, 0x295
out dx, al
inc edx
in al, dx
pop edx
ret
isaWrite:
push edx
mov dx, 0x295
out dx, al
inc edx
mov al, bl
out dx, al
pop edx
ret
isaInit:
; Out : CF = 0 if Ok
; ðåçåðâèðóåì 0x295 è 0x296 ïîðòû
mov ecx, 0x295
mov edx, 0x296
int 0x40
popa
call ReservePorts
; jc @f
; mov [IO_Read], isaRead
; mov [IO_Write], isaWrite
; @@:
ret
hwm_ports_ok:
call wb_init
jc not_wb
mov byte [hwm_enable], 1
call wb_get_name
jmp hwm_ok
not_wb: call it87_init
jc hwm_no
mov byte [hwm_enable], 2
call it87_get_name
hwm_ok: mov [hwm_chip_name], edx
popa
isaClose:
; îñâîáîæäàåì 0x295 è 0x296 ïîðòû
mov ecx, 0x295
mov edx, 0x296
call FreePorts
ret
;----------------------------------------------------
hwm_get_params:
; Âûçûâàòü òîëüêî åñëè íàéäåí
pusha
mov al, [hwm_enable]
dec al
jnz @f
call wb_get_temp
call wb_get_fan_speed
mov edi, wb_coeff
call wb_get_volt
fld dword[V12]
fld dword[wb_n12v_const]
faddp st1, st0
fstp dword[V12]
popa
ret
@@: call it87_get_temp
call it87_get_fan_speed
mov edi, ite_coeff
call wb_get_volt
popa
ret
;----------------------------------------------------

View File

@ -1,18 +1,15 @@
; Integrated Technology Express
; Chip Temp Volt Fan
; it8705 3 8 3
; it8712 3 8 3
; Chip Temp Volt Fan ISA SMBus
; it8705 3 8 3 + +
; it8712 3 8 3 + +
; SiS
; Chip Temp Volt Fan
; sis950 3 8 3
; Chip Temp Volt Fan ISA SMBus
; sis950 3 8 3 + +
IT87_REGCHIP equ 0x58
IT87_CHIPID equ 0x90
IT87_FANDIV equ 0x0B
uglobal
it_chip_id db 0
endg
it8705 db 15, 'IT8705F/SiS 950'
it8712 db 7, 'IT8712F'
it8716 db 7, 'IT8716F'
@ -29,37 +26,47 @@ ite_coeff: dd 0.016 ; Vcore
it87_init:
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
; OUT - CF = 1 - error
cmp byte[acc_type], 2 ; Only ISA and SMBus
jae it87_no
;--- Ïðîâåðÿåì IT87* --------
mov dx, 0x295
mov al, IT87_REGCHIP
out dx, al
inc edx
in al, dx
call [IO_Read]
cmp al, IT87_CHIPID
jne it87_no ; ýòî íå it87 !!!
; -~- not tested ~-~-
dec edx ; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà --
mov al, 0x21
out dx, al
inc edx
in al, dx
mov byte[it_chip_id], al
mov al, 0x21 ; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà --
call [IO_Read]
mov edx, it8705
cmp al, 0x05
je @f
mov edx, it8712
cmp al, 0x12
je @f
mov edx, it8716
cmp al, 0x16
je @f
mov edx, ite_unk
@@: mov [hwm_chip_name], edx
; -~-~-~-~-~-~-~-~-~-
clc
ret
it87_no:stc
ret
;-----------------------------------
it87_getparam:
call it87_get_temp
call it87_get_fan_speed
mov edi, ite_coeff
call wb_get_volt
ret
;-----------------------------------
it87_get_temp:
mov dx, 0x296
xor ecx, ecx
mov esi, temps
@@: dec edx
mov eax, ecx
mov esi, hwm_temps
@@: mov eax, ecx
add al, 0x29
out dx, al
inc edx
in al, dx
call [IO_Read]
mov [esi + ecx * 2], al
inc ecx
cmp ecx, 3
@ -69,11 +76,9 @@ it87_get_temp:
it87_fan_div db 1, 1, 1
it87_get_fan_speed:
; ÷èòàåì äåëèòåëè
mov dx, 0x295
mov al, IT87_FANDIV
out dx, al
inc dx
in al, dx
call [IO_Read]
mov ah, al
and al, 0x07
mov [it87_fan_div], al
@ -82,12 +87,10 @@ it87_get_fan_speed:
mov [it87_fan_div + 1], ah
xor ecx, ecx
@@: mov dx, 0x295
mov al, 0x0D
@@: mov al, 0x0D
add al, cl
out dx, al
inc edx
in al, dx
call [IO_Read]
movzx ebx, al
push ecx
mov cl, [it87_fan_div + ecx]
@ -96,22 +99,10 @@ it87_get_fan_speed:
mov eax, 1350000
xor edx, edx
div ebx
mov [rpms + 4 * ecx], eax
mov [hwm_rpms + 4 * ecx], eax
inc ecx
cmp ecx, 3
jb @b
ret
;--------------------------------------------------------------------------
it87_get_name:
mov edx, it8705
cmp byte[it_chip_id], 0x05
je @f
mov edx, it8712
cmp byte[it_chip_id], 0x12
je @f
mov edx, it8716
cmp byte[it_chip_id], 0x16
je @f
mov edx, ite_unk
@@: ret

View File

@ -0,0 +1,212 @@
; ABIT uGuru
;
; Chip Temp Volt Fan ISA SMBus LPC
; W83L950D(?) 3 11 5 - - +
; uGuru ports
UGURU_CMD_PORT equ 0x0e0
UGURU_DATA_PORT equ 0x0e4
; temp sensors
UGURU_CPUTEMP equ 0x2100
UGURU_SYSTEMP equ 0x2101
UGURU_PWMTEMP equ 0x210f
; fans. These are placed at bank 2
SENS_CPUFAN equ 0x2600
SENS_NBFAN equ 0x2601
SENS_SYSFAN equ 0x2602
SENS_AUXFAN1 equ 0x2603
SENS_AUXFAN2 equ 0x2604
; Voltage sensors
SENS_VCORE equ 0x2103 ; 3.49V max
SENS_DDRVDD equ 0x2104 ; 3.49V max
SENS_DDRVTT equ 0x210A ; 3.49V max
SENS_NBVDD equ 0x2108 ; 3.49V max
SENS_SBVDD equ 0x210E ; 3.49V max
SENS_HTV equ 0x2102 ; 3.49V max
SENS_AGP equ 0x2109 ; 3.49V max
SENS_5V equ 0x2106 ; 6.25V max
SENS_3V3 equ 0x2105 ; 4.36V max
SENS_5VSB equ 0x210B ; 6.25V max
SENS_3VDUAL equ 0x210D ; 4.36V max
; Voltage ADC multipliers
MLTP_3V49 equ 0.0136862745098039
MLTP_4V36 equ 0.0170980392156863
MLTP_6V25 equ 0.0245098039215686
v_addr: dw SENS_VCORE, SENS_DDRVDD, SENS_DDRVTT, SENS_NBVDD, SENS_SBVDD
dw SENS_HTV, SENS_AGP, SENS_5V, SENS_3V3, SENS_5VSB, SENS_3VDUAL
v_mult: dd MLTP_3V49, MLTP_3V49, MLTP_3V49, MLTP_3V49, MLTP_3V49, MLTP_3V49
dd MLTP_3V49, MLTP_6V25, MLTP_4V36, MLTP_6V25, MLTP_4V36
msg_uguru: db 10, 'ABIT uGuru'
;-----------------------------------
uGuru_init:
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
; OUT - CF = 1 - error
cmp byte[acc_type], 3 ; Special IO interface
jne .uGuru_no
pusha
mov ecx, UGURU_CMD_PORT
mov edx, UGURU_DATA_PORT
call ReservePorts
test eax, eax
jnz .no_lpc
in al, UGURU_CMD_PORT
test al, al
jz @f
cmp al, 0xac
jne .bad_sig
@@: in al, UGURU_DATA_PORT
test al, al
jz @f
cmp al, 8
jne .bad_sig
@@: mov [hwm_chip_name], msg_uguru
popa
clc
ret
.bad_sig:
; popa ;
; clc ; <- uncomment this three line, if you certain that you
; ret ; have ABIT uGuru but he is not defined
.no_lpc:
mov ecx, UGURU_CMD_PORT
mov edx, UGURU_DATA_PORT
call FreePorts
popa
.uGuru_no:
stc
ret
;-----------------------------------
uGuru_getparam:
; Temperature
mov ax, UGURU_CPUTEMP
call uGuru_ReadSensor
mov [hwm_temps + 0], al
mov ax, UGURU_SYSTEMP
call uGuru_ReadSensor
mov [hwm_temps + 1], al
mov ax, UGURU_PWMTEMP
call uGuru_ReadSensor
mov [hwm_temps + 2], al
; Fan speed
mov ax, SENS_CPUFAN
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 0 ], ax
mov ax, SENS_NBFAN
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 4 ], ax
mov ax, SENS_SYSFAN
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 8 ], ax
mov ax, SENS_AUXFAN1
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 12], ax
mov ax, SENS_AUXFAN2
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 16], ax
; voltages
cld ; Paranoia
xor ecx, ecx
mov esi, v_addr
@@: push ecx
lodsw
call uGuru_ReadSensor
movzx eax, al
fld dword[v_mult + ecx * 4]
push eax
fild dword [esp]
fmulp st1, st0
fstp dword [hwm_voltages + ecx * 4]
pop eax
pop ecx
inc ecx
cmp ecx, 11 ; <-- êîëè÷åñòâî äàò÷èêîâ (ADC Vin)
jne @b
ret
;-----------------------------------
uGuru_ReadSensor:
; Read a sensor
; In : ax - sensorID
; Out : al - result
mov ebx, eax ; Ask to read from uGuru
shr eax, 8
out UGURU_DATA_PORT, al
mov ecx, 1000 ; I guess this is to se if uGuru is ready to take a command
.is_ready:
in al, UGURU_DATA_PORT
dec ecx
jnz @f
xor al, al
ret
@@: cmp al, 8
jne .is_ready
mov al, bl ; Whitch sensor to read?
out UGURU_CMD_PORT, al
mov ecx, 1000 ; Wait until uGuru is ready to be read
.is_ready2:
in al, UGURU_DATA_PORT
dec ecx
jnz @f
xor al, al
ret
@@: cmp al, 1
jne .is_ready2
in al, UGURU_CMD_PORT ; Read the sensor
push eax
call uGuru_Ready ; Put the chip in ready state
pop eax ; Return the result of the sensor
ret
;-----------------------------------
uGuru_Ready:
; Put uGuru in ready state. uGuru will hold 0x08 at Data port and 0xAC at Command port after this.
; Out : CF = 1 - error
; Wait until uGuru is in ready-state
; The loop shouldn't be needed to execut more then one time
mov edx, 1000
.nxt: in al, UGURU_DATA_PORT
cmp al, 8
je .ok
xor al, al ; after 0x00 is written to Data port
out UGURU_DATA_PORT, al
mov ecx, 1000 ; Wait until 0x09 is read at Data port
.is_ready:
in al, UGURU_DATA_PORT
dec ecx
jnz @f
stc
ret
@@: cmp al, 9
jne .is_ready
mov ecx, 1000 ; Wait until 0xAC is read at Cmd port
.is_ready2:
in al, UGURU_CMD_PORT
dec ecx
jnz @f
stc
ret
@@: cmp al, 0xAC
jne .is_ready2
dec edx ; Prevent a lockup
jnz .nxt
stc
ret
.ok: clc
ret

View File

@ -6,229 +6,44 @@
; + 16.03.06 Èñïðàâëåíà îøèáêà â wb_get_cpu_temper ñ äåñÿòûõ ãðàäóñà (áûëî 30.5 30.0 31.5 ...)
;
;
uglobal
wb_chip_id: db 0 ; Èäåíòèôèêàòîð ÷èïà (åñëè íàøëè)
endg
; | Chip name | ID Vin Fanin PWM Temp
msg_wb27HF: db 8, 'W83627HF' ; 0x20|0x21 9 3 2 3
msg_wb27THF: db 9, 'W83627THF' ; 0x90|0x91 7 3 3 3
msg_wb37THF: db 9, 'W83637THF' ; 0x80 7 3 3 3
msg_wb97HF: db 8, 'W83697HF' ; 0x60|0x61 8 2 2 2
; | Chip name | ID Vin Fanin PWM Temp ISA SMBus
msg_wb27HF: db 8, 'W83627HF' ; 0x20|0x21 9 3 2 3 + +
msg_wb27THF: db 9, 'W83627THF' ; 0x90|0x91 7 3 3 3 + +
msg_wb37THF: db 9, 'W83637THF' ; 0x80 7 3 3 3 + +
msg_wb97HF: db 8, 'W83697HF' ; 0x60|0x61 8 2 2 2 + -
msg_wb27EHF: db 11,'W83627EHF-A' ; 0x88
msg_wb27THFA: db 11,'W83627THF-A' ; 0x1A
; db 7, 'W83781D' ; 0x10|0x11 7 3 3
; db 7, 'W83782D' ; 0x30 9 3 3
; db 8, 'AS99127F' ; 0x31
; db 7, 'W83783S' ; 0x40|0x41 5-6 3 1-2
; db 7, 'W83791D' ; 0x70|0x71 10 5 3
; db 7, 'W83781D' ; 0x10|0x11 7 3 3 + +
; db 7, 'W83782D' ; 0x30 9 3 3 + +
; db 8, 'AS99127F' ; 0x31 7 3 3 - +
; db 7, 'W83783S' ; 0x40|0x41 5-6 3 1-2 - +
; db 7, 'W83791D' ; 0x70|0x71 10 5 3 - +
msg_wbunk: db 15,'Unknown Winbond' ; other, non zero ;-)
;-----------------------------------
wb_init:
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
; OUT - CF = 1 - error
mov dx, 0x295
cmp byte[acc_type], 2 ; Only ISA and SMBus
jae wb_no
mov al, 0x4e
out dx, al
inc edx
xor al, al
out dx, al
dec edx
xor bl, bl
call [IO_Write]
mov al, 0x4f
out dx, al
inc edx
in al, dx
call [IO_Read]
mov ah, al ;!
dec edx
mov al, 0x4e
out dx, al
inc edx
mov al, 0x80
out dx, al
dec edx
mov bl, 0x80
call [IO_Write]
mov al, 0x4f
out dx, al
inc edx
in al, dx
call [IO_Read]
cmp ax, 0xa35c
jne wb_no ; ýòî íå Winbond !!!
dec edx ; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà --
; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà --
mov al, 0x58
out dx, al
inc edx
in al, dx
mov byte[wb_chip_id], al
clc
ret
wb_no: stc
ret
;-----------------------------------
wb_get_temp:
; temp 1
mov dx, 0x295 ; Âûáèðàåì bank 1
mov al, 0x4e
out dx, al
inc edx
mov al, 1
out dx, al
dec edx ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
mov al, 0x50
out dx, al
inc edx
in al, dx
mov [temps], al
dec edx ; Ïîëó÷àåì ìëàäøèé áàéò òåìïåðàòóðû (0.5`C)
mov al, 0x51
out dx, al
inc edx
in al, dx ; if al == 0 then 0.0, else 0.5
cmp al, 0
je @f
mov al, 5
@@: mov [temps + 1], al
; temp 2 (3 SYSTIN)
dec edx ; Âûáèðàåì bank 0
mov al, 0x4e
out dx, al
inc edx
mov al, 0
out dx, al
dec edx ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
mov al, 0x27
out dx, al
inc edx
in al, dx
mov [temps + 2], al
; temp 3 (VTIN)
dec edx ; Âûáèðàåì bank 2
mov al, 0x4e
out dx, al
inc edx
mov al, 2
out dx, al
dec edx ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
mov al, 0x50
out dx, al
inc edx
in al, dx
mov [temps + 4], al
dec edx ; Ïîëó÷àåì ìëàäøèé áàéò òåìïåðàòóðû (0.5`C)
mov al, 0x51
out dx, al
inc edx
in al, dx ; if al == 0 then 0.0, else 0.5
cmp al, 0
je @f
mov al, 5
@@: mov [temps + 5], al
; Ïðîâåðêà òåìïåðàòóðû, äàò÷èêè ñ 127.5`C íå èñïîëüçóþòñÿ
mov ecx, 3
mov esi, temps
wb_check_temp:
cmp word[esi + ecx * 2 - 2], 0x057F
jne wb_temp_ok
mov word[esi + ecx * 2 - 2], 0
wb_temp_ok:
loop wb_check_temp
ret
;-----------------------------------
wb_get_fan_speed:
; fan1
mov al, 0x47
mov dx, 0x295
out dx, al
inc edx
in al, dx
and al, 0x30
shr al, 4
mov ebx, 1
mov cl, al
shl ebx, cl ; <- div1
dec edx
mov al, 0x28
out dx, al
inc edx
xor eax, eax
in al, dx
cmp al, 255
jne @f
xor eax, eax
ret
@@: mul ebx
mov ebx, eax
mov eax, 1350000
xor edx, edx
div ebx
mov [rpms], eax
mov al, 0x47
mov dx, 0x295
out dx, al
inc edx
in al, dx
shr al, 6
mov ebx, 1
mov cl, al
shl ebx, cl ; <- div2
dec edx
mov al, 0x29
out dx, al
inc edx
xor eax, eax
in al, dx
cmp al, 255
jne @f
xor eax, eax
ret
@@: mul ebx
mov ebx, eax
mov eax, 1350000
xor edx, edx
div ebx
mov [rpms + 4], eax
ret
;-----------------------------------
wb_get_volt:
mov dx, 0x295
;mov edi, vcoeff ; <-- possible differences for miscellaneous chip
mov esi, Vcore
xor ecx, ecx
@@: mov eax, ecx
add al, 0x20
out dx, al
inc edx
in al, dx
fld dword [edi + ecx * 4]
push eax
fild dword [esp]
fmulp st1, st0
fstp dword [esi + ecx * 4]
pop eax
inc ecx
dec edx
cmp ecx, 7
jb @b
ret
wb_coeff: dd 0.016 ; Vcore
dd 0.016 ; Vin0
dd 0.016 ; Vin1 (+3.3V)
dd 0.02688 ; AVcc (+5V)
dd 0.0608 ; Vin2 (+12V)
dd 0.0822857142857145 ; -12V
dd -0.02408 ; -5V ; false
wb_n12v_const dd -14.9142857142857
;-----------------------------------
wb_get_name:
; Âîçâðàùàåò èìÿ ÷èïà
; Out : EDX - pointer to string (size:string - Pascal style)
mov al, [wb_chip_id]
call [IO_Read]
and al, 0xFE ; 0x20 = 0x21, 0x60 = 0x61, etc
mov edx, msg_wb27HF
cmp al, 0x20
@ -249,6 +64,143 @@ wb_get_name:
cmp al, 0x1A
je @f
mov edx, msg_wbunk
@@: ret
@@: mov [hwm_chip_name], edx
clc
ret
wb_no: stc
ret
;-----------------------------------
wb_getparam:
call wb_get_temp
call wb_get_fan_speed
mov edi, wb_coeff
call wb_get_volt
fld dword[V12]
fld dword[wb_n12v_const]
faddp st1, st0
fstp dword[V12]
ret
;-----------------------------------
wb_get_temp:
; temp 1
mov al, 0x4e ; Âûáèðàåì bank 1
mov bl, 1
call [IO_Write]
mov al, 0x50 ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
call [IO_Read]
mov [hwm_temps], al
mov al, 0x51 ; Ïîëó÷àåì ìëàäøèé áàéò òåìïåðàòóðû (x.5`C)
call [IO_Read]
cmp al, 0 ; if al == 0 then x.0, else x.5
je @f
mov al, 5
@@: mov [hwm_temps + 1], al
; temp 2 (3 SYSTIN)
mov al, 0x4e ; Âûáèðàåì bank 0
xor bl, bl
call [IO_Write]
mov al, 0x27 ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
call [IO_Read]
mov [hwm_temps + 2], al
; temp 3 (VTIN)
mov al, 0x4e ; Âûáèðàåì bank 2
mov bl, 2
call [IO_Write]
mov al, 0x50 ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
call [IO_Read]
mov [hwm_temps + 4], al
mov al, 0x51 ; Ïîëó÷àåì ìëàäøèé áàéò òåìïåðàòóðû (x.5`C)
call [IO_Read]
cmp al, 0 ; if al == 0 then x.0, else x.5
je @f
mov al, 5
@@: mov [hwm_temps + 5], al
; Ïðîâåðêà òåìïåðàòóðû, äàò÷èêè ñ 127.5`C íå èñïîëüçóþòñÿ
mov ecx, 3
mov esi, hwm_temps
wb_check_temp:
cmp word[esi + ecx * 2 - 2], 0x057F
jne wb_temp_ok
mov word[esi + ecx * 2 - 2], 0
wb_temp_ok:
loop wb_check_temp
ret
;-----------------------------------
wb_get_fan_speed:
; fan1
mov al, 0x47
call [IO_Read]
and al, 0x30
shr al, 4
mov ebx, 1
mov cl, al
shl ebx, cl ; <- div1
xor eax, eax
mov al, 0x28
call [IO_Read]
cmp al, 255
jne @f
xor eax, eax ; ???
ret ; ???
@@: mul ebx
mov ebx, eax
mov eax, 1350000
xor edx, edx
div ebx
mov [hwm_rpms], eax
mov al, 0x47
call [IO_Read]
shr al, 6
mov ebx, 1
mov cl, al
shl ebx, cl ; <- div2
xor eax, eax
mov al, 0x29
call [IO_Read]
cmp al, 255
jne @f
xor eax, eax
ret
@@: mul ebx
mov ebx, eax
mov eax, 1350000
xor edx, edx
div ebx
mov [hwm_rpms + 4], eax
ret
;-----------------------------------
wb_get_volt:
;mov edi, wb_coeff ; <-- possible differences for miscellaneous chip
mov esi, hwm_voltages
xor ecx, ecx
@@: mov eax, ecx
add al, 0x20
call [IO_Read]
fld dword [edi + ecx * 4]
push eax
fild dword [esp]
fmulp st1, st0
fstp dword [esi + ecx * 4]
pop eax
inc ecx
cmp ecx, 7
jb @b
ret
wb_coeff: dd 0.016 ; Vcore
dd 0.016 ; Vin0
dd 0.016 ; Vin1 (+3.3V)
dd 0.02688 ; AVcc (+5V)
dd 0.0608 ; Vin2 (+12V)
dd 0.0822857142857145 ; -12V
dd -0.02408 ; -5V ; false
wb_n12v_const dd -14.9142857142857

View File

@ -4,6 +4,7 @@ lang fix en ; ru en fr ge fi
@^ fix macro comment {
^@ fix }
nl equ 0x0d, 0x0a
;~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
macro uglobal {
UGlobals equ UGlobals,

View File

@ -1,38 +1,46 @@
==[CP1251]========================================
Ghost Monitor
Автор : Михайлов Илья Андреевич aka Ghost
Âåðñèÿ : 0.3 îò 30/07/06
ÎÑ : äëÿ ïîëíîãî ôóíêöèîíèðîâàíèÿ Kolibri 0.5.8.0 è ñòàðøå
Версия : 0.4 от 25/11/06
ОС : для полного функционирования скачайте последнне ядро, или последний дистрибутив.
files : svn://kolibrios.org/programs/system/gmon/
http://iam.gorodok.net/Gmon.zip
forum : meos.sysbin.com -> Программы -> GMon
file : http://iam.gorodok.net/Gmon.zip
mailto : ghost.nsk@mail.ru
Назначение :
Ìîíèòîðèíã òåìïåðàòóðû è ñêîðîñòè âðàøåíèÿ âåíòèëÿòîðîâ ïðîöåññîðà è
Мониторинг температуры, напряжения и скорости врашения вентиляторов процессора и
материнской платы, стресс тестирование надёжности системы охлаждения и блока
питания компьютера.
Мониторинг :
 íàñòîÿùåå âðåìÿ îòîáðàæàþòñÿ çàãðóçêà ïðîöåññîðà, çàãðóçêà ïàìÿòè, òåìïåðàòóðà, ñêîðîñòè
âðàøåíèÿ âåíòèëÿòîðîâ è íàïðÿæåíèå. Ïîääåðæèâàåìûå ÷èïû ìîíèòîðèíãà :
В настоящее время отображаются загрузка/частота процессора, загрузка памяти, температура,
скорости врашения вентиляторов и напряжение. Поддерживаемые чипы мониторинга :
WinBond chip : W83627HF/THF/THF-A/EHF-A, W83637THF, W83697HF, и аналоги.
Integrated Technology Express : IT8705F, IT8712F, IT8716F, è àíàëîãè.
SiS : sis950 (àíàëîã IT8705F)
Ôóíêöèè ìîíèòîðèíãà òåìïåðàòóðû ìîæíî ïðîâåðèòü â Windows íà ýìóëÿòîðå KlbrInWin, äëÿ ýòîãî
íåîáõîäèìî â ôàéëå íàñòðîåê íàïèñàòü EnablePorts 295 296
Integrated Technology Express (ITE) : IT8705F, IT8712F, IT8716F, и аналоги.
Silicon Integrated Systems Corp. (SiS) : sis950 (аналог IT8705F)
ABIT : uGuru
Функции мониторинга можно проверить в Windows на эмуляторе KlbrInWin, для этого необходимо в
файле настроек написать (пользуйтесь последней версией):
EnablePorts=e0-e8 295 296
AllowReadMSR=true
Тесты :
Тесты ориентированы на процессоры P5, P6, K6 и K7, основаны на Robert Redelmeier's CPUburn
[http://pages.sbcglobal.net/redelm/]. Цля тестирования Pentium 4, рекомендую тест для K7, для
остальных процессоров подберите по максимальной температуре (напишите мне об этом).
Внимание! Программа не реагирует на критический порог температуры, поэтому для избежания
порчи оборудования не оставляйте запушенный тест без присмотра! В связи с различием в
реализации функции 18-2, для Menuet и Kolibri необходимы различные реализации программы, по
óìîë÷àíèþ êîìïèëèðóåòñÿ äëÿ Kolibri 0.5.8.0, ïðè íåîáõîäèìîñòè èçìåíèòå ïðîöåäóðó stop_test â
system.inc. Òåñòû ðàáîòàþò îäèíàêîâî ýôôåêòèâíî êàê íà ðåàëüíîì îáîðóäîâàíèè, òàê è íà
âèðòóàëüíûõ ìàøèíàõ.
умолчанию компилируется для Kolibri 0.5.8.0 и старше, при необходимости измените параметр
OS_version в файле config.inc. Тесты работают одинаково эффективно как на реальном оборудовании,
так и на виртуальных машинах, но не рекоммендуется запускать их на эмуляторах (KlbrInWin,
MeOSEmul, etc) в связи с плохой реализацией завершения процесса, что может привести к порче
оборудования.
На будущее :
Новые чипы
@ -42,58 +50,9 @@ system.inc.
Особая благодарность всем участникам форума.
Найденные ошибки и предложения пишите в форум или на почту.
ÂÍÈÌÀÍÈÅ !!! ÂÎÇÌÎÆÍÀ ÏÎÐ×À ÎÁÎÐÓÖÎÂÀÍÈß!
ÈÑÏÎËÜÇÓÉÒÅ ÍÀ ÑÂÎÉ ÑÒÐÀÕ È ÐÈÑÊ!
И напоследок :
ВНИМАНИЕ !!! ВОЗМОЖНА ПОРЧА ОБОРУДОВАНИЯ! ИСПОЛЬЗУЙТЕ НА СВОЙ СТРАХ И РИСК!
Программа распостраняется "as is", и автор не несет ответственности за возможный ущерб, причиненный
программой.
==[CP866]=========================================
Ghost Monitor
€¢â®à : Œ¨å ©«®¢ ˆ«ìï €­¤à¥¥¢¨ç aka Ghost
‚¥àá¨ï : 0.3 ®â 30/07/06
Ž‘ : ¤«ï ¯®«­®£® ä㭪樮­¨à®¢ ­¨ï Kolibri 0.5.8.0 ¨ áâ àè¥
forum : meos.sysbin.com -> <20>ணࠬ¬ë -> GMon
file : http://iam.gorodok.net/Gmon.zip
mailto : ghost.nsk@mail.ru
<EFBFBD> §­ ç¥­¨¥ :
Œ®­¨â®à¨­£ ⥬¯¥à âãàë ¨ ᪮à®á⨠¢à è¥­¨ï ¢¥­â¨«ïâ®à®¢ ¯à®æ¥áá®à  ¨
¬ â¥à¨­áª®© ¯« âë, áâà¥áá â¥áâ¨à®¢ ­¨¥ ­ ¤ñ¦­®á⨠á¨áâ¥¬ë ®å« ¦¤¥­¨ï ¨ ¡«®ª 
¯¨â ­¨ï ª®¬¯ìîâ¥à .
Œ®­¨â®à¨­£ :
­ áâ®ï饥 ¢à¥¬ï ®â®¡à ¦ îâáï § £à㧪  ¯à®æ¥áá®à , § £à㧪  ¯ ¬ïâ¨, ⥬¯¥à âãà , ᪮à®áâ¨
¢à è¥­¨ï ¢¥­â¨«ïâ®à®¢ ¨ ­ ¯à殮­¨¥. <20>®¤¤¥à¦¨¢ ¥¬ë¥ ç¨¯ë ¬®­¨â®à¨­£  :
WinBond chip : W83627HF/THF/THF-A/EHF-A, W83637THF, W83697HF, ¨  ­ «®£¨.
Integrated Technology Express : IT8705F, IT8712F, IT8716F, ¨  ­ «®£¨.
SiS : sis950 ( ­ «®£ IT8705F)
”㭪樨 ¬®­¨â®à¨­£  ⥬¯¥à âãàë ¬®¦­® ¯à®¢¥à¨âì ¢ Windows ­  í¬ã«ïâ®à¥ KlbrInWin, ¤«ï í⮣®
­¥®¡å®¤¨¬® ¢ ä ©«¥ ­ áâ஥ª ­ ¯¨á âì EnablePorts 295 296
’¥áâë :
’¥áâë ®à¨¥­â¨à®¢ ­ë ­  ¯à®æ¥áá®àë P5, P6, K6 ¨ K7, ®á­®¢ ­ë ­  Robert Redelmeier's CPUburn
[http://pages.sbcglobal.net/redelm/]. –«ï â¥áâ¨à®¢ ­¨ï Pentium 4, ४®¬¥­¤ãî â¥áâ ¤«ï K7, ¤«ï
®áâ «ì­ëå ¯à®æ¥áá®à®¢ ¯®¤¡¥à¨â¥ ¯® ¬ ªá¨¬ «ì­®© ⥬¯¥à âãॠ(­ ¯¨è¨â¥ ¬­¥ ®¡ í⮬).
‚­¨¬ ­¨¥! <20>ணࠬ¬  ­¥ ॠ£¨àã¥â ­  ªà¨â¨ç¥áª¨© ¯®à®£ ⥬¯¥à âãàë, ¯®í⮬㠤«ï ¨§¡¥¦ ­¨ï
¯®àç¨ ®¡®à㤮¢ ­¨ï ­¥ ®áâ ¢«ï©â¥ § ¯ã襭­ë© â¥áâ ¡¥§ ¯à¨á¬®âà ! á¢ï§¨ á à §«¨ç¨¥¬ ¢
ॠ«¨§ æ¨¨ ä㭪樨 18-2, ¤«ï Menuet ¨ Kolibri ­¥®¡å®¤¨¬ë à §«¨ç­ë¥ ॠ«¨§ æ¨¨ ¯à®£à ¬¬ë, ¯®
㬮«ç ­¨î ª®¬¯¨«¨àã¥âáï ¤«ï Kolibri 0.5.8.0, ¯à¨ ­¥®¡å®¤¨¬®á⨠¨§¬¥­¨â¥ ¯à®æ¥¤ãàã stop_test ¢
system.inc. ’¥áâë à ¡®â îâ ®¤¨­ ª®¢® íä䥪⨢­® ª ª ­  ॠ«ì­®¬ ®¡®à㤮¢ ­¨¨, â ª ¨ ­ 
¢¨àâã «ì­ëå ¬ è¨­ å.
<EFBFBD>  ¡ã¤ã饥 :
<20>®¢ë¥ 稯ë
<20>¥ ªæ¨ï ­  ªà¨â¨ç¥áª¨© ¯®à®£ ⥬¯¥à âãàë
<20>஢¥ª  ­ ¤ñ¦­®á⨠á奬 ¯¨â ­¨ï
Žá®¡ ï ¡« £®¤ à­®áâì ¢á¥¬ ãç áâ­¨ª ¬ ä®à㬠.
<EFBFBD> ©¤¥­­ë¥ ®è¨¡ª¨ ¨ ¯à¥¤«®¦¥­¨ï ¯¨è¨â¥ ¢ ä®à㬠¨«¨ ­  ¯®çâã.
<EFBFBD>ˆŒ€<EFBFBD>ˆ… !!! Ž‡ŒŽ†<C5BD><20>Ž<EFBFBD>—€ Ž<>Ž<EFBFBD>Ž<E2809A>ˆŸ!
ˆ<EFBFBD>Žœ‡“‰<20>€ ‘‚Ž‰ <E28098>€• ˆ <20>ˆŠ!
<EFBFBD>ணࠬ¬  à á¯®áâà ­ï¥âáï "as is", ¨  ¢â®à ­¥ ­¥á¥â ®â¢¥âá⢥­­®á⨠§  ¢®§¬®¦­ë© ãé¥à¡, ¯à¨ç¨­¥­­ë©
¯à®£à ¬¬®©.

View File

@ -161,7 +161,7 @@ multiplier:
; out : CL = êîýôô.óìíîæåíèÿ * 10, èëè 0
xor ecx, ecx
if (OS_version >= 0x0510)
display nl, 'Multiplier : yes'
display nl, 'Multiplier (RDMSR) : yes'
cmp dword [Vendor + 8], 'cAMD' ; Check for Advanced Micro Devices CPU
jne noAMD
cmp byte [CPU_fam], 5
@ -369,3 +369,26 @@ uglobal
Data_String: times 20 db 0 ; ASCIIZ ñòîðêà ñ ïðåîáðàçîâàííûì ÷èñëîì
endg
;--------------------------------------------------------------------
ReservePorts:
; In : ecx - first port, edx - last port
; Out : CF = 1 if error
pusha
mov eax, 46
xor ebx, ebx
int 0x40
clc
test eax, eax
jz @f
stc
@@: popa
ret
FreePorts:
; In : ecx - first port, edx - last port
pusha
mov eax, 46 ; îñâîáîæäàåì 0x295 è 0x296 ïîðòû
xor ebx, ebx
inc ebx
int 0x40
popa
ret

View File

@ -1,6 +1,6 @@
mov edx, msg_about
mov ebx, 17 * 65536 + 265
mov ebx, 17 * 65536 + 285
call show_text
jmp end_drow_tab
@ -12,10 +12,10 @@ msg_about mls \ ;
'Supported SuperIO : W83627HF,W83697HF',\
' W83627THF,W83627THF-A,W83627EHF-A,',\
' W83637THF,IT8705F,IT8712F,SiS950',\
' ABIT uGuru',\
'',\
'Tests based on R.J.Redelmeier CPUBurn',\
'',\
'Mailto : ghost.nsk@mail.ru',\
'',\
'',\
' *** Use at YOUR own RISK ***'

View File

@ -6,7 +6,7 @@
; Âðåìÿ îáíîâëåíèÿ
mov eax, 8
mov ebx, 200 * 65536 + 15
mov ecx, 260 * 65536 + 15
mov ecx, 280 * 65536 + 15
mov edx, 11
mov esi, tcol
int 0x40
@ -16,13 +16,13 @@
int 0x40
mov eax, 4
mov ebx, 17 * 65536 + 265
mov ebx, 17 * 65536 + 285
mov edx, msg_cf_utime
mov ecx, 0x10000000
mov esi, 11
int 0x40
mov ebx, 205 * 65536 + 265
mov ebx, 205 * 65536 + 285
mov edx, msg_cf_pm
xor ecx, ecx
mov esi, 4
@ -30,14 +30,14 @@
mov ecx, [update_time]
call digit_len
mov edx, 160 * 65536 + 265
mov edx, 160 * 65536 + 285
xor esi, esi
mov eax, 47
int 0x40
; Ðàññòàâëÿåì äâîåòî÷èÿ
mov eax, 4
mov ebx, 152 * 65536 + 265
mov ebx, 152 * 65536 + 285
mov edx, dub_p
mov esi, 1
mov ecx, 0x10000000

View File

@ -8,16 +8,16 @@
; Ïèøåì ïàðàìåòðû
mov edx, lab_info_tab
mov ebx, 17 * 65536 + 265
mov ebx, 17 * 65536 + 285
call show_text
; Ïèøåì ïðîèçâîäèòåëÿ ïðîöåññîðà
mov edx, Vendor
mov esi, 12
mov ebx, 160 * 65536 + 265
mov ebx, 160 * 65536 + 285
int 0x40
; Ïîääåðæêà MMX
mov ebx, 160 * 65536 + 275
mov ebx, 160 * 65536 + 305
mov esi, 3
mov edx, msg_yes
cmp byte[CPU_mmx], 1
@ -25,20 +25,40 @@
mov edx, msg_no
mmx_en: int 0x40
; ×èï ìîíèòîðèíãà
int 0x40
mov edx, [hwm_chip_name]
mov al, byte[edx]
movzx esi, al
inc edx
mov ebx, 160 * 65536 + 285
mov ebx, 160 * 65536 + 315
mov al, 4
int 0x40
; ×àñòîòà ïðîöåññîðà
mov eax, 18
mov ebx, 5
int 0x40
push eax
fild dword[esp]
push 1000;000
fidiv dword[esp]
fidiv dword[esp]
fstp dword[esp]
mov esi, esp
call ftoa
mov ebx, 160 * 65536 + 295
mov edx, Data_String
mov eax, 4
mov esi, 7
xor ecx, ecx
int 0x40
pop eax
pop eax
; Ñåìåéñòâî è ìîäåëü ïðîöåññîðà
mov eax, 47
mov ebx, 0x10100
xor ecx, ecx
mov cl, [CPU_fam]
mov edx, 250 * 65536 + 265
mov edx, 250 * 65536 + 285
xor esi, esi
int 0x40
mov cl, [CPU_mod]
@ -57,7 +77,7 @@ mmx_en: int 0x40
fstp dword[esp]
mov esi, esp
call ftoa
mov ebx, 160 * 65536 + 295
mov ebx, 160 * 65536 + 325
mov edx, Data_String
mov eax, 4
mov esi, eax
@ -74,17 +94,17 @@ if (OS_version >= 0x0530)
mov ecx, eax
call digit_len
mov eax, 47
mov edx, 160 * 65536 + 305
mov edx, 160 * 65536 + 335
xor esi, esi
int 0x40
end if
; Ðàññòàâëÿåì äâîåòî÷èÿ
mov eax, 4
mov ebx, 152 * 65536 + 265
mov ebx, 152 * 65536 + 285
mov edx, dub_p
mov esi, 1
mov ecx, 5 ; <- количество строк
mov ecx, 6 ; <- êîëè÷åñòâî ñòðîê
nxt_dp: push ecx
mov ecx, 0x10000000
int 0x40
@ -97,6 +117,7 @@ dub_p db ':'
lab_info_tab mls \
'CPU Vendor',\
'CPU frequency (MHz)',\
'MMX tehnology',\
'Monitoring chip',\
'Multiplier',\

View File

@ -21,7 +21,7 @@
; Pentium (P5) button
mov eax, 8
mov ebx, 17 * 65536 + 145
mov ecx, 277 * 65536 + 25
mov ecx, 297 * 65536 + 25
mov edx, 6
mov esi, tcol
cmp byte[Vendor + 11], 'l'
@ -70,7 +70,7 @@ k7n: int 0x40
; mmxn: int 0x40
; Ïèøåì íàçâàíèÿ êíîïîê
mov eax, 4
mov ebx, 30 * 65536 + 287
mov ebx, 30 * 65536 + 307
mov esi, 7
mov edx, tmsg_p ; P5
mov ecx, 0x10000000
@ -78,14 +78,14 @@ k7n: int 0x40
jne nr1
mov ecx, 0x10FF0000
nr1: int 0x40
mov ebx, 30 * 65536 + 287 + 27
mov ebx, 30 * 65536 + 307 + 27
mov esi, 20 ; P6
mov ecx, 0x10000000
cmp byte[test_id], 7
jne nr2
mov ecx, 0x10FF0000
nr2: int 0x40
mov ebx, 30 * 65536 + 287 + 27 + 27
mov ebx, 30 * 65536 + 307 + 27 + 27
mov edx, tmsg_k6 ; K6
mov esi, 13
mov ecx, 0x10000000
@ -93,7 +93,7 @@ nr2: int 0x40
jne nr3
mov ecx, 0x10FF0000
nr3: int 0x40
mov ebx, 30 * 65536 + 287 + 27 + 27 + 27
mov ebx, 30 * 65536 + 307 + 27 + 27 + 27
mov edx, tmsg_k7 ; K7
mov esi, 15
mov ecx, 0x10000000
@ -101,7 +101,7 @@ nr3: int 0x40
jne nr4
mov ecx, 0x10FF0000
nr4: int 0x40
; mov ebx, 30 * 65536 + 287 + 27 + 27 + 27 + 27
; mov ebx, 30 * 65536 + 307 + 27 + 27 + 27 + 27
; mov edx, tmsg_mmx ; MMX
; mov esi, 12
; mov ecx, 0x10000000
@ -111,12 +111,12 @@ nr4: int 0x40
; nr5: int 0x40
; recommendate
mov ecx, 0x10000000
mov ebx, 190 * 65536 + 400
mov ebx, 190 * 65536 + 420
mov edx, tmsg_rec
mov esi, 14
int 0x40
; read about
mov ebx, 30 * 65536 + 262
mov ebx, 30 * 65536 + 282
mov edx, tmsg_war
mov esi, 34
mov ecx, 0x10FF0000
@ -124,7 +124,7 @@ nr4: int 0x40
; recommendate color
mov eax, 13
mov ebx, 170 * 65536 + 10
mov ecx, 398 * 65536 + 10
mov ecx, 418 * 65536 + 10
mov edx, atcol
int 0x40