Ghost monitor: text fix

git-svn-id: svn://kolibrios.org@5950 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin 2015-12-08 21:56:29 +00:00
parent 2edaae3ebe
commit 9e25eb78da
5 changed files with 43 additions and 68 deletions

View File

@ -41,7 +41,7 @@ include 'macros.inc'
tcol equ 0x5080d0 tcol equ 0x5080d0
atcol equ 0x4070c0 atcol equ 0x4070c0
val_mod equ 0x3090 val_mod equ 0x3090
MEOS_APP_START MEOS_APP_START
include "tests.inc" ; <-- Ìíîãî âûðàâíèâàíèé, ëó÷øå çäåñü include "tests.inc" ; <-- Ìíîãî âûðàâíèâàíèé, ëó÷øå çäåñü
@ -108,14 +108,14 @@ key:
jmp wait_for_event jmp wait_for_event
;--- Button down ----------------------------------------------------- ;--- Button down -----------------------------------------------------
button: button:
mov eax, 17 ; get id mov eax, 17 ; get id
int 0x40 int 0x40
cmp ah, 1 ; button id == 1 ? cmp ah, 1 ; button id == 1 ?
jne noexit jne noexit
exit: cmp byte[test_id], 0 exit: cmp byte[test_id], 0
je @f je @f
call stop_test call stop_test
@@: mov eax, -1 ; close this program @@: mov eax, -1 ; close this program
int 0x40 int 0x40
noexit: noexit:
; êíîïêè âêëàäîê (2 .. 5) ; êíîïêè âêëàäîê (2 .. 5)
@ -145,7 +145,7 @@ rtst: mov eax, 51
mov edx, stp mov edx, stp
mov ebx, 1 mov ebx, 1
int 0x40 int 0x40
cmp eax, 0xFFFFFFF0 ; -16 cmp eax, 0xFFFFFFF0 ; -16
je wait_for_event ; <-- îøèáêà çàïóñêà òåñòà, ÏÅÐÅÏÈÑÀÒÜ je wait_for_event ; <-- îøèáêà çàïóñêà òåñòà, ÏÅÐÅÏÈÑÀÒÜ
mov [test_pid], eax mov [test_pid], eax
pop eax pop eax
@ -211,7 +211,7 @@ draw_window:
mov ecx, 140 * 65536 + 140 mov ecx, 140 * 65536 + 140
@@: add ecx, 10 * 65536 + 10 @@: add ecx, 10 * 65536 + 10
int 0x40 int 0x40
cmp cx, 230 ; ïðèâÿçàíî ê êîîðäèíàòàì îêíà cmp cx, 230 ; ïðèâÿçàíî ê êîîðäèíàòàì îêíà
jl @b jl @b
; Ïèøèì íàçâàíèÿ ïàðàìåòðîâ (Cpu load, temper, etc...) ; Ïèøèì íàçâàíèÿ ïàðàìåòðîâ (Cpu load, temper, etc...)
@ -337,7 +337,7 @@ sh_temp:push ecx
mov ecx, 5 mov ecx, 5
mov esi, hwm_rpms mov esi, hwm_rpms
mov edx, 121 * 65536 + 80 mov edx, 121 * 65536 + 80
sh_fan: push ecx sh_fan: push ecx
lodsd lodsd
push esi push esi
;ðåàêöèÿ íà èçìåíåíèÿ ;ðåàêöèÿ íà èçìåíåíèÿ
@ -372,8 +372,8 @@ volt_nxt:
fsub dword [edi] fsub dword [edi]
fabs fabs
; fcomp dword [c_eps] ; bug in MeOsEmul ; fcomp dword [c_eps] ; bug in MeOsEmul
; fstsw ax ; fstsw ax
fcom dword [c_eps] ; 0xBADCODE fcom dword [c_eps] ; 0xBADCODE
fstsw ax fstsw ax
finit finit
@ -459,7 +459,7 @@ end_drow_tab:
jmp wait_for_event jmp wait_for_event
;--- Drow Info tab --------------- ;--- Drow Info tab ---------------
info_tab: info_tab:
include "tab_info.inc" include "tab_info.inc"
;--- Drow test tab --------------- ;--- Drow test tab ---------------
test_tab: test_tab:
include "tab_test.inc" include "tab_test.inc"
@ -470,13 +470,13 @@ config_tab:
about_tab: about_tab:
include "tab_about.inc" include "tab_about.inc"
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include "system.inc" include "system.inc"
include "hwm.inc" include "hwm.inc"
include "diag.inc" include "diag.inc"
DATA DATA
act_tab db 2 ; Íîìåð àêòèâíîé âêëàäêè act_tab db 2 ; Íîìåð àêòèâíîé âêëàäêè
tab_lab: tab_lab:
.1: db 'Info' .1: db 'Info'
.2: db 'Tests' .2: db 'Tests'
@ -505,7 +505,7 @@ msgs_mon2 mls \
'-12V',\ '-12V',\
'-5V' '-5V'
msg_yes db 'Yes' msg_yes db 'Yes'
msg_no db 'N/A' msg_no db 'N/A'
update_time dd 300 ; ïåðèîä îáíîâëåíèÿ â ñîòûõ äîëÿõ ñåêóíäû update_time dd 300 ; ïåðèîä îáíîâëåíèÿ â ñîòûõ äîëÿõ ñåêóíäû
@ -513,28 +513,28 @@ d_colors dd d_cpu_load, d_mem_usage, d_temp1, d_temp2, d_temp3
c_eps dd 0.01 c_eps dd 0.01
; Öâåòà ãðàôèêîâ ; Öâåòà ãðàôèêîâ
colors: dd 0xff0000, 0xff00, 0xff, 0xffffff, tcol, 0xFF7E23, 0x8BA169, 0xff0000 ; ïåðâûé è ïîñëåäíèé ðàâíû colors: dd 0xff0000, 0xff00, 0xff, 0xffffff, tcol, 0xFF7E23, 0x8BA169, 0xff0000 ; ïåðâûé è ïîñëåäíèé ðàâíû
colors_end: colors_end:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
UDATA UDATA
test_pid dd ? ; åñëè test_id == 0 - íå èìååò ñìûñëà test_pid dd ? ; åñëè test_id == 0 - íå èìååò ñìûñëà
test_id db ? ; 0 - òåñò íå çàïóøåí (ñîîòâåòñòâóåò ¹ êíîïêè 6..10) test_id db ? ; 0 - òåñò íå çàïóøåí (ñîîòâåòñòâóåò ¹ êíîïêè 6..10)
diag_add_v db ? ; 0 - íå äîáàâëÿòü äàííûå íà ãðàôèê, !0 - äîáàâëÿòü diag_add_v db ? ; 0 - íå äîáàâëÿòü äàííûå íà ãðàôèê, !0 - äîáàâëÿòü
Vendor: times 12 db ? Vendor: times 12 db ?
CPU_fam: db ? CPU_fam: db ?
CPU_mod: db ? CPU_mod: db ?
CPU_type: db ? CPU_type: db ?
CPU_mmx: db ? CPU_mmx: db ?
; Äëÿ ðåàêöèè íà èçìåíåíèÿ ; Äëÿ ðåàêöèè íà èçìåíåíèÿ
old_t1: dd ? ; ïîñëåäíåå çíà÷åíèå temp1 old_t1: dd ? ; ïîñëåäíåå çíà÷åíèå temp1
old_t2: dd ? ; ... old_t2: dd ? ; ...
old_t3: dd ? old_t3: dd ?
old_f1: dd ? old_f1: dd ?
old_f2: dd ? old_f2: dd ?
old_f3: dd ? old_f3: dd ?
old_volts: times 7 dd ? old_volts: times 7 dd ?
; Ãðôèêè ; Ãðôèêè

