Subversion Repositories Kolibri OS

Compare Revisions

Ignore whitespace Rev 3586 → Rev 3587

/programs/cmm/browser/img/URLgoto.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/cmm/browser/img/toolbar_icons.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/games/bnc/trunk/bk100.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/games/bnc/trunk/bk5.PNG
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/games/bnc/trunk/bnc4.PNG
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/games/bnc/trunk/bnc6.PNG
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/games/bnc/trunk/lang.inc
1,0 → 0,0
lang fix ru
lang fix en
/programs/games/bnc/trunk/makefile
0,0 → 1,17
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=bnc
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
ru:
echo "lang fix ru" > ${LANG}
${FASM} ${SOURCE} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}
/programs/games/clicks/trunk/clicks.c
1,6 → 1,6
//Leency 10.10.2011, JustClicks v2.0, GPL
 
#include "lib\kolibri.h"
#include "lib\kolibri.h"
#include "lib\random.h"
#include "lib\boxes.txt"
system_colors sc;
25,48 → 25,48
#endif
 
#ifdef LANG_RUS
char NEW_GAME_TEXT[]=" ‡ ­®¢® [F2]";
char NEW_GAME_TEXT[]=" ‡ ­®¢® [F2]";
char REZULT_TEXT[]="¥§ã«ìâ â: ";
#else
char NEW_GAME_TEXT[]="New Game [F2]";
char NEW_GAME_TEXT[]="New Game [F2]";
char REZULT_TEXT[]="Rezult: ";
#endif
 
 
void main()
{
{
int key, id;
 
BLOCKS_NUM=DIFFICULTY_LEV_PARAMS[DIFFICULTY_LEVEL];
 
new_game();
 
loop()
switch(WaitEvent())
switch(WaitEvent())
{
case evButton:
id = GetButtonID();
id = GetButtonID();
if (id==1) ExitProcess();
if (id==2) goto _NEW_GAME_MARK;
if (id>=100)
{
if (check_for_end()) break; //åñëè èãðà çàêîí÷åíà
 
move_blocks(id-100);
draw_field();
 
draw_clicks_num();
 
break;
}
if (id==10) //èçìåíÿåì ðàçìåð ïîëÿ
{
if (DIFFICULTY_LEVEL<2) DIFFICULTY_LEVEL++; else DIFFICULTY_LEVEL=0;
 
BLOCKS_NUM = DIFFICULTY_LEV_PARAMS[DIFFICULTY_LEVEL]; //êîëè÷åñòâî êâàäðàòèêîâ ïî Õ è ïî Y
 
new_game();
 
MoveSize(-1, -1, BLOCK_SIZE*BLOCKS_NUM +9, BLOCK_SIZE*BLOCKS_NUM +GetSkinWidth()+4+USER_PANEL_HEIGHT);
break;
}
106,12 → 106,12
{
if (blocks_matrix[i*BLOCKS_NUM+j]<>old_marker) continue; //åñëè ôèøêà íå íóæíîãî öâåòà èä¸ì äàëüøå
if (blocks_matrix[i*BLOCKS_NUM+j]==MARKED) continue; //åñëè ôèøêà óæå îòìå÷åíà, èä¸ì äàëåå
 
if (j>0) && (blocks_matrix[i*BLOCKS_NUM+j-1]==MARKED) blocks_matrix[i*BLOCKS_NUM+j]=MARKED; //ñìîòðèì ëåâûé
if (i>0) && (blocks_matrix[i-1*BLOCKS_NUM+j]==MARKED) blocks_matrix[i*BLOCKS_NUM+j]=MARKED; //ñìîòðèì âåðõíèé
if (j<BLOCKS_NUM-1) && (blocks_matrix[i*BLOCKS_NUM+j+1]==MARKED) blocks_matrix[i*BLOCKS_NUM+j]=MARKED; //ñìîòðèì ïðàâûé
if (i<BLOCKS_NUM-1) && (blocks_matrix[i+1*BLOCKS_NUM+j]==MARKED) blocks_matrix[i*BLOCKS_NUM+j]=MARKED; //ñìîòðèì íèæíèé
 
if (blocks_matrix[i*BLOCKS_NUM+j]==MARKED) //åñëè ôèøêó îòìåòèëè, òî ïîòîì öèêë íóæíî áóäåò ïðîêðóòèòü ñíà÷àëà - ìîæ åù¸ ÷¸ îòìåòèì
{
restart=1;
119,7 → 119,7
}
}
if (restart) goto _RESTART_MARK;
 
if (marked_num==1) //åñëè áëîê òîëüêî îäèí, óõîäèì
{
blocks_matrix[button_id]=old_marker;
139,15 → 139,15
}
}
if (restart) goto _2_RESTART_MARK;
 
//îòìå÷àåì ôèøêè, êàê óäàë¸ííûå
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++)
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++)
if (blocks_matrix[i]==MARKED)
blocks_matrix[i]=DELETED_BLOCK;
 
//äâèãàåì áëîêè âëåâî, åñëè åñòü ïóñòîé ñòîëáåö
restart=BLOCKS_NUM; //íå ïðèäóìàë íè÷åãî ëó÷øå :(
 
_3_RESTART_MARK:
for (j=0;j<BLOCKS_NUM-1;j++)
if (blocks_matrix[BLOCKS_NUM-1*BLOCKS_NUM+j]==DELETED_BLOCK)
164,11 → 164,11
{
int j, PANEL_Y;
proc_info Form;
 
sc.get();
DefineAndDrawWindow(300,176, BLOCK_SIZE*BLOCKS_NUM +9, BLOCK_SIZE*BLOCKS_NUM +GetSkinWidth()+4+USER_PANEL_HEIGHT,
0x74,sc.work,0,0,HEADER);
0x74,sc.work,0,0,HEADER);
 
