italian version

git-svn-id: svn://kolibrios.org@3628 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
fedesco 2013-06-09 06:40:31 +00:00
parent f272bbb588
commit d836699ddd
13 changed files with 360 additions and 169 deletions

View File

@ -19,6 +19,8 @@ use32
dd 0x0 dd 0x0
dd app_path dd app_path
include 'lang.inc' ;language support
include 'ASPAPI.INC' include 'ASPAPI.INC'
include 'string.inc' include 'string.inc'
include 'macros.inc' include 'macros.inc'
@ -896,7 +898,11 @@ RunProgram:
clc clc
ret ret
.err_out: .err_out:
print "Can't load program" if lang eq it
print "Impossibile caricare il programma"
else
print "Can't load program"
end if
popa popa
stc stc
ret ret
@ -912,7 +918,11 @@ mykey_window dd 0 ; Slot number of MyKey
;########### Input Thread data start ############ ;########### Input Thread data start ############
; Input Thread Title ; Input Thread Title
it_labelt db "Input hotkey and it's name" if lang eq it
it_labelt db "Inserisci hotkey e nome "
else
it_labelt db "Input hotkey and it's name"
end if
;labellen: ;labellen:
it_edit edit_box 180, 20, 30, 0xffffff, 0xAA80, 0x0000ff, 0x0, 0x0, 31, it_buf_cmd_line, 0, 0 it_edit edit_box 180, 20, 30, 0xffffff, 0xAA80, 0x0000ff, 0x0, 0x0, 31, it_buf_cmd_line, 0, 0
it_buf_cmd_line dd 0 ;db MAX_HOTKEYS_NUM*32 dup(0) ; !Make it dynamic!!! it_buf_cmd_line dd 0 ;db MAX_HOTKEYS_NUM*32 dup(0) ; !Make it dynamic!!!
@ -920,16 +930,27 @@ it_window dd 0 ; Slot number of the input thread
it_alive db 0 ; Flag of the input thread existance it_alive db 0 ; Flag of the input thread existance
it_keycode db 0 it_keycode db 0
it_hotkey_addr dd 0 it_hotkey_addr dd 0
it_hint db 'or press Esc to cancel',0 if lang eq it
it_hint db 'o premi Esc per cancellare',0
else
it_hint db 'or press Esc to cancel',0
end if
;########### Input Thread data end ############ ;########### Input Thread data end ############
;Button names ;Button names
AddKeyText db 'Add',0 if lang eq it
ReloadKeyText db 'Reload',0 AddKeyText db 'Aggiungi',0
SaveKeyText db 'Save',0 ReloadKeyText db 'Ricarica',0
;DeleteKeyText db 'Delete',0 SaveKeyText db 'Salva',0
;ManageKeyText db 'Manage',0 ;DeleteKeyText db 'Delete',0
;ManageKeyText db 'Manage',0
else
AddKeyText db 'Add',0
ReloadKeyText db 'Reload',0
SaveKeyText db 'Save',0
;DeleteKeyText db 'Delete',0
;ManageKeyText db 'Manage',0
end if
hotkeys_num db 0;15 hotkeys_num db 0;15
;keyboard_mode db 0 ; Scan or ASCII keys to send ? 0 - ASCII , 1 - Scan ;keyboard_mode db 0 ; Scan or ASCII keys to send ? 0 - ASCII , 1 - Scan
@ -947,11 +968,17 @@ sys_path:
system_dir0 db '/sys/lib/' system_dir0 db '/sys/lib/'
boxlib_name db 'box_lib.obj',0 boxlib_name db 'box_lib.obj',0
err_message_found_lib db "Can't find box_lib.obj",0 if lang eq it
head_f_i: err_message_found_lib db "Non trovo box_lib.obj",0
head_f_l db 'System error',0 head_f_i:
err_message_import db 'Error on import box_lib.obj',0 head_f_l db 'Errore di sistema',0
err_message_import db 'Error di importazione di box_lib.obj',0
else
err_message_found_lib db "Can't find box_lib.obj",0
head_f_i:
head_f_l db 'System error',0
err_message_import db 'Error on import box_lib.obj',0
end if
align 4 align 4
myimport: myimport:
edit_box_draw dd aEdit_box_draw edit_box_draw dd aEdit_box_draw

View File