View File

@ -149,7 +149,7 @@ end if
; ebx - êîîðäèíàòû : X << 16 + Y ; ebx - êîîðäèíàòû : X << 16 + Y
show_text: show_text:
mov eax, 4 mov eax, 4
mov ecx, 0x10000000 xor ecx, ecx
@@: @@:
movzx esi, byte[edx] movzx esi, byte[edx]
inc edx inc edx

View File

@ -23,7 +23,7 @@
mov eax, 4 mov eax, 4
mov ebx, 17 * 65536 + 285 mov ebx, 17 * 65536 + 285
mov edx, msg_cf_utime mov edx, msg_cf_utime
mov ecx, 0x10000000 xor ecx, ecx
mov esi, 11 mov esi, 11
int 0x40 int 0x40
@ -45,7 +45,7 @@
mov ebx, 152 * 65536 + 285 mov ebx, 152 * 65536 + 285
mov edx, dub_p mov edx, dub_p
mov esi, 1 mov esi, 1
mov ecx, 0x10000000 xor ecx, ecx
int 0x40 int 0x40
jmp end_drow_tab jmp end_drow_tab

View File

@ -120,7 +120,7 @@ end if
mov esi, 1 mov esi, 1
mov ecx, 6 ; <- количество строк mov ecx, 6 ; <- количество строк
nxt_dp: push ecx nxt_dp: push ecx
mov ecx, 0x10000000 xor ecx, ecx
int 0x40 int 0x40
add ebx, 10 add ebx, 10
pop ecx pop ecx

View File