//ïðîâåðÿåì íå ñõëîïíóòî ëè îêíî â çàãîëîâîê
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;
177,7 → 177,7
PANEL_Y=BLOCK_SIZE*BLOCKS_NUM;
 
DrawBar(0,PANEL_Y, PANEL_Y, USER_PANEL_HEIGHT, sc.work); //ïàíåëü ñíèçó
 
//íîâàÿ èãðà
DefineButton(10,PANEL_Y+7, 13*6+6, 20, 2,sc.work_button);
WriteText(10+4,PANEL_Y+14,0x80,sc.work_button_text,#NEW_GAME_TEXT,0);
186,9 → 186,9
//êíîïî÷êa âûáîðà óðîâíÿ ñëîæíîñòè
DefineButton(95,PANEL_Y+7, 20,20, 10,sc.work_button);
WriteText(95+8,PANEL_Y+14,0x80,sc.work_button_text,BOARD_SIZES[DIFFICULTY_LEVEL],0);
 
draw_field();
 
draw_clicks_num();
}
 
203,15 → 203,15
for (j=0;j<BLOCKS_NUM;j++)
{
button_id=blocks_matrix[i*BLOCKS_NUM+j];
 
if (button_id==DELETED_BLOCK) continue;
 
if (j>0) && (blocks_matrix[i*BLOCKS_NUM+j-1]==button_id) return 0;
if (i>0) && (blocks_matrix[i-1*BLOCKS_NUM+j]==button_id) return 0;
if (j<BLOCKS_NUM-1) && (blocks_matrix[i*BLOCKS_NUM+j+1]==button_id) return 0;
if (i<BLOCKS_NUM-1) && (blocks_matrix[i+1*BLOCKS_NUM+j]==button_id) return 0;
}
return 2;
return 2;
}
 
 
223,10 → 223,10
int TEXT_X=TEXT_Y/2+48; //130;
 
BLOCKS_LEFT=0;
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++)
if (blocks_matrix[i]<>DELETED_BLOCK) BLOCKS_LEFT++;
 
for (i=0;i<BLOCKS_NUM*BLOCKS_NUM;i++)
if (blocks_matrix[i]<>DELETED_BLOCK) BLOCKS_LEFT++;
 
DrawBar(TEXT_X, TEXT_Y, 18,9, sc.work);
WriteText(TEXT_X,TEXT_Y,0x80,sc.work_text,IntToStr(BLOCKS_LEFT),0);
 
256,7 → 256,7
{
int i, j;
int current_id;
 
for (i=0;i<BLOCKS_NUM;i++)
for (j=0;j<BLOCKS_NUM;j++)
{
284,4 → 284,4
WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,sc.work_text,text,0);
}
 
stop:
stop:
/programs/games/clicks/trunk/compile_eng.bat
5,4 → 5,4
rename clicks.com clicks
del warning.txt
del lang.h--
pause
pause
/programs/games/gomoku/trunk/makefile
0,0 → 1,20
#Makefile per la compilazione
 
#Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=gomoku
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
en:
echo "lang fix en" > lang.inc
${FASM} ${SOURCE} ${OUT}
 
ru:
echo "lang fix ru" > lang.inc
${FASM} ${SOURCE} ${OUT}
 
clean:
rm -f ${OUT} ${LANG}
/programs/games/megamaze/trunk/build.bat
2,4 → 2,4
@fasm -m 16384 megamaze.asm megamaze
@erase lang.inc
@kpack megamaze
@pause
@pause
/programs/other/kpack/linux/build.sh
2,10 → 2,10
# This script does for linux the same as build.bat for DOS,
# it compiles the KoOS kernel, hopefully ;-)
 
fasm -m 16384 kpack.asm kpack.o
gcc -s -nostdlib kpack.o -o kpack -lc
strip -R .comment -R .gnu.version kpack
exit 0
fasm -m 16384 kpack.asm kpack.o
gcc -s -nostdlib kpack.o -o kpack -lc
strip -R .comment -R .gnu.version kpack
exit 0
 
 
 
/programs/other/kpack/linux/kpack.asm
909,4 → 909,4
program_arguments db 512 dup (?)
 
include 'data.inc'
;*********************************************************************
;*********************************************************************
/programs/system/calendar/trunk/calendar.txt
10,16 → 10,16
Today I let you to judge a desktop calendar, similar to the Windows one.
Application abilities are:
 
1. Interface is translated into Russian,English, German, French, and Finnish
(not completely - there was no help). Day sequence difference is taken
into account as well. You may change localization through 'lang' constant
while compiling.
1. Interface is translated into Russian,English, German, French, Italian
and Finnish (not completely - there was no help). Day sequence
difference is taken into account as well. You may change localization
through 'lang' constant while compiling.
2. Calendar is equipped with additional buttons 'Today' and 'New style' that
are self-explaining.
are self-explaining.
3. I tied to follow world GUI standards: use TAB to move along fields; while
editing the year, use Backspace and Del, as well as left and right arrows
of 'spinner' when in its focus. Arrow keys navigate along day matrix.
Pressing Ctrl-F1...Ctrl-F12 selects appropriate month.
editing the year, use Backspace and Del, as well as left and right arrows
of 'spinner' when in its focus. Arrow keys navigate along day matrix.
Pressing Ctrl-F1...Ctrl-F12 selects appropriate month.
 