@ -0,0 +1,19 @@
#!gmake
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=MyKey
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}

View File

@ -27,7 +27,12 @@ keycode_name=LCtrl + g
path=games/mine path=games/mine
param= param=
[hotkey4] [hotkey4]
name=Games directory if lang eq it
name=Cartella giochi
else
name=Games directory
end if
keycode=8226 keycode=8226
keycode_name=RAlt + g keycode_name=RAlt + g
path=file managers/eolite path=file managers/eolite
@ -39,7 +44,11 @@ keycode_name=RShift + LCtrl + ?
path=file managers/kfm path=file managers/kfm
param= param=
[hotkey6] [hotkey6]
name=System Message Board if lang eq it
name=Messaggi di sistema
else
name=System Message Board
end if
keycode=4127 keycode=4127
keycode_name=LAlt + s keycode_name=LAlt + s
path=develop/board path=develop/board

View File

@ -18,6 +18,7 @@ include '../../develop/libraries/box_lib/load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/box_lib/trunk/box_lib.mac'
;include 'mem.inc' ;include 'mem.inc'
;include 'dll.inc' ;include 'dll.inc'
include 'lang.inc'
@use_library ;_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load @use_library ;_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
@ -165,10 +166,15 @@ ch3 check_box2 (5 shl 16)+15,(29 shl 16)+10,5, 0xffffff,0x8000,0xff,\
txt_158,0+ch_flag_middle txt_158,0+ch_flag_middle
check_boxes_end: check_boxes_end:
txt_160 db 'Num',0 if lang eq it
txt_159 db 'Caps',0 txt_160 db 'Bloc Num',0
txt_158 db 'Scroll',0 txt_159 db 'Bloc Maiusc',0
txt_158 db 'Bloc Scorr',0
else
txt_160 db 'Num',0
txt_159 db 'Caps',0
txt_158 db 'Scroll',0
end if
head_f_i: head_f_i:
head_f_l db 'Ñèñòåìíàÿ îøèáêà',0 head_f_l db 'Ñèñòåìíàÿ îøèáêà',0
@ -195,7 +201,7 @@ import_box_lib:
sz_check_box_mouse db 'check_box_mouse2',0 sz_check_box_mouse db 'check_box_mouse2',0
;mouse_dd dd 0x0 ;mouse_dd dd 0x0
sc system_colors sc system_colors
_end: _end:
align 32 align 32

View File

@ -47,6 +47,7 @@ include 'proc32.inc'
include 'macros.inc' include 'macros.inc'
include 'libio.inc' include 'libio.inc'
include '../../../dll.inc' include '../../../dll.inc'
include 'lang.inc'
purge mov purge mov
@ -109,10 +110,10 @@ read_ini_debug: ;; Read debug options
invoke ini.get_option_str, etc_cfg, cfg_debug, cfg_debug, debug_strings, DEBUG_MAX_LEN, DEBUG_DEFAULT invoke ini.get_option_str, etc_cfg, cfg_debug, cfg_debug, debug_strings, DEBUG_MAX_LEN, DEBUG_DEFAULT
invoke ini.get_option_str, path, cfg_debug, cfg_debug, debug_strings, DEBUG_MAX_LEN, eax invoke ini.get_option_str, path, cfg_debug, cfg_debug, debug_strings, DEBUG_MAX_LEN, eax
mov [debug_option], eax mov [debug_option], eax
test eax, eax ;; No console test eax, eax ;; No console
je .ok je .ok
jmp .con_init jmp .con_init
.console_err: .console_err:
@ -134,7 +135,7 @@ read_ini_debug: ;; Read debug options
read_ini_kobra: read_ini_kobra:
invoke ini.get_bool, etc_cfg, cfg_kobra, cfg_use, 0 invoke ini.get_bool, etc_cfg, cfg_kobra, cfg_use, 0
invoke ini.get_bool, path, cfg_kobra, cfg_use, eax invoke ini.get_bool, path, cfg_kobra, cfg_use, eax
mov byte [kobra_use], al mov byte [kobra_use], al
;;-------------------------------------------------------------------------------------------------- ;;--------------------------------------------------------------------------------------------------
@ -265,25 +266,25 @@ exit:
mov al, byte [kobra_use] mov al, byte [kobra_use]
test al, al test al, al
je .close je .close
.register: .register:
mov dword [IPC_area], buff mov dword [IPC_area], buff
call IPC_init call IPC_init
; jnz .close ; jnz .close
mov dword [thread_find_buff], another_buff mov dword [thread_find_buff], another_buff
call kobra_register call kobra_register
test eax, eax test eax, eax
jnz .close jnz .close
;; Prepare message ;; Prepare message
mov dword [kobra_message], KOBRA_MESSAGE_LAUNCH_STATE mov dword [kobra_message], KOBRA_MESSAGE_LAUNCH_STATE
mov eax, dword [tid] mov eax, dword [tid]
mov dword [kobra_message+4], eax mov dword [kobra_message+4], eax
.kobra_send: .kobra_send:
stdcall kobra_send_message, kobra_group_launch_reactive, kobra_message, 8 stdcall kobra_send_message, kobra_group_launch_reactive, kobra_message, 8
@ -345,15 +346,25 @@ window_title:
db APP_NAME, ' ', APP_VERSION, 0 db APP_NAME, ' ', APP_VERSION, 0
;; Messages ;; Messages
message_dbg_not_found: if lang eq it
db '%s not found', 10, 0 message_dbg_not_found:
db '%s non trovato', 10, 0
message_error: message_error:
db 'File (%s) not found!', 0 db 'File (%s) non trovato!', 0
message_ok: message_ok:
db '%s loaded succesfully. PID: %d (0x%X)', 0 db '%s caricato correttamente. PID: %d (0x%X)', 0
else
message_dbg_not_found:
db '%s not found', 10, 0
message_error:
db 'File (%s) not found!', 0
message_ok:
db '%s loaded succesfully. PID: %d (0x%X)', 0
end if
;; Configuration path ;; Configuration path
etc_cfg: etc_cfg:
db '/sys/etc/' db '/sys/etc/'