@ -2,15 +2,9 @@
; Ghost Monitor - óòèëèòà (ñòðåññ) òåñòèðîâàíèÿ è ìîíèòîðèíãà ñèñòåìû ; Ghost Monitor - óòèëèòà (ñòðåññ) òåñòèðîâàíèÿ è ìîíèòîðèíãà ñèñòåìû
; Copyright (C) 2005, 2006, 2007 Mihailov Ilia (ghost.nsk@mail.ru) ; Copyright (C) 2005, 2006, 2007 Mihailov Ilia (ghost.nsk@mail.ru)
; All Right Reserved ; All Right Reserved
;
;
; ;
; Âêëàäêà òåñòîâ ; Âêëàäêà òåñòîâ
; ;
;
;
;
; "GenuineIntel" - International Electronics ; "GenuineIntel" - International Electronics
; "GenuineTMx86" - Transmeta Processor ; "GenuineTMx86" - Transmeta Processor
; "AuthenticAMD" - Advanced Micro Devices ; "AuthenticAMD" - Advanced Micro Devices
@ -65,66 +59,49 @@ k6n: int 0x40
jne k7n jne k7n
mov esi, atcol mov esi, atcol
k7n: int 0x40 k7n: int 0x40
; MMX òåñò
; add ecx, 27 * 65536
; inc edx
; mov esi, tcol
; cmp byte[CPU_mmx], 1
; jne mmxn
; mov esi, atcol
; mmxn: int 0x40
; Ïèøåì íàçâàíèÿ êíîïîê ; Ïèøåì íàçâàíèÿ êíîïîê
mov eax, 4 mov eax, 4
mov ebx, 30 * 65536 + 307 mov ebx, 30 * 65536 + 307
mov esi, 7 mov esi, 7
mov edx, tmsg_p ; P5 mov edx, tmsg_p ; P5
mov ecx, 0x10000000 xor ecx, ecx
cmp byte[test_id], 6 cmp byte[test_id], 6
jne nr1 jne nr1
mov ecx, 0x10FF0000 mov ecx, 0xFF0000
nr1: int 0x40 nr1: int 0x40
mov ebx, 30 * 65536 + 307 + 27 add ebx, 27
mov esi, 20 ; P6 mov esi, 20 ; P6
mov ecx, 0x10000000 xor ecx, ecx
cmp byte[test_id], 7 cmp byte[test_id], 7
jne nr2 jne nr2
mov ecx, 0x10FF0000 mov ecx, 0xFF0000
nr2: int 0x40 nr2: int 0x40
mov ebx, 30 * 65536 + 307 + 27 + 27 add ebx, 27
mov edx, tmsg_k6 ; K6 mov edx, tmsg_k6 ; K6
mov esi, 13 mov esi, 13
mov ecx, 0x10000000 xor ecx, ecx
cmp byte[test_id], 8 cmp byte[test_id], 8
jne nr3 jne nr3
mov ecx, 0x10FF0000 mov ecx, 0xFF0000
nr3: int 0x40 nr3: int 0x40
mov ebx, 30 * 65536 + 307 + 27 + 27 + 27 add ebx, 27
mov edx, tmsg_k7 ; K7 mov edx, tmsg_k7 ; K7
mov esi, 15 mov esi, 15
mov ecx, 0x10000000 xor ecx, ecx
cmp byte[test_id], 9 cmp byte[test_id], 9
jne nr4 jne nr4
mov ecx, 0x10FF0000 mov ecx, 0xFF0000
nr4: int 0x40 nr4: int 0x40
; mov ebx, 30 * 65536 + 307 + 27 + 27 + 27 + 27 xor ecx, ecx
; mov edx, tmsg_mmx ; MMX
; mov esi, 12
; mov ecx, 0x10000000
; cmp byte[test_id], 10
; jne nr5
; mov ecx, 0x10FF0000
; nr5: int 0x40
; recommendate
mov ecx, 0x10000000
mov ebx, 190 * 65536 + 420 mov ebx, 190 * 65536 + 420
mov edx, tmsg_rec mov edx, tmsg_rec
mov esi, 14 mov esi, 13
int 0x40 int 0x40
; read about ; read about
mov ebx, 30 * 65536 + 282 mov ebx, 30 * 65536 + 282
mov edx, tmsg_war mov edx, tmsg_war
mov esi, 34 mov esi, 35
mov ecx, 0x10FF0000 mov ecx, 0xFF0000
int 0x40 int 0x40
; recommendate color ; recommendate color
mov eax, 13 mov eax, 13
@ -133,16 +110,14 @@ nr4: int 0x40
mov edx, atcol mov edx, atcol
int 0x40 int 0x40
jmp end_drow_tab jmp end_drow_tab
tmsg_p db 'Pentium (Pro/II/III)' ; 7/20 tmsg_p db 'Pentium (Pro/II/III)' ; 7/20
tmsg_k6 db 'K6 (I/II/III)' ; 13 tmsg_k6 db 'K6 (I/II/III)' ; 13
tmsg_k7 db 'K7/Athlon/Duron' ; 15 tmsg_k7 db 'K7/Athlon/Duron' ; 15
;tmsg_mmx db 'MMX (memory)' ; 12 tmsg_rec db '— recommended' ; 13
tmsg_rec db '- recommendate' ; 14
if lang eq it if lang eq it
tmsg_war db 'Potrebbe danneggiare lo hardware ' ; 34 tmsg_war db 'Potrebbe danneggiare lo hardware '
else else
tmsg_war db 'May permanent damage to electronic' ; 34 tmsg_war db 'May permanently damage the hardware'
end if end if