Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9770 → Rev 9771

/programs/system/amd_temp_view/AMDtemp.asm
7,8 → 7,8
dd I_END ; à §¬¥à ¯à®£à ¬¬ë
dd MEM ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd STACKTOP
dd PATH
dd 0
dd 0
include '..\..\macros.inc'
include '..\..\KOSfuncs.inc'
 
19,10 → 19,11
mcall SF_SYS_MISC, SSF_LOAD_DRIVER_PE, path_drv, 0
mov dword[drv_struct.handl],eax
test eax,eax ;ïðîâåðêà çàãðóçêè
jnz main
jmp error_drv
jz error_drv
main:
mcall SF_SYS_MISC, SSF_CONTROL_DRIVER, drv_struct
cmp byte[PATH], 0
jz still
call add_file
still: ;void main()
call draw
46,9 → 47,11
jnz still
xor byte[flag_micro_info],1
jmp still
 
align 4
draw:
mcall SF_REDRAW, SSF_BEGIN_DRAW
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sc,sizeof.system_colors
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
 
mov eax,SF_CREATE_WINDOW
mov ebx,0x00ff013f
60,8 → 63,10
 
mcall SF_SYS_MISC, SSF_CONTROL_DRIVER, drv_struct
 
cmp byte[PATH], 0
jz @f
dec dword[update_flag]
jnz @F
jnz @f
call add_new_item
mov dword[update_flag], 30
@@:
251,6 → 256,7
;; ebx=pointer on value
;; ecx register don`t save
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
align 4
write_data:
push eax
push ebx
345,10 → 351,11
exit:
mcall SF_TERMINATE_PROCESS
 
align 4
add_file:
mcall SF_FILE, graph_temp
mov dword[graph_temp], 3
mov dword[graph_temp.size], 11
mov dword[graph_temp.size], 10
mov dword[graph_temp.str], graph_start.new_data
mov eax,[drv_data.Tmax]
mov dword[graph_temp.index], 9
356,8 → 363,10
call int_to_str
mcall SF_FILE, graph_temp
 
mov dword[graph_temp.index], 20
mov dword[graph_temp.index], 19
mov dword[graph_temp.size], 20
ret
align 4
index_item:
dd 1
add_new_item:
365,14 → 374,14
imul eax,1000
mov ebx, graph_start.new_data
call int_to_str
mcall SF_FILE, graph_temp
add dword[graph_temp.index], 11
mcall SF_FILE, graph_koord_x2 ;save x2=index_item
inc dword[index_item]
 
mov eax,[drv_data.Tctl]
mov ebx, graph_start.new_data
mov ebx, graph_start.new_data_2
call int_to_str
mcall SF_FILE, graph_temp
add dword[graph_temp.index], 11
add dword[graph_temp.index], 20
ret
 
;eax = int value / 1000
379,6 → 388,7
;ebx = *str
; èç çà êîíêðåòèêè äàííîãî ïðèëàæåíèÿ(à èìåííî èçìåðåíèå òåìïåðàòóðû ïðîöà), ñîìíèâàþñü
; ÷òî ïîòðåáóåòñÿ áîëüøå 3 öèôð íà çíà÷åíèå(õõõ.õõõ) òàê ÷òî áóäåò êîñòûëü
align 4
int_to_str:
push ecx edx esi
mov ecx, '0000'
392,8 → 402,8
mov esi, 10
push ebx
add ebx, 3
and eax, 0x3ff ; 1023
.loop:
and eax, 0x3ff ; 1023
test eax, eax
jz @f
xor edx, edx
406,8 → 416,6
pop ebx
add ebx, 8;4
pop edx
;mov byte[ebx],'.'
;add ebx, 4
test edx, edx
jz @f
mov eax, edx
464,6 → 472,7
.Tcrit_hyst dd -1
.sizeof = $ - drv_data ;
 
align 4
drv_struct:
.handl dd 0
dd 0
471,7 → 480,7
dd 0
dd drv_data
dd drv_data.sizeof;52 ; 13*4
 
align 4
run_notify:
dd 7
dd 0
480,17 → 489,33
dd 0
db '/sys/@notify',0 ,0,0,0 ;âûðàâíèâàíèå
 
align 4
update_flag: dd 30 ;1 minut
graph_start: db '0 1000 0 ' ; 9 byte
.new_data: db '0000.0000 ' ; 10-20 byte
graph_start: db '0 0000 0 ' ; 9 byte
.new_data: db '0000.0000 ' ; 10-19 byte 10 byte
.new_data_2: db '0000.0000 ' ; 20-29 byte 10 byte
 
align 4
graph_temp:
dd 2
.index: dd 0
dd 0
.size: dd 20 ;
.size: dd 19 ;size 4 first value for Graph
.str: dd graph_start ; çàìåíèòü
db '/tmp0/1/graph_temp.txt',0,0 ; âûðàâíèâàíèå
 
db 0
dd PATH
align 4
graph_koord_x2:
dd 3
dd 2 ;index for rewrite 2 value
dd 0
dd 4
dd graph_start.new_data ; çàìåíèòü
db 0
dd PATH
align 4
PATH:
rb 512 ; buffer for command line. string for save log.
sc system_colors
I_END:
rd 256