To-Do list:
 
72,4 → 72,4
 
â㠯ணࠬ¬ã ï ¯®á¢ïé î ãªà ¨­áª®© ¯®¬ à ­ç¥¢®© ॢ®«î樨.
 
 §®¬ ­ á ¡ £ â®, ­ á ­¥ ¯®¤®« â¨!
 §®¬ ­ á ¡ £ â®, ­ á ­¥ ¯®¤®« â¨!
/programs/system/cd_tray/CD_tray.ASM
16,6 → 16,7
dd 0x0 ; çàðåçåðâèðîâàíî
 
include 'MACROS.INC' ; ìàêðîñû îáëåã÷àþò æèçíü àññåìáëåðùèêîâ!
include 'lang.inc'
 
;---------------------------------------------------------------------
;--- ÍÀ×ÀËÎ ÏÐÎÃÐÀÌÌÛ ----------------------------------------------
87,7 → 88,11
; 1 - íà÷èíàåì ðèñîâàòü
; ÑÎÇÄÀèÌ ÎÊÍÎ
 
mcall 0, <100,230>, <100,110>, 0x03AABBCC, 0x805080D0, 0x005080D0
if lang eq it
mcall 0, <100,250>, <100,110>, 0x03AABBCC, 0x805080D0, 0x005080D0
else
mcall 0, <100,230>, <100,110>, 0x03AABBCC, 0x805080D0, 0x005080D0
end if
mcall 71, 1 ,header
mcall 8,<15,42>,<40,20>,2,0xaaaaaa
call draw_buttons
95,10 → 100,14
add ecx,30 shl 16
mcall
call draw_buttons
mcall 4, <25,25>, 0x80ffffff,text1
 
if lang eq it
mcall 4, <16,25>, 0x80ffffff,text1
else
mcall 4, <25,25>, 0x80ffffff,text1
end if
mov edx,text2
 
add ebx,3 shl 16+20
mcall
mov edx,text3
105,7 → 114,7
add ebx,30
sub ebx,3 shl 16
mcall
 
mcall 12, 2 ; ôóíêöèÿ 12: ñîîáùèòü ÎÑ îá îòðèñîâêå îêíà
; 2, çàêîí÷èëè ðèñîâàòü
 
113,15 → 122,27
 
draw_buttons:
pusha
add ebx,50 shl 16
if lang eq it
add ebx,60 shl 16
else
add ebx,50 shl 16
end if
inc edx
mcall
add ebx,50 shl 16
mcall
if lang eq it
add ebx,60 shl 16
else
add ebx,50 shl 16
end if
inc edx
mcall
add ebx,50 shl 16
mcall
if lang eq it
add ebx,60 shl 16
else
add ebx,50 shl 16
end if
inc edx
mcall
mcall
popa
ret
;---------------------------------------------------------------------
128,9 → 149,16
;--- ÄÀÍÍÛÅ ÏÐÎÃÐÀÌÌÛ ----------------------------------------------
;---------------------------------------------------------------------
header db ' ATAPI Device Tray Control',0
text3 db 'eject eject eject eject',0
text2 db 'load load load load',0
text1 db '/cd0/ /cd1/ /cd2/ /cd3/',0
if lang eq it
text3 db 'espelli espelli espelli espelli',0
text2 db 'carica carica carica carica',0
text1 db '/cd0/ /cd1/ /cd2/ /cd3/',0
else
text3 db 'eject eject eject eject',0
text2 db 'load load load load',0
text1 db '/cd0/ /cd1/ /cd2/ /cd3/',0
end if
 
;---------------------------------------------------------------------
 
I_END: ; ìåòêà êîíöà ïðîãðàììû
/programs/system/cd_tray/makefile
0,0 → 1,19
#!gmake
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=CD_tray
SOURCE=${FILE}.ASM
OUT=${FILE}.bin
 
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
it:
echo "lang fix it" > ${LANG}
${FASM} ${SOURCE} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}
/programs/system/clip/trunk/cliptest.ASM
7,7 → 7,7
 
; <--- include all MeOS stuff --->
include "lang.inc"
include "..\..\..\MACROS.INC"
include "..\..\..\macros.inc"
 
TEST_SIZE = 100000 ; ¤®«¦­® ¤¥«¨âìáï ­  4
 
113,11 → 113,11
; ¯®á«¥¤­ïï ¯à®¢¥àª  - ­  à¥á ©§ ¡ãä¥à .   ¨¬¥­­®, ¢®§ì¬¥¬ ¬­®£® ¤ ­­ëå
; ¨ ¯à®ª ç ¥¬ ¨å ç¥à¥§ ¡ãä¥à
 
mov eax, 68
mov eax, 68
mov ebx, 11
int 0x40
 
mov eax, 68
mov eax, 68
mov ebx, 12
mov ecx, TEST_SIZE + 12
int 0x40
154,7 → 154,7
mov edx, [mega_buf]
add edx, 12
xor eax, eax
mov ecx, TEST_SIZE/4
mov ecx, TEST_SIZE/4
.loopc:
mov [edx], eax
add edx, 4
162,7 → 162,7
jnz .loopc
 
; now read
 
mov eax, 69
mov esi, [mega_buf]
mov edx, 7
208,7 → 208,7
jz .reading
jmp .err
 
.reading:
.reading:
 
print "test complete!"
 