View File

@ -6,7 +6,6 @@ KPACK=/opt/bin/kpack
LANG=lang.inc LANG=lang.inc
FILE=menu FILE=menu
SOURCE=${FILE}.asm SOURCE=${FILE}.asm
OUT=${FILE}.bin
en: en:
echo "lang fix de" > lang.inc echo "lang fix de" > lang.inc
@ -27,4 +26,4 @@ it:
rm ${LANG} rm ${LANG}
clean: clean:
rm ${LANG} \@menu rm -f ${LANG} \@menu

View File

@ -0,0 +1,19 @@
#!gmake
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=mgb
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}

View File

@ -64,6 +64,7 @@ include '..\..\..\proc32.inc'
;include '..\..\..\debug.inc' ;include '..\..\..\debug.inc'
include '../../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../../develop/libraries/box_lib/load_lib.mac' include '../../../develop/libraries/box_lib/load_lib.mac'
include 'lang.inc' ;language support
@use_library @use_library
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
start: start:
@ -340,7 +341,7 @@ testGetScreen_GS:
je get_area_with_GS_24 je get_area_with_GS_24
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
get_area_with_GS_32: get_area_with_GS_32:
mcall 61,1 mcall 61,1
shr eax,16 shr eax,16
shl eax,2 shl eax,2
@ -348,7 +349,7 @@ get_area_with_GS_32:
mov esi,[start_y] mov esi,[start_y]
imul esi,eax imul esi,eax
mov eax,[start_x] mov eax,[start_x]
shl eax,2 shl eax,2
add esi,eax add esi,eax
@ -356,7 +357,7 @@ get_area_with_GS_32:
mov eax,[size_x] mov eax,[size_x]
shl eax,2 shl eax,2
sub [offset_x],eax sub [offset_x],eax
mov edx,[size_y] mov edx,[size_y]
mov ebx,[offset_x] mov ebx,[offset_x]
sub esi,ebx sub esi,ebx
@ -368,39 +369,39 @@ align 4
mov ecx,ebp mov ecx,ebp
;-------------------------------------- ;--------------------------------------
align 4 align 4
.start_x: .start_x:
mov eax,[gs:esi] mov eax,[gs:esi]
mov [edi],eax mov [edi],eax
add esi,4 add esi,4
add edi,3 add edi,3
dec ecx dec ecx
jnz .start_x jnz .start_x
dec edx dec edx
jnz .start_y jnz .start_y
pop edi pop edi
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
get_area_with_GS_24: get_area_with_GS_24:
mcall 61,1 mcall 61,1
shr eax,16 shr eax,16
lea eax,[eax*3] lea eax,[eax*3]
mov [offset_x],eax mov [offset_x],eax
mov esi,[start_y] mov esi,[start_y]
imul esi,eax imul esi,eax
mov eax,[start_x] mov eax,[start_x]
lea eax,[eax*3] lea eax,[eax*3]
add esi,eax add esi,eax
mov eax,[size_x] mov eax,[size_x]
lea eax,[eax*3] lea eax,[eax*3]
sub [offset_x],eax sub [offset_x],eax
mov edx,[size_y] mov edx,[size_y]
mov ebx,[offset_x] mov ebx,[offset_x]
sub esi,ebx sub esi,ebx
@ -412,7 +413,7 @@ align 4
mov ecx,ebp mov ecx,ebp
;-------------------------------------- ;--------------------------------------
align 4 align 4
.start_x: .start_x:
mov eax,[gs:esi] mov eax,[gs:esi]
mov [edi],eax mov [edi],eax
add esi,3 add esi,3
@ -420,7 +421,7 @@ align 4
dec ecx dec ecx
jnz .start_x jnz .start_x
dec edx dec edx
jnz .start_y jnz .start_y
@ -594,7 +595,7 @@ thread_comment:
je .close ;.close_with_open_file je .close ;.close_with_open_file
cmp ah,27 cmp ah,27
je .close je .close
push dword name_editboxes push dword name_editboxes
call [edit_box_key] call [edit_box_key]
jmp .still jmp .still
@ -685,36 +686,67 @@ LINE_HEIGHT = 13
TEST_REC_SIZE = 16 TEST_REC_SIZE = 16
TESTS_NUM = ($ - results_table) / TEST_REC_SIZE - 1 TESTS_NUM = ($ - results_table) / TEST_REC_SIZE - 1
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
aDrawingWindow db 'Window Of Type #3, 325x400 px',0 if lang eq it
aDrawingBar db 'Filled Rectangle, 100x250 px',0 aDrawingWindow db 'Window Of Type #3, 325x400 px',0
aDrawingPicture db 'Picture, 90x123, px',0 aDrawingBar db 'Filled Rectangle, 100x250 px',0
aDrawingPictF73 db 'Picture for Blitter, 90x123, px',0 aDrawingPicture db 'Picture, 90x123, px',0
aGetScreenF36 db 'Get a piece of screen f.36, 90x123, px',0 aDrawingPictF73 db 'Picture for Blitter, 90x123, px',0
aGetScreen_GS db 'Get a piece of screen GS, 90x123, px',0 aGetScreenF36 db 'Get a piece of screen f.36, 90x123, px',0
aDrawingVLine db 'Vertical Line, 350 px',0 aGetScreen_GS db 'Get a piece of screen GS, 90x123, px',0
aDrawingHLine db 'Horizontal Line, 270 px',0 aDrawingVLine db 'Linea verticale, 350 px',0
aDrawingFLine db 'Free-angled Line, 350 px',0 aDrawingHLine db 'Linea orizzontale, 270 px',0
aDrawingText1 db 'Fixed-width Text, 34 chars',0 aDrawingFLine db 'Free-angled Line, 350 px',0
aDrawingText2 db 'Proportional Text, 34 chars',0 aDrawingText1 db 'Fixed-width Text, 34 chars',0
aDrawingNumber db 'Decimal Number, 8 digits',0 aDrawingText2 db 'Proportional Text, 34 chars',0
aDrawingPixel db 'Single Pixel',0 aDrawingNumber db 'Decimal Number, 8 digits',0
aDrawingPixel db 'Singolo pixel',0
aTestText db 'This is a 34-charachters test text' aTestText db 'This is a 34-charachters test text'
aButtonsText db 'Test Comment+ Pattern+ Open Save',0 aButtonsText db 'Test Commenti Pattern+ Apri Salva',0
aCaption db 'Kolibri Graphical Benchmark 0.7',0 aCaption db 'Kolibri Graphical Benchmark 0.7',0
aLeft db 'Left :',0 aLeft db 'Sinistra:',0
aRight db 'Right :',0 aRight db 'Destra :',0
aComment1 db 'current',0 aComment1 db 'Attuale ',0
aComment2 db 'no pattern',0 aComment2 db 'no pattern',0
aComment db 'Comment',0 aComment db 'Commento',0
else
aDrawingWindow db 'Window Of Type #3, 325x400 px',0
aDrawingBar db 'Filled Rectangle, 100x250 px',0
aDrawingPicture db 'Picture, 90x123, px',0
aDrawingPictF73 db 'Picture for Blitter, 90x123, px',0
aGetScreenF36 db 'Get a piece of screen f.36, 90x123, px',0
aGetScreen_GS db 'Get a piece of screen GS, 90x123, px',0
aDrawingVLine db 'Vertical Line, 350 px',0
aDrawingHLine db 'Horizontal Line, 270 px',0
aDrawingFLine db 'Free-angled Line, 350 px',0
aDrawingText1 db 'Fixed-width Text, 34 chars',0
aDrawingText2 db 'Proportional Text, 34 chars',0
aDrawingNumber db 'Decimal Number, 8 digits',0
aDrawingPixel db 'Single Pixel',0
aTestText db 'This is a 34-charachters test text'
aButtonsText db 'Test Comment+ Pattern+ Open Save',0
aCaption db 'Kolibri Graphical Benchmark 0.7',0
aLeft db 'Left :',0
aRight db 'Right :',0
aComment1 db 'current',0
aComment2 db 'no pattern',0
aComment db 'Comment',0
end if
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
system_dir_Boxlib db '/sys/lib/box_lib.obj',0 system_dir_Boxlib db '/sys/lib/box_lib.obj',0
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0 system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
head_f_i: head_f_i:
head_f_l db 'System error',0 if lang eq it
head_f_l db 'Errore Sistema',0
else
head_f_l db 'System error',0
end if
err_message_found_lib1 db 'box_lib.obj - Not found!',0 err_message_found_lib1 db 'box_lib.obj - Not found!',0
err_message_found_lib2 db 'proc_lib.obj - Not found!',0 err_message_found_lib2 db 'proc_lib.obj - Not found!',0
@ -804,7 +836,7 @@ aOpenDialog_Start db 'OpenDialog_start',0
;aOpenDialog_Version db 'Version_OpenDialog',0 ;aOpenDialog_Version db 'Version_OpenDialog',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
align 4 align 4
Box_lib_import: Box_lib_import:
;init_lib dd a_init ;init_lib dd a_init
;version_lib dd a_version ;version_lib dd a_version
@ -947,4 +979,4 @@ thread_stack1:
rb 4096 rb 4096
rb 0x2884 ; for F73 image size 123*90*4 rb 0x2884 ; for F73 image size 123*90*4
stacktop: stacktop:
I_END: I_END:

View File

@ -10,13 +10,13 @@
; e - add 0x10 ; e - add 0x10
; d - sub 0x10 ; d - sub 0x10
; ;
use32 use32
org 0x0 org 0x0
STACK_SIZE=1024 STACK_SIZE=1024
db 'MENUET01' ; 8 byte id db 'MENUET01' ; 8 byte id
dd 0x01 ; header version dd 0x01 ; header version
dd START ; start of code dd START ; start of code
@ -25,7 +25,7 @@ STACK_SIZE=1024
dd I_END+STACK_SIZE ; esp dd I_END+STACK_SIZE ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc' ;language support
@ -35,30 +35,30 @@ START:
main: main:
call monta_quadro call monta_quadro
.a: mov eax, 11 ; espera por evento .a: mov eax, 11 ; espera por evento
int 0x40 ; 0= -> redraw int 0x40 ; 0= -> redraw
or al,al or al,al
jz .h jz .h
cmp al, 2 ; 1= -> REDRAW cmp al, 2 ; 1= -> REDRAW
jb main ; 2= -> tecla pressionada jb main ; 2= -> tecla pressionada
jz .c ; 3= -> botão pressionado jz .c ; 3= -> botão pressionado
; botão ; botão
mov eax,17 ; mov eax,17 ;
int 0x40 ; OBSERVAÇÕES int 0x40 ; OBSERVAÇÕES
cmp ah,1 ; se o botão apertado for fechar, minimizar, maximizar...todos devem ser do sistema cmp ah,1 ; se o botão apertado for fechar, minimizar, maximizar...todos devem ser do sistema
jnz .b ; mover...etc jnz .b ; mover...etc
or eax,-1 ; saida do aplicativo **************************deve ser do sistema or eax,-1 ; saida do aplicativo **************************deve ser do sistema
int 0x40 ; nunca do aplicativo int 0x40 ; nunca do aplicativo
.b: jmp .a ; loop para novo evento .b: jmp .a ; loop para novo evento
; tecla
; tecla
.c: mov eax,2 ; getkey .c: mov eax,2 ; getkey
int 0x40 int 0x40
;cmp al, 1 ;cmp al, 1
;jnz .a ;jnz .a
cmp ah, 'w' cmp ah, 'w'
jne .a1 jne .a1
@ -68,7 +68,7 @@ main:
jne .a2 jne .a2
cmp [end_base], dword 0x80000000 cmp [end_base], dword 0x80000000
jbe .a2 jbe .a2
sub [end_base], 0x200 sub [end_base], 0x200
jmp main ; jmp main ;
.a2: cmp ah, 'e' .a2: cmp ah, 'e'
jne .a3 jne .a3
@ -85,88 +85,88 @@ main:
; atualiza apenas o codigo hex / ascii ; atualiza apenas o codigo hex / ascii
.h: .h:
call hex_loop call hex_loop
; inc [contador] ; usado apenas para testar a dinamica ; inc [contador] ; usado apenas para testar a dinamica
jmp .a ; retorna para buscar novo evento jmp .a ; retorna para buscar novo evento
monta_quadro: monta_quadro:
; posição inicial, subfunção 1 ; posição inicial, subfunção 1
mov eax,12 mov eax,12
mov ebx,1 mov ebx,1
int 0x40 int 0x40
; Desenha o quadro ; Desenha o quadro
mov eax,0 ; função 0 : define e monta o quadro mov eax,0 ; função 0 : define e monta o quadro
mov ebx,100*65536+480 ; [x pos] *65536 + [x lar] mov ebx,100*65536+480 ; [x pos] *65536 + [x lar]
mov ecx,100*65536+440 ; [y pos] *65536 + [y alt] mov ecx,100*65536+440 ; [y pos] *65536 + [y alt]
mov edx,[cor_janela] ; cor area RRGGBB mov edx,[cor_janela] ; cor area RRGGBB
mov edi,titulo ; Titulo mov edi,titulo ; Titulo
int 0x40 int 0x40
; escreve texto no quadro (barra superior) ; escreve texto no quadro (barra superior)
mov edi,[cor_janela] mov edi,[cor_janela]
mov eax,4 mov eax,4
mov ecx, [cor_texto] mov ecx, [cor_texto]
mov ebx,8*65536+8 mov ebx,8*65536+8
mov edx,teste mov edx,teste
int 0x40 int 0x40
add ebx,11 ; adiciona espaço na coord y add ebx,11 ; adiciona espaço na coord y
mov eax,4 mov eax,4
mov ecx, [cor_texto] mov ecx, [cor_texto]
mov edx,barra1 mov edx,barra1
int 0x40 int 0x40
call hex_loop call hex_loop
; posição final, subfunção 2 ; posição final, subfunção 2
.d: mov eax,12 .d: mov eax,12
mov ebx,2 mov ebx,2
int 0x40 int 0x40
ret ret
; buscar conteudo da memoria para mostrar ; buscar conteudo da memoria para mostrar
hex_loop: hex_loop:
xor eax, eax xor eax, eax
mov ebx, [end_base] ; endereço base mov ebx, [end_base] ; endereço base
; imprime o endereço ; imprime o endereço
mov edx, 8*65536+40 ; posição inicial hex mov edx, 8*65536+40 ; posição inicial hex
mov [pos_ascii], edx mov [pos_ascii], edx
add [pos_ascii], 360*65536 ; posição inicial ascii add [pos_ascii], 360*65536 ; posição inicial ascii
mov word [pos_x], 0 mov word [pos_x], 0
mov al, [quant_linhas] mov al, [quant_linhas]
mov edi,[cor_janela] mov edi,[cor_janela]
.c: push eax ; .c: push eax ;
push edx ; push edx ;
push ebx ; salva endereço base push ebx ; salva endereço base
mov al, 47 mov al, 47
mov ecx, ebx ; imprime o endereço mov ecx, ebx ; imprime o endereço
mov ebx, 0x00080100 mov ebx, 0x00080100
mov esi, [cor_endereco] mov esi, [cor_endereco]
int 0x40 int 0x40
pop ebx ; pop ebx ;
add edx, 60*65536 ; pula 8 espaços mais alguma coisa add edx, 60*65536 ; pula 8 espaços mais alguma coisa
; busca hexcode ; busca hexcode
mov esi, [cor_hexcode] mov esi, [cor_hexcode]
mov al, 4 mov al, 4
.b: push eax ; ----------------------------------------------------------ok .b: push eax ; ----------------------------------------------------------ok
mov al, 72 ; ebx= endereço de leitura (nao funcionou...) change this service to another mov al, 72 ; ebx= endereço de leitura (nao funcionou...) change this service to another
int 0x40 ; retorna ecx= dword da posição ebx int 0x40 ; retorna ecx= dword da posição ebx
@ -175,35 +175,35 @@ hex_loop:
mov al, 4 mov al, 4
.a: push eax ; controle -------------------------------------------------ok .a: push eax ; controle -------------------------------------------------ok
push ecx ; codigo push ecx ; codigo
push edx ; posição push edx ; posição
and ecx, 0xff and ecx, 0xff
mov al, 47 mov al, 47
int 0x40 int 0x40
call imprime_car$ call imprime_car$
pop edx ; pop edx ;
pop ecx ; pop ecx ;
shr ecx, 8 shr ecx, 8
add edx, (18)*65536 add edx, (18)*65536
pop eax ; ----------------------------------------------------------ok pop eax ; ----------------------------------------------------------ok
dec al dec al
jnz .a jnz .a
pop ebx ; ----------------------------------------------------------ok pop ebx ; ----------------------------------------------------------ok
add ebx, 4 ; soma 4 ao endereço base add ebx, 4 ; soma 4 ao endereço base
pop eax ; ----------------------------------------------------------ok pop eax ; ----------------------------------------------------------ok
dec al ; imprimir mais 4 vezes incrementando ebx em 4 dec al ; imprimir mais 4 vezes incrementando ebx em 4
jnz .b jnz .b
pop edx ; pop edx ;
add edx, 10 ; add edx, 10 ;
; imprime a string ascii ; imprime a string ascii
push ebx push ebx
push edx push edx
mov al, 4 mov al, 4
mov ebx, [pos_ascii] ; endereço na tela mov ebx, [pos_ascii] ; endereço na tela
mov edx, ascii_string ; endereço da string mov edx, ascii_string ; endereço da string
or ecx, [cor_ascii] ; cor or ecx, [cor_ascii] ; cor
int 0x40 int 0x40
@ -211,25 +211,25 @@ hex_loop:
add [pos_ascii], 10 add [pos_ascii], 10
pop edx pop edx
pop ebx pop ebx
pop eax ; pop eax ;
dec al dec al
jnz .c jnz .c
ret ret
imprime_car$: ; ecx tem o caractere a imprimir imprime_car$: ; ecx tem o caractere a imprimir
push ebx push ebx
xor ebx, ebx xor ebx, ebx
mov bl, [ascii_x] mov bl, [ascii_x]
or cl, cl or cl, cl
jnz .c jnz .c
mov cl, 0x20 mov cl, 0x20
.c: mov [ebx+ascii_string], cl .c: mov [ebx+ascii_string], cl
inc [ascii_x] inc [ascii_x]
pop ebx pop ebx
ret ret
; para acessar a memoria do sistema: ; para acessar a memoria do sistema:
; ;
@ -252,22 +252,31 @@ quant_linhas db 0x20
ascii_x db 0 ascii_x db 0
end_base dd 0x80000000 ; ok end_base dd 0x80000000 ; ok
pos_ascii dd 0 pos_ascii dd 0
ascii_string rb 0x11 ascii_string rb 0x11
reservado rb 3 reservado rb 3
if lang eq it
titulo db 'Visualizza la memoria del sistema operativo',0
teste db '-------- ----------------- Codice Hex ----------------- -- A S C I I --',0
barra1 db 'Indirizzo:00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 0123456789abcdef',0
titulo db 'Mostra a memoria do sistema operacional',0 else if lang eq es
titulo db 'Mostra a memoria do sistema operacional',0
teste db '-------- ------------------ Hex Code ------------------- -- A S C I I --',0 teste db '-------- ------------------ Hex Code ------------------- -- A S C I I --',0
barra1 db 'Address: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 0123456789abcdef',0 barra1 db 'Address: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 0123456789abcdef',0
else
titulo db 'Displays the operating system memory',0
teste db '-------- ------------------ Hex Code ------------------- -- A S C I I --',0
barra1 db 'Address: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 0123456789abcdef',0
end if
align 0x10 align 0x10
I_END: I_END:
; service 72 from system calls ; service 72 from system calls
; ;
; must contain: ; must contain:
; mov eax, [eax] ; mov eax, [eax]
; mov [esp+32], eax ; mov [esp+32], eax