237,4 → 237,4
 
 
MEOS_APP_END
; <--- end of MenuetOS application --->
; <--- end of MenuetOS application --->
/programs/system/clip/trunk/makefile
0,0 → 1,17
#!gmake
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
 
en:
echo "lang fix ru" > ${LANG}
${FASM} \@clip.ASM \@clip
${FASM} cliptest.ASM cliptest
${FASM} test2.asm test2
${KPACK} \@clip
 
clean:
rm -f ${LANG} \@clip test2 cliptest
 
/programs/system/clip/trunk/test2.asm
8,7 → 8,7
 
; <--- include all MeOS stuff --->
include "lang.inc"
include "..\..\..\MACROS.INC"
include "..\..\..\macros.inc"
 
; <--- start of MenuetOS application --->
MEOS_APP_START
70,7 → 70,7
call draw_window
jmp wait_event
no_digit:
 
mov edi, input_box
call edit_box.key
 
109,7 → 109,7
movzx eax, byte [format_id]
mov edx, 7
call clipboard_read
 
or eax, eax
jz wait_event
 
236,7 → 236,7
 
mov eax, 12 ; finish drawing
mov ebx, 2
int 0x40
int 0x40
 
ret
 
269,4 → 269,4
 
 
MEOS_APP_END
; <--- end of MenuetOS application --->
; <--- end of MenuetOS application --->
/programs/system/colrdial/color_dialog.asm
41,7 → 41,7
; window X size ; +4
; dw 0
;
; window X position ; +6
; window X position ; +6
; dw 0
;
; window y size ; +8
143,7 → 143,7
mov [palette_area],eax
;--------------------------------------
call create_palette
;--------------------------------------
;--------------------------------------
mov ecx,[tone_SIZE_Y]
imul ecx,[tone_SIZE_X]
lea ecx,[ecx*3]
169,10 → 169,10
 
cmp eax,3
je button
 
cmp eax,6
je mouse
 
jmp still
;---------------------------------------------------------------------
align 4
181,19 → 181,19
 
cmp ah, 2
je palette_button
 
cmp ah, 3
je tone_button
 
cmp ah, 4
je color_button
 
cmp ah, 30
jb @f
 
cmp ah, 39
ja @f
 
sub ah,30
movzx eax,ah
shl eax,2
292,7 → 292,7
mov ecx,[ebx+30] ; PID
mcall 18,21
mov [active_process],eax ; WINDOW SLOT
mov ebx,[communication_area]
mov ebx,[communication_area]
test ebx,ebx
jz .1
mov [ebx+12],eax ; WINDOW SLOT to com. area
402,7 → 402,7
mov eax,[scroll_bar_data_blue.position]
mov bl,al
ret
;---------------------------------------------------------------------
;---------------------------------------------------------------------
align 4
key:
mcall 2
415,7 → 415,7
cmp [scroll_bar_data_green.delta2],0
jne .green
cmp [scroll_bar_data_blue.delta2],0
jne .blue
jne .blue
;--------------------------------------
align 4
.red:
482,7 → 482,7
mov [frame_data.y],dword (p_start_y+5)*65536+(p_size_y-5)
 
mov [frame_data.draw_text_flag],dword 1
 
mov [frame_data.text_pointer],dword history_text
push dword frame_data
call [Frame_draw]
516,7 → 516,7
add esi,28
;-----------------------------------
align 4
@@:
@@:
mcall
pusha
mov edx,ebx
528,7 → 528,7
and ecx,0xffffff
mcall 47,0x00060100,,,0
popa
 
add ecx,24*65536
add esi,4
dec edi
558,9 → 558,9
add bx,4
sub ecx,2 shl 16
add cx,4
 
mov [frame_data.x],ebx
mov [frame_data.y],ecx
mov [frame_data.y],ecx
 
push dword frame_data
call [Frame_draw]
569,7 → 569,7
 
add ecx,24*65536
add esi,4
 
dec edi
jnz newcol
 
612,4 → 612,4
include 'u_data.inc'
;---------------------------------------------------------------------
I_END:
;---------------------------------------------------------------------
;---------------------------------------------------------------------
/programs/system/colrdial/makefile
0,0 → 1,16
#!gmake
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=color_dialog
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
en:
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}
/programs/system/commouse/trunk/makefile
0,0 → 1,16
#!gmake
 
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=commouse
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
en:
${FASM} ${SOURCE} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}
/programs/system/cpu/trunk/cpu.asm
66,33 → 66,33
;get screen size
mcall 14
mov ebx,eax
;calculate (x_screen-window_x_size)/2
;calculate (x_screen-window_x_size)/2
shr ebx,16+1
sub ebx,window_x_size/2
shl ebx,16
mov bx,window_x_size
;winxpos=xcoord*65536+xsize
;winxpos=xcoord*65536+xsize
mov [winxpos],ebx
;calculate (y_screen-window_y_size)/2
;calculate (y_screen-window_y_size)/2
and eax,0xffff
shr eax,1
sub eax,window_y_size/2
shl eax,16
mov ax,window_y_size
;winypos=ycoord*65536+ysize
;winypos=ycoord*65536+ysize
mov [winypos],eax
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
init_checkboxes2 check1,check1_end
mcall 48,3,sc,40
edit_boxes_set_sys_color edit1,edit1_end,sc ;set color
check_boxes_set_sys_color2 check1,check1_end,sc ;set color
;------------------------------------------------------------------------------
align 4
;main loop when process name isn't edited.
red:
align 4
;main loop when process name isn't edited.
red:
call draw_window ; redraw all window
;------------------------------------------------------------------------------
align 4
align 4
still:
mcall 23,100 ; wait here for event 1 sec.
 
107,22 → 107,22
 
push dword edit1
call [edit_box_mouse]
 
push dword[check1.flags]
 
push dword check1
call [check_box_mouse]
 
pop eax
 
cmp eax, dword[check1.flags]
jz still_end
 
push dword check1
call [check_box_draw]
;--------------------------------------
align 4
show_process_info_1:
align 4
show_process_info_1:
mcall 26,9
add eax,100
mov [time_counter],eax
130,7 → 130,7
call show_process_info ; draw new state of processes
jmp still
;------------------------------------------------------------------------------
align 4
align 4
still_end:
mcall 26,9
cmp [time_counter],eax
142,7 → 142,7
call show_process_info ; draw new state of processes
jmp still
;------------------------------------------------------------------------------
align 4
align 4
key: ; key
mcall 2
 
160,7 → 160,7
; Check ENTER with ed_focus edit_box
lea edi,[edit1]
test word ed_flags,ed_focus
jz still_end
jz still_end
 
sub ah,13 ; ENTER?
jz program_start ; RUN a program
167,27 → 167,27
 
jmp still
;------------------------------------------------------------------------------
align 4
button:
; get button id
align 4
button:
; get button id
mcall 17
shr eax,8
shr eax,8
;id in [10,50] corresponds to terminate buttons.
cmp eax,10
jb noterm
jb noterm
 
cmp eax,50
jg noterm
;calculate button index
;calculate button index
sub eax,11
;calculate process slot
;calculate process slot
mov ecx,[tasklist+4*eax]
;ignore empty buttons
test ecx,ecx
jle still_end
;terminate application
;terminate application
mcall 18,2
jmp show_process_info_1
jmp show_process_info_1
;--------------------------------------
align 4
noterm:
208,38 → 208,38
jz reboot ;54
 
jmp still_end
;buttons handlers
;buttons handlers
;------------------------------------------------------------------------------
align 4
align 4
pgdn:
sub [list_start],display_processes
jge show_process_info_1
jge show_process_info_1
mov [list_start],0
jmp show_process_info_1
;------------------------------------------------------------------------------
align 4
align 4
pgup:
mov eax,[list_add] ;maximal displayed process slot
mov [list_start],eax
jmp show_process_info_1
;------------------------------------------------------------------------------
align 4
program_start:
align 4
program_start:
mcall 70,file_start
jmp show_process_info_1
;------------------------------------------------------------------------------
align 4
reboot:
align 4
reboot:
mcall 70,sys_reboot
;close program if we going to reboot
;------------------------------------------------------------------------------
align 4
align 4
close:
or eax,-1 ; close this program
mcall
;------------------------------------------------------------------------------
align 4
draw_empty_slot:
align 4
draw_empty_slot:
cmp [draw_window_flag],1
je @f
mov ecx,[curposy]
249,7 → 249,7
add ecx,3 shl 16
mcall 13,<11,95>,,[btn_bacground_color]
pop ecx
 
mcall 13,<111,393>,,[bar_bacground_color]
;--------------------------------------
align 4
256,7 → 256,7
@@:
ret
;------------------------------------------------------------------------------
align 4
align 4
draw_next_process:
;input:
; edi - current slot
280,7 → 280,7
mov edx,[index]
add edx,11
mov esi,0xccddee ; 0xaabbcc
;contrast
;contrast
test dword [index],1
jz .change_color_button
mov esi,0xaabbcc ; 0x8899aa
313,7 → 313,7
@@:
mov [bar_bacground_color],edx
;nothing else should be done
;if there is no process for this button
;if there is no process for this button
cmp edi,-1
jne .return_1
 
325,9 → 325,9
.return_1:
;find process
inc edi
;more comfortable register for next loop
;more comfortable register for next loop
mov ecx,edi
;precacluate pointer to process buffer
;precacluate pointer to process buffer
mov ebx,process_info_buffer
;--------------------------------------
align 4
337,13 → 337,13
;load process information in buffer
mcall 9
;if current slot greater than maximal slot,
;there is no more proccesses.
;there is no more proccesses.
cmp ecx,eax
jg .no_processes
;if slot state is equal to 9, it is empty.
;if slot state is equal to 9, it is empty.
cmp [process_info_buffer+process_information.slot_state],9
jnz .process_found
 
inc ecx
jmp .find_loop
;--------------------------------------
363,7 → 363,7
jnz @f
 
cmp dword [process_info_buffer+10],'ICON'
jz .return_1
jz .return_1
 
cmp dword [process_info_buffer+10],'OS/I'
jz .return_1
375,7 → 375,7
@@:
mov edi,ecx
mov [list_add],ecx
;get processor cpeed
;get processor cpeed
;for percent calculating
mcall 18,5
xor edx,edx
386,12 → 386,12
mov ebx,eax
mov eax,[process_info_buffer+process_information.cpu_usage]
; cdq
xor edx,edx ; for CPU more 2 GHz - mike.dld
xor edx,edx ; for CPU more 2 GHz - mike.dld
div ebx
mov [cpu_percent],eax
;set text color to display process information
;([tcolor] variable)
;0% : black
;0% : black
;1-80% : green
;81-100% : red
test eax,eax
401,7 → 401,7
jmp .color_set
;--------------------------------------
align 4
.no_black:
.no_black:
cmp eax,80
ja .no_green
 
415,7 → 415,7
align 4
.color_set:
;show slot number
;ecx haven't changed since .process_found
;ecx haven't changed since .process_found
push edi
mov edx,[curposy]
add edx,15*65536+3
459,7 → 459,7
shl ecx,16
add ecx,[process_info_buffer.box.top]
add edx,60*65536
mcall
mcall
pop edi
;--------------------------------------
align 4
466,12 → 466,12
.ret:
;build index->slot map for terminating processes.
mov eax,[index]
mov [tasklist+4*eax],edi
mov [tasklist+4*eax],edi
ret
;------------------------------------------------------------------------------
align 4
align 4
f11:
;full update
;full update
push edi
call draw_window
pop edi
479,9 → 479,9
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
align 4
align 4
draw_window:
mcall 12, 1
mcall 12, 1
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
xor esi,esi
488,7 → 488,7
mcall ,[winxpos],[winypos],0x74ffffff,,title ;0x34ddffdd
 
mcall 9,process_info_buffer,-1
 
mov eax,[ebx+70]
mov [window_status],eax
test [window_status],100b ; window is rolled up
511,12 → 511,12
mcall 4,<17,8>,,text,text_len
 
mcall 13,<0,10>,<20,336>,0xffffff
 
mov ebx,[client_area_x_size]
sub ebx,10+100+395
add ebx,(10+100+395) shl 16
mcall
 
mcall 26,9
add eax,100
mov [time_counter],eax
524,7 → 524,7
mov [draw_window_flag],1
call show_process_info
mov [draw_window_flag],0
 
mov ebx,[client_area_x_size]
mov ecx,[client_area_y_size]
sub ecx,20+336
536,7 → 536,7
 
push dword check1
call [check_box_draw]
 
; previous page button
mcall 8,<25,96>,<361,14>,51,0xccddee ;0xaabbcc
; next page button 52
547,8 → 547,8
; run button 53
inc edx
mcall ,<456,50>
; reboot button
sub ebx,120*65536
; reboot button
sub ebx,120*65536
add ebx,60
sub ecx,20 shl 16
inc edx
601,8 → 601,8
head_f_l db 'System error',0
err_message_import db 'Error on load import library box_lib.obj',0
;------------------------------------------------------------------------------
align 4
myimport:
align 4
myimport:
edit_box_draw dd aEdit_box_draw
edit_box_key dd aEdit_box_key
edit_box_mouse dd aEdit_box_mouse
634,7 → 634,7
;aOption_box_mouse db 'option_box_mouse',0
;aVersion_op db 'version_op',0
;------------------------------------------------------------------------------
align 4
align 4
check1 check_box2 (10 shl 16)+11,(383 shl 16)+11,6, 0x80AABBCC,0,0,check_text, ch_flag_bottom ;ch_flag_en
check1_end:
edit1 edit_box 350,95,381,0xffffff,0x6f9480,0,0xAABBCC,0,start_application_c,\
642,7 → 642,7
edit1_end:
list_start dd 0
;------------------------------------------------------------------------------
align 4
align 4
sys_reboot:
dd 7
dd 0
690,6 → 690,19
check_text db '@ ¢ª«/¢ëª«',0
title db '„¨á¯¥âç¥à ¯à®æ¥áᮢ - Ctrl/Alt/Del',0
;--------------------------------------
else if lang eq it
text:
db 'NOME-PROGRAMMA PID USO CPU % '
db 'MEMORY START/USAGE W-STACK W-POS'
text_len = $-text
 
tbts: db 'INDIETRO AVANTI RIAVVIA SISTEMA'
tbte:
tbts_3 db 'START'
tbte_2:
check_text db '@ on/off',0
title db 'Gestore processi - Ctrl/Alt/Del',0
;--------------------------------------
else
text:
db 'NAME/TERMINATE PID CPU-USAGE % '
705,7 → 718,7
 
end if
;------------------------------------------------------------------------------
align 4
align 4
file_start:
dd 7
dd 0
720,7 → 733,7
;------------------------------------------------------------------------------
IM_END:
;------------------------------------------------------------------------------
align 4
align 4
sc system_colors
winxpos rd 1
winypos rd 1
740,15 → 753,15
btn_bacground_color rd 1
draw_window_flag rd 1
;------------------------------------------------------------------------------
align 4
align 4
library_path:
process_info_buffer process_information
;------------------------------------------------------------------------------
align 4
align 4
cur_dir_path:
rb 1024
;------------------------------------------------------------------------------
align 4
align 4
rb 1024
stack_area:
;------------------------------------------------------------------------------
/programs/system/cpu/trunk/makefile
0,0 → 1,32
#!gmake
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=cpu
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
ru:
echo "lang fix ru" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
et:
echo "lang fix et" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
ge:
echo "lang fix ge" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
it:
echo "lang fix it" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
clean:
rm -f ${LANG} ${OUT}
/programs/system/cpuid/trunk/CPUID.ASM
28,6 → 28,8
dd 0x0
dd 0x0
 
include 'lang.inc' ; language support
 
include '..\..\..\macros.inc' ; useful macroses
include 'draw.inc'
include 'brand.inc' ;Brand ID decoding
197,7 → 199,7
 
maybe_athlon:
mov eax, 0x80000001 ; CPUID ext. function 0x80000001
cpuid
cpuid
mov ecx, eax
shr ecx,8 ; shift it to the correct position
and ecx,0000000Fh ; get CPU family
239,15 → 241,15
mov [myname+44],edx
 
.noname:
red:
red:
 
;mov byte [multiplier], 115; ; for testing
 
call multipl ; get multiplier
call multipl ; get multiplier
mov byte [multiplier], cl
 
mov dword [freqbb], 0
mov dword [freqll], 0
mov dword [freqll], 0
 
mov ebx, dword [multiplier]
test ebx, ebx
467,7 → 469,7
A6:
mov [FRS], 266 ;!!!!!!
 
Number 315,90,0,3,dword [FRS],0x000000; MHz
Number 315,90,0,3,dword [FRS],0x000000; MHz
 
call newrating; !!!!
 
502,7 → 504,7
mov [FRS], 333; !!!!
Text 245,70,0x00000000,pr, prlen-pr
 
Number 315,90,0,3,dword [FRS],0x000000; MHz
Number 315,90,0,3,dword [FRS],0x000000; MHz
 
mov edx, Atat
cmp [L2], 256
523,7 → 525,7
;AMD AthlonTM 64 and AMD OpteronTM Processors" 25759.pdf
 
; checking sse3 for new AMD's is needed
cmp [m],$1 ; Dual-core Opteron
cmp [m],$1 ; Dual-core Opteron
jz .AF1
cmp [m],$3 ; Toledo 1024 0.09 // Manchester ||Windsor Dual Core not supported
jz .AF3
1377,25 → 1379,25
mov ebx,50 ; æäåìñ 0.5 ñåê
mcall
 
cmp eax,1 ;
cmp eax,1 ;
je red ; redraw
cmp eax,2 ;
cmp eax,2 ;
je key ; key
cmp eax,3 ;
cmp eax,3 ;
je button ; button
jmp still ;
key: ;
mcall ;
jmp still ;
button: ;
mov eax,17 ;
mcall ;
jmp still ;
key: ;
mcall ;
jmp still ;
button: ;
mov eax,17 ;
mcall ;
cmp ah,1 ; = 1 ?
je close ; close
 
cmp ah,2 ; = 2 ?
je thread_start ;
;
je thread_start ;
;
cmp ah,3 ; = 3 ?
jne still
 
1403,7 → 1405,7
 
Number 310,70,0,4,dword [rating],0xFFFFFF ;
 
Number 315,90,0,3,dword [FRS]; MHz
Number 315,90,0,3,dword [FRS]; MHz
 
cmp [FRS], 266
jz .s1
1418,7 → 1420,7
call newrating
Number 310,70,0,4,dword [rating],0x000000
 
Number 315,90,0,3,dword [FRS]; MHz
Number 315,90,0,3,dword [FRS]; MHz
jmp still
 
.s2:
1430,15 → 1432,15
jmp .rating
 
close:
mov eax,-1
mcall
mov eax,-1
mcall
 
;**************************** THREAD-SECOND WINDOW
thread_start:
 
cmp [num_win2],0
cmp [num_win2],0
 
jne still
jne still
 
;================================================RSA test
 
1468,37 → 1470,37
jmp still
 
window_2:
mov [num_win2],1
call draw_window_2
mov [num_win2],1
call draw_window_2
 
still_2:
still_2:
 
mov eax,10
mcall
mov eax,10
mcall
 
cmp eax,1
cmp eax,1
je window_2 ; window_2
cmp eax,2 ;
cmp eax,2 ;
je key_2 ; key_2
cmp eax,3 ;
cmp eax,3 ;
je button_2 ; button_2
 
jmp still_2 ;
jmp still_2 ;
 
key_2: ;
mcall ;
jmp still_2 ;
key_2: ;
mcall ;
jmp still_2 ;
 
button_2: ;
mov eax,17 ; 17
mcall ;
button_2: ;
mov eax,17 ; 17
mcall ;
 
cmp ah,1 ; = 1 ?
jne still_2 ; noclose
 
mov [num_win2],0 ;
mov [num_win2],0 ;
 
or eax,-1 ;
or eax,-1 ;
mcall
 
draw_window_2:
1661,10 → 1663,10
cont:
 
 
Text 15,50,0x00000000,tsum, tsumlen-tsum ;
Text 15,90,,cpuname, cpunamelen-cpuname;
Text 15,50,0x00000000,tsum, tsumlen-tsum ;
Text 15,90,,cpuname, cpunamelen-cpuname;
Text 255,250,,typen, typenlen-typen;
Text 175, 50,,tech, techlen-tech;
Text 175, 50,,tech, techlen-tech;
 
Number 82,50,0,4,dword [total],0x000000; MHz
Number 110,50,0,2,dword [sot]; KHz
1674,7 → 1676,7
Text 15,230,,cache4, cache4len-cache4
 
 
Number 75,110,1*256,1,dword [f],0x000000 ;
Number 75,110,1*256,1,dword [f],0x000000 ;
Number 75,130,,,dword [m]
Number 75,150,,,dword [s]
 
1710,7 → 1712,7
;-
Text 15,250,,brandid, brandidlen-brandid
 
ret ;
ret ;
 
load_gif:
mov edi, img_area
1724,7 → 1726,13
title db 'CPUID 2.21 by S.Kuzmin & the KolibriOS team',0
 
tsum:
db 'Frequency: . MHz'
if lang eq it
db 'Frequenza: . MHz'
else
db 'Frequency: . MHz'
end if
 
 
tsumlen:
 
total dd 0x0
1733,7 → 1741,13
rat dd 0x0 ;
 
ram:
db 'Available RAM: out of'
if lang eq it
db 'RAM libera: su'
else
db 'Available RAM: out of'
end if
 
 
ramlen:
 
NEF:
1749,7 → 1763,13
;logcpuslen:
 
speed :
db 'PERFORMANCE:'
if lang eq it
db 'Performance'
else
db 'PERFORMANCE:'
end if
 
 
speedlen:
 
kbpersec:
1757,7 → 1777,13
kbperseclen:
 
instruct:
db 'Instruction sets'
if lang eq it
db 'Set istruzioni'
else
db 'Instruction sets'
end if
 
 
instructlen:
 
standard db 'Standard and Extended features plus Performance test',0
1779,23 → 1805,54
brandidlen:
 
oblom:
db 'SORRY, CPUID IS NOT AVAILABLE'
if lang eq it
db 'CPUID non e disponibile'
else
db 'SORRY, CPUID IS NOT AVAILABLE'
end if
 
oblomlen:
other:
db 'SORRY, THIS VENDOR IS NOT SUPPORTED YET'
if lang eq it
db 'Questo vendor non e supportato'
else
db 'SORRY, THIS VENDOR IS NOT SUPPORTED YET'
end if
 
otherlen:
 
cpuname:
db 'CPU VENDOR: '
if lang eq it
db 'Vendor CPU '
else
db 'CPU VENDOR: '
end if
 
cpunamelen:
fam:
db 'FAMILY: std ext'
if lang eq it
db 'Famiglia: std ext'
else
db 'FAMILY: std ext'
end if
 
 
famlen:
mode:
db 'MODEL: std ext'
if lang eq it
db 'Modello: std ext'
else
db 'MODEL: std ext'
end if
 
modelen:
step:
db 'STEPPING:'
if lang eq it
db 'Stepping:'
else
db 'STEPPING:'
end if
 
steplen:
 
cache2:
1822,11 → 1879,22
cacheP4len:
 
tech:
db 'Technology: 0. micron '
if lang eq it
db 'Tecnologia: 0. micron '
else
db 'Technology: 0. micron '
end if
 
 
techlen:
 
typen:
db 'Type:'
if lang eq it
db 'Tipo:'
else
db 'Type:'
end if
 
typenlen:
 
pr:
1842,7 → 1910,12
freqllen:
 
name:
db 'CODENAME:'
if lang eq it
db 'Codename:'
else
db 'CODENAME:'
end if
 
namelen:
 
AMDn:
2110,7 → 2183,12
NGlen:
 
stm:
db 'Internal name:'
if lang eq it
db 'Nome: '
else
db 'Internal name:'
end if
 
stmlen:
 
athloncoef db 110, 115, 120, 125, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 120
/programs/system/cpuid/trunk/makefile
0,0 → 1,23
#!gmake
 
 
###########################
### Esempio per Kolibri ###
###########################
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=CPUID
SOURCE=${FILE}.ASM
OUT=${FILE}.bin
 
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
it:
echo "lang fix it" > ${LANG}
${FASM} ${SOURCE} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}
/programs/system/cropflat/makefile
0,0 → 1,16
#!gmake
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=cropflat
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
en:
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}
/programs/system/desktop/trunk/idata.inc
76,6 → 76,8
title db '€‘’Ž‰Š€ ŽŠŽ',0
else if lang eq et
title db 'AKNA SEADED - VALI VÄRV JA VAJUTA OBJEKTILE',0
else if lang eq it
title db 'Impostazioni - definire il colore e cliccare lo oggetto',0
else
title db 'WINDOWS SETTINGS - DEFINE COLOR AND CLICK ON TARGET',0
end if
122,7 → 124,7
;aOpenDialog_Version db 'Version_OpenDialog',0
;---------------------------------------------------------------------
align 4
Box_lib_import:
Box_lib_import:
;init_lib dd a_init
;version_lib dd a_version
 
339,7 → 341,7
colordialog_path:
db '/rd/1/colrdial',0
;---------------------------------------------------------------------
frame_data:
frame_data:
.type dd 0 ;+0
.x:
.x_size dw 0 ;+4
357,4 → 359,4
.font_color dd 0x0 ;+40
.font_backgr_color dd 0xffffff ;+44
;---------------------------------------------------------------------
IncludeIGlobals
IncludeIGlobals
/programs/system/desktop/trunk/makefile
0,0 → 1,28
#!gmake
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=desktop
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
et:
echo "lang fix et" > ${LANG}
${FASM} ${SOURCE} ${OUT}
ru:
echo "lang fix ru" > ${LANG}
${FASM} ${SOURCE} ${OUT}
sp:
echo "lang fix sp" > ${LANG}
${FASM} ${SOURCE} ${OUT}
it:
echo "lang fix it" > ${LANG}
${FASM} ${SOURCE} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}
/programs/system/docpack/trunk/makefile
0,0 → 1,17
#!gmake
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=docpack
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
ru:
echo "lang fix ru" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}
/programs/system/end/light/end.asm
160,6 → 160,14
label4:
db 'Save your settings (Ctrl-S)',0
 
else if lang eq it
label2:
db ' Spegni Kernel',0
label3:
db ' Riavvio Annulla',0
label4:
db 'Salva impostazioni (Ctrl-S)',0
 
else
label2:
db 'Power off Kernel',0
/programs/system/end/light/makefile
0,0 → 1,29
#!gmake
 
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=end
SOURCE=${FILE}.asm
OUT=${FILE}.bin
 
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
ge:
echo "lang fix ge" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
ru:
echo "lang fix ru" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
it:
echo "lang fix it" > ${LANG}
${FASM} ${SOURCE} ${OUT}
${KPACK} ${OUT}
 
clean:
rm -f ${LANG} ${OUT}