View File

@ -0,0 +1,22 @@
#!gmake
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=MM
SOURCE=${FILE}.asm
OUT=${FILE}.bin
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
it:
echo "lang fix it" > ${LANG}
${FASM} ${SOURCE} ${OUT}
es:
echo "lang fix es" > ${LANG}
${FASM} ${SOURCE} ${OUT}
clean:
rm -f ${LANG} ${OUT}

View File

@ -0,0 +1,22 @@
#!gmake
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=mousemul
SOURCE=${FILE}.asm
OUT=${FILE}.bin
en:
echo "lang fix en" > ${LANG}
${FASM} ${SOURCE} ${OUT}
ru:
echo "lang fix ru" > ${LANG}
${FASM} ${SOURCE} ${OUT}
it:
echo "lang fix it" > ${LANG}
${FASM} ${SOURCE} ${OUT}
clean:
rm -f ${LANG} ${OUT}

View File

@ -36,12 +36,12 @@ CODE
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
start: start:
mcall 70,notifyapp mcall 70,notifyapp
start1: start1:
xor ebx,ebx xor ebx,ebx
mcall 40 mcall 40
@@: @@:
mcall 23,10 mcall 23,10
mcall 66,3 mcall 66,3
test eax,0x80 ;NumLock status test eax,0x80 ;NumLock status
@ -53,7 +53,7 @@ start1:
mcall 40,10b mcall 40,10b
still: still:
mcall 10 mcall 10
cmp eax,2 ; if event == 2 cmp eax,2 ; if event == 2
jne still jne still
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
@ -61,7 +61,7 @@ key: ; key event handler
call mouse_acceleration call mouse_acceleration
mcall 2 ; get key code mcall 2 ; get key code
push eax push eax
mcall 66,3 mcall 66,3
test eax,0x80 ;NumLock status test eax,0x80 ;NumLock status
@ -273,7 +273,7 @@ hotkeys_common:
mov cl,73 ; Down Num 9 mov cl,73 ; Down Num 9
mcall 66 mcall 66
; disable/enable input, work only hotkeys (f.66.6,66.7) ; disable/enable input, work only hotkeys (f.66.6,66.7)
add ebx,2 add ebx,2
mcall 66 mcall 66
ret ret
@ -286,9 +286,11 @@ UDATA
mouse_timer_ticks dd 0 mouse_timer_ticks dd 0
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
if lang eq ru if lang eq ru
ud_user_message db 'NumLock ¢ª«î砥⠨ ¢ëª«îç ¥â í¬ã«ïâ®à ¬ëè¨. “¯à ¢«¥­¨¥ ç¥à¥§ Numpad',0 ud_user_message db 'NumLock ¢ª«î砥⠨ ¢ëª«îç ¥â í¬ã«ïâ®à ¬ëè¨. “¯à ¢«¥­¨¥ ç¥à¥§ Numpad',0
else if lang eq it
ud_user_message db 'NumLock - on/off - usa Numpad per muovere il cursore',0
else else
ud_user_message db 'NumLock - on/off mouse emul. Numpad - move cursor',0 ud_user_message db 'NumLock - on/off mouse emul. Numpad - move cursor',0
end if end if
notifyapp: notifyapp:
@ -301,4 +303,4 @@ notifyapp:
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
MEOS_APP_END MEOS_APP_END
; <--- end of KolibriOS application ---> ; <--- end of KolibriOS application --->
; ZG ; ZG

View File

@ -0,0 +1,14 @@
#!gmake
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
FILE=@notify
SOURCE=${FILE}.asm
OUT=${FILE}.bin
en:
${FASM} ${SOURCE} ${OUT}
clean:
rm -f ${OUT}