italian version

git-svn-id: svn://kolibrios.org@3645 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
fedesco 2013-06-11 13:30:05 +00:00
parent 819a12b8d2
commit 2f59aa1b32
8 changed files with 328 additions and 192 deletions

View File

@ -1,11 +1,11 @@
; ;
; PANEL SETUP ; PANEL SETUP
; ;
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; last update: 09/04/2012 ; last update: 09/04/2012
; changed by: Marat Zakiyanov aka Mario79, aka Mario ; changed by: Marat Zakiyanov aka Mario79, aka Mario
; changes: Code optimizing and refactoring. ; changes: Code optimizing and refactoring.
; ;
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
use32 use32
org 0x0 org 0x0
@ -19,17 +19,18 @@
dd 0x0 ; path dd 0x0 ; path
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
include '../../../macros.inc' include '../../../macros.inc'
include 'lang.inc'
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
START: START:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
red: red:
call draw_window call draw_window
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
still: still:
mcall 10 mcall 10
cmp eax,1 ; redraw request ? cmp eax,1 ; redraw request ?
je red je red
@ -38,20 +39,20 @@ still:
cmp eax,3 ; button in buffer ? cmp eax,3 ; button in buffer ?
je button je button
jmp still jmp still
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
key: key:
mcall 2 mcall 2
shr eax,8 shr eax,8
cmp eax,'0' cmp eax,'0'
jb still jb still
cmp eax,'9' cmp eax,'9'
jg still jg still
mov edi,[ent] mov edi,[ent]
add edi,text add edi,text
mov esi,edi mov esi,edi
@ -59,15 +60,15 @@ key:
mov ecx,3 mov ecx,3
cld cld
rep movsb rep movsb
mov [edi],al mov [edi],al
jmp red jmp red
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
button: button:
mcall 17 mcall 17
cmp ah,1 ; button id=1 ? cmp ah,1 ; button id=1 ?
jne noclose jne noclose
@ -77,7 +78,7 @@ align 4
noclose: noclose:
cmp ah,10 cmp ah,10
jne no_apply jne no_apply
mov esi,text+17 mov esi,text+17
mov edi,panel_ini_data_area ;I_END+10 mov edi,panel_ini_data_area ;I_END+10
mov ecx,12 mov ecx,12
@ -101,7 +102,7 @@ newread:
mcall 9,proc_info,esi mcall 9,proc_info,esi
cmp esi,eax cmp esi,eax
jg all_terminated jg all_terminated
mov eax,[ebx+10] mov eax,[ebx+10]
and eax,not 0x20202000 and eax,not 0x20202000
cmp eax,'@PAN' cmp eax,'@PAN'
@ -111,11 +112,11 @@ newread:
and eax,not 0x2020 and eax,not 0x2020
cmp ax,'EL' cmp ax,'EL'
jne newread jne newread
mcall 18,2,esi mcall 18,2,esi
mcall 5,5 mcall 5,5
mov esi,1 mov esi,1
jmp newread jmp newread
;-------------------------------------- ;--------------------------------------
@ -137,11 +138,11 @@ no_apply:
mov [ent],eax mov [ent],eax
mov [text+eax],dword '0000' mov [text+eax],dword '0000'
jmp red jmp red
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; ********************************************* ; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ******** ; ******* WINDOW DEFINITIONS AND DRAW ********
; ********************************************* ; *********************************************
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
draw_window: draw_window:
mcall 12,1 mcall 12,1
@ -180,33 +181,56 @@ newline:
mcall 12,2 mcall 12,2
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
; DATA AREA ; DATA AREA
text: if lang eq it
db 'width 0000 : 0 for full screen width <' text:
db 'buttons 0000 : 0 no frames , 1 frames <' db 'largehzza 0000 : 0 for full screen width <'
db 'soften_up 0001 : 0 no , 1 yes <' db 'pulsanti 0000 : 0 no frames , 1 frames <'
db 'soften_down 0001 : 0 no , 1 yes <' db 'soften_up 0001 : 0 no , 1 si <'
db 'minimize_left 0001 : 0 no , 1 yes <' db 'soften_down 0001 : 0 no , 1 si <'
db 'minimize_right 0001 : 0 no , 1 yes <' db 'minimize_left 0001 : 0 no , 1 si <'
db 'icons_position 0100 : position in pixels <' db 'minimize_right 0001 : 0 no , 1 si <'
db 'menu_enable 0001 : 0 no , 1 yes <' db 'posizione icone 0100 : posizione in pixel <'
db 'setup_enable 0001 : 0 no , 1 yes <' db 'menu_enable 0001 : 0 no , 1 si <'
db 'graph_text 0001 : 0 graphics , 1 text <' db 'setup_enable 0001 : 0 no , 1 si <'
db 'soften_middle 0001 : 0 no , 1 yes <' db 'graph_text 0001 : 0 grafica , 1 text <'
db 'icons 0001 : 0 start , 1 activate <' db 'soften_middle 0001 : 0 no , 1 si <'
db ' ' db 'icone 0001 : 0 start , 1 attivato <'
db ' APPLY ' db ' '
db 'x' db ' Applica '
;------------------------------------------------------------------------------ db 'x'
labelt:
db 'Panel setup' labelt:
labellen: db 'Setup pannello'
;------------------------------------------------------------------------------ labellen:
else
text:
db 'width 0000 : 0 for full screen width <'
db 'buttons 0000 : 0 no frames , 1 frames <'
db 'soften_up 0001 : 0 no , 1 yes <'
db 'soften_down 0001 : 0 no , 1 yes <'
db 'minimize_left 0001 : 0 no , 1 yes <'
db 'minimize_right 0001 : 0 no , 1 yes <'
db 'icons_position 0100 : position in pixels <'
db 'menu_enable 0001 : 0 no , 1 yes <'
db 'setup_enable 0001 : 0 no , 1 yes <'
db 'graph_text 0001 : 0 graphics , 1 text <'
db 'soften_middle 0001 : 0 no , 1 yes <'
db 'icons 0001 : 0 start , 1 activate <'
db ' '
db ' APPLY '
db 'x'
labelt:
db 'Panel setup'
labellen:
end if
;------------------------------------------------------------------------------
align 4 align 4
ent dd 17 ent dd 17
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
panel_start: panel_start:
dd 7 dd 7
@ -215,7 +239,7 @@ panel_start:
dd 0 dd 0
dd 0 dd 0
db '/RD/1/@PANEL',0 db '/RD/1/@PANEL',0
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
dat_write: dat_write:
dd 2 dd 2
@ -224,9 +248,9 @@ dat_write:
dd 5*12+1 dd 5*12+1
dd panel_ini_data_area ;I_END+10 dd panel_ini_data_area ;I_END+10
db 'PANEL.DAT',0 db 'PANEL.DAT',0
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
IM_END: IM_END:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
proc_info: proc_info:
rb 1024 rb 1024
@ -234,10 +258,10 @@ proc_info:
align 4 align 4
rb 1024 rb 1024
stack_top: stack_top:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
panel_ini_data_area: panel_ini_data_area:
rb 61 rb 61
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
I_END: I_END:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------

View File

@ -37,7 +37,7 @@ START:
jne @f jne @f
mov [type],dword 0 mov [type],dword 0
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [I_Param],dword 'ASSM' cmp [I_Param],dword 'ASSM'
jne bgr_changed jne bgr_changed
@ -135,7 +135,7 @@ thread:
mov [addy2],1 mov [addy2],1
jmp drawsswin jmp drawsswin
;-------------------------------------- ;--------------------------------------
align 4 align 4
asminit: ; for "assembler" - assembler sources demo asminit: ; for "assembler" - assembler sources demo
; get size of file ; get size of file
mov [fileinfo],dword 5 mov [fileinfo],dword 5
@ -155,26 +155,26 @@ asminit: ; for "assembler" - assembler sources demo
jz @f jz @f
mcall 68,13,[fileinfo.point] mcall 68,13,[fileinfo.point]
;-------------------------------------- ;--------------------------------------
align 4 align 4
.no_file: .no_file:
mov [type],dword 0 mov [type],dword 0
jmp drawsswin jmp drawsswin
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov dword [delay],1 ;25 - old value mov dword [delay],1 ;25 - old value
;-------------------------------------- ;--------------------------------------
align 4 align 4
asminit1: asminit1:
mov eax,[fileinfo.point] mov eax,[fileinfo.point]
mov [stringstart],eax mov [stringstart],eax
mov dword [stringlen],1 mov dword [stringlen],1
;-------------------------------------- ;--------------------------------------
align 4 align 4
newpage: newpage:
mov word [stringpos],10 mov word [stringpos],10
;-------------------------------------- ;--------------------------------------
align 4 align 4
drawsswin: drawsswin:
xor eax,eax xor eax,eax
movzx ebx,[x_max] movzx ebx,[x_max]
@ -186,7 +186,7 @@ drawsswin:
xor edx,edx xor edx,edx
mcall 13 mcall 13
;-------------------------------------- ;--------------------------------------
align 4 align 4
tstill: tstill:
mcall 23,[delay] mcall 23,[delay]
test eax,eax test eax,eax
@ -201,13 +201,13 @@ tstill:
call draw_line call draw_line
jmp tstill jmp tstill
;-------------------------------------- ;--------------------------------------
align 4 align 4
thr_end: thr_end:
cmp [type],dword 24 cmp [type],dword 24
jne @f jne @f
mcall 68,13,[fileinfo.point] mcall 68,13,[fileinfo.point]
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
and [params], not 1 and [params], not 1
or eax,-1 or eax,-1
@ -233,7 +233,7 @@ drawssasm:
dec edi dec edi
;-------------------------------------- ;--------------------------------------
align 4 align 4
addstring: addstring:
add word [stringpos],10 add word [stringpos],10
add edi,2 add edi,2
@ -244,7 +244,7 @@ addstring:
jb tstill jb tstill
jmp newpage jmp newpage
;-------------------------------------- ;--------------------------------------
align 4 align 4
noaddstring: noaddstring:
mov ebx,10*65536 mov ebx,10*65536
mov bx,[stringpos] mov bx,[stringpos]
@ -268,65 +268,65 @@ draw_line:
add [lx2],eax add [lx2],eax
mov eax,[addy2] mov eax,[addy2]
add [ly2],eax add [ly2],eax
cmp [lx1],1 cmp [lx1],1
jge dl1 jge dl1
mov [addx1],1 mov [addx1],1
;-------------------------------------- ;--------------------------------------
align 4 align 4
dl1: dl1:
cmp [lx2],1 cmp [lx2],1
jge dl2 jge dl2
mov [addx2],1 mov [addx2],1
;-------------------------------------- ;--------------------------------------
align 4 align 4
dl2: dl2:
cmp [lx1],esi cmp [lx1],esi
jbe dl3 jbe dl3
mov [addx1],0xffffffff mov [addx1],0xffffffff
;-------------------------------------- ;--------------------------------------
align 4 align 4
dl3: dl3:
cmp [lx2],esi cmp [lx2],esi
jbe dl4 jbe dl4
mov [addx2],0xffffffff mov [addx2],0xffffffff
;-------------------------------------- ;--------------------------------------
align 4 align 4
dl4: dl4:
cmp [ly1],1 cmp [ly1],1
jge dl5 jge dl5
mov [addy1],1 mov [addy1],1
;-------------------------------------- ;--------------------------------------
align 4 align 4
dl5: dl5:
cmp [ly2],2 cmp [ly2],2
jge dl6 jge dl6
mov [addy2],1 mov [addy2],1
;-------------------------------------- ;--------------------------------------
align 4 align 4
dl6: dl6:
cmp [ly1],edi cmp [ly1],edi
jbe dl7 jbe dl7
mov [addy1],-1 mov [addy1],-1
;-------------------------------------- ;--------------------------------------
align 4 align 4
dl7: dl7:
cmp [ly2],edi cmp [ly2],edi
jbe dl8 jbe dl8
mov [addy2],-1 mov [addy2],-1
;-------------------------------------- ;--------------------------------------
align 4 align 4
dl8: dl8:
mov eax,[lx2] mov eax,[lx2]
cmp [lx1],eax cmp [lx1],eax
jz dnol jz dnol
mov bx,word [lx1] mov bx,word [lx1]
shl ebx,16 shl ebx,16
mov bx,word [lx2] mov bx,word [lx2]
@ -334,12 +334,12 @@ dl8:
mov cx,word [ly1] mov cx,word [ly1]
shl ecx,16 shl ecx,16
mov cx,word [ly2] mov cx,word [ly2]
mov edx,[lcolor] mov edx,[lcolor]
and edx,0xffffff and edx,0xffffff
mcall 38 mcall 38
;-------------------------------------- ;--------------------------------------
align 4 align 4
dnol: dnol:
add [lcolor],0x010201 add [lcolor],0x010201
ret ret
@ -348,7 +348,7 @@ align 4
sthread: ; start of execution sthread: ; start of execution
call sdraw_window call sdraw_window
;-------------------------------------- ;--------------------------------------
align 4 align 4
sstill: sstill:
mcall 10 ; wait here for event mcall 10 ; wait here for event
dec eax ; redraw request ? dec eax ; redraw request ?
@ -371,7 +371,7 @@ sbutton: ; button
mov eax,-1 ; close this program mov eax,-1 ; close this program
mcall mcall
;-------------------------------------- ;--------------------------------------
align 4 align 4
snoclose: snoclose:
cmp ah,7 cmp ah,7
jne nosetfl jne nosetfl
@ -382,7 +382,7 @@ snoclose:
call drawtime call drawtime
jmp sstill jmp sstill
;-------------------------------------- ;--------------------------------------
align 4 align 4
nosetfl: nosetfl:
test [params],1 test [params],1
jnz sstill jnz sstill
@ -471,14 +471,14 @@ sdraw_window:
mcall ,<100,215>,<100,70>,0x13400088,,title mcall ,<100,215>,<100,70>,0x13400088,,title
mcall 8,<47,10>,<31,10>,2,0x702050 mcall 8,<47,10>,<31,10>,2,0x702050
push ebx push ebx
add ebx,13*65536 add ebx,13*65536
mov edi,ebx mov edi,ebx
inc edx inc edx
mcall mcall
pop ebx pop ebx
add ecx,15*65536 add ecx,15*65536
inc edx inc edx
mcall mcall
@ -543,7 +543,7 @@ drawflag:
mcall 8,,,0x80000007 ; before we need delete button mcall 8,,,0x80000007 ; before we need delete button
; otherwise, a few hours later the application will spend all buttons of system ; otherwise, a few hours later the application will spend all buttons of system
mcall ,<150,10>,<45,10>,7,0xe0e0e0 ; then create button mcall ,<150,10>,<45,10>,7,0xe0e0e0 ; then create button
mov edx,flag mov edx,flag
bt dword [params],0 bt dword [params],0
jc setf jc setf

View File

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

@ -15,6 +15,7 @@ use32
dd 0x0 , 0x0 ; I_Param , I_Icon dd 0x0 , 0x0 ; I_Param , I_Icon
include '../../../macros.inc' include '../../../macros.inc'
include 'lang.inc'
START: ; start of execution START: ; start of execution
@ -91,11 +92,8 @@ still:
notest8: notest8:
jmp still jmp still
; ********************************************* ; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ******** ; ******* WINDOW DEFINITIONS AND DRAW ********
; ********************************************* ; *********************************************
@ -142,32 +140,49 @@ draw_window:
; DATA AREA ; DATA AREA
if lang eq it
text: text:
db 'Il programma usa 0x10000 byte di memoria'
db 'Application uses 0x10000 bytes of memory' db ' '
db ' ' db 'Open debug board for rezult information '
db 'Open debug board for rezult information ' db ' '
db ' ' db ' CLI '
db ' CLI ' db ' '
db ' ' db ' STI '
db ' STI ' db ' '
db ' ' db ' MOV [0x10000],BYTE 1 '
db ' MOV [0x10000],BYTE 1 ' db ' '
db ' ' db ' JMP DWORD 0x10000 '
db ' JMP DWORD 0x10000 ' db ' '
db ' ' db ' MOV ESP,0 & PUSH EAX '
db ' MOV ESP,0 & PUSH EAX ' db ' '
db ' ' db ' IN Al,0x60 '
db ' IN Al,0x60 ' db ' '
db ' ' db ' OUT 0x60,AL '
db ' OUT 0x60,AL ' db 'x '
db 'x ' else
text:
db 'Application uses 0x10000 bytes of memory'
db ' '
db 'Open debug board for rezult information '
db ' '
db ' CLI '
db ' '
db ' STI '
db ' '
db ' MOV [0x10000],BYTE 1 '
db ' '
db ' JMP DWORD 0x10000 '
db ' '
db ' MOV ESP,0 & PUSH EAX '
db ' '
db ' IN Al,0x60 '
db ' '
db ' OUT 0x60,AL '
db 'x '
end if
tlabel: tlabel:
db 'Kolibri protection test',0 db 'Kolibri protection test',0
I_END: I_END:

View File

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

@ -8,9 +8,9 @@
; Compile with FASM for Menuet ; Compile with FASM for Menuet
; ;
use32 use32
org 0x0 org 0x0
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
@ -18,10 +18,11 @@ use32
dd 0x5000 ; memory for app dd 0x5000 ; memory for app
dd 0x4ff0 ; esp dd 0x4ff0 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon dd 0x0 , 0x0 ; I_Param , I_Icon
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
include 'lang.inc'
START: ; start of execution START: ; start of execution
mov eax,14 mov eax,14
mcall mcall
mov ebx,eax mov ebx,eax
@ -30,7 +31,7 @@ START: ; start of execution
shl eax,16 shl eax,16
shr eax,16 shr eax,16
mov [oldY],eax mov [oldY],eax
; Test on installed video driver ; Test on installed video driver
mov eax,21 mov eax,21
mov ebx,13 mov ebx,13
@ -42,7 +43,7 @@ START: ; start of execution
call warning_info call warning_info
retn retn
; ;
vrr_00: vrr_00:
call get_vert_rate call get_vert_rate
mov eax,[currvm] mov eax,[currvm]
@ -50,12 +51,12 @@ vrr_00:
call get_pid call get_pid
red: red:
call draw_window ; at first, draw the window call draw_window ; at first, draw the window
still: still:
mov eax,10 ; check here for event mov eax,10 ; check here for event
mcall mcall
cmp eax,1 ; redraw request ? cmp eax,1 ; redraw request ?
je red je red
cmp eax,2 ; key in buffer ? cmp eax,2 ; key in buffer ?
@ -64,7 +65,7 @@ still:
je button je button
call get_pid call get_pid
jmp still jmp still
key: ; key key: ; key
mov al,2 ; just read it mov al,2 ; just read it
mcall mcall
@ -138,11 +139,11 @@ key_loc_07:
xor ax,ax xor ax,ax
mov [vmselect],ax mov [vmselect],ax
jmp red jmp red
button: ; button button: ; button
mov al,17 ; get id mov al,17 ; get id
mcall mcall
cmp ah,1 ; button id=1 ? cmp ah,1 ; button id=1 ?
jne noclose jne noclose
mov eax,-1 ; close this program mov eax,-1 ; close this program
@ -181,21 +182,21 @@ button_loc_05:
call restore_mode call restore_mode
button_loc_06: button_loc_06:
jmp still jmp still
; ********************************************* ; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ******** ; ******* WINDOW DEFINITIONS AND DRAW ********
; ********************************************* ; *********************************************
draw_window: draw_window:
dw_continue: dw_continue:
mov eax,12 ; function 12:tell os about windowdraw mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw mov ebx,1 ; 1, start of draw
mcall mcall
; DRAW WINDOW ; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+400 ; [x start] *65536 + [x size] mov ebx,100*65536+400 ; [x start] *65536 + [x size]
@ -203,7 +204,7 @@ dw_continue:
mov edx,0x140020C0;0x00000040 ; color of work area RRGGBB,8->color glide mov edx,0x140020C0;0x00000040 ; color of work area RRGGBB,8->color glide
mov edi,title mov edi,title
mcall mcall
; BUTTONS ; BUTTONS
mov eax,8 mov eax,8
mov edx,0 mov edx,0
@ -228,17 +229,17 @@ dw_continue:
add ebx,90*65536 add ebx,90*65536
inc dl ;dl=7 inc dl ;dl=7
mcall ; Button 'Default' mcall ; Button 'Default'
call draw_face call draw_face
mov eax,12 ; function 12:tell os about windowdraw mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw mov ebx,2 ; 2, end of draw
mcall mcall
ret ret
;------------Subfunctions----------- ;------------Subfunctions-----------
restore_mode: restore_mode:
push eax push eax
push ebx push ebx
@ -251,9 +252,9 @@ restore_mode:
pop ecx pop ecx
pop eax pop eax
retn retn
; IN: edx = RefRate*65536+No.VideoMode ; IN: edx = RefRate*65536+No.VideoMode
set_my_mode: set_my_mode:
push ecx push ecx
@ -274,7 +275,7 @@ set_my_mode:
pop ebx pop ebx
pop ecx pop ecx
retn retn
; IN: eax = 0/1 - -/+ 1Hz ; IN: eax = 0/1 - -/+ 1Hz
inc_dec_rate: inc_dec_rate:
push ebx push ebx
@ -289,7 +290,7 @@ inc_dec_rate:
pop ecx pop ecx
pop ebx pop ebx
retn retn
get_pid: get_pid:
mov eax,9 mov eax,9
mov ebx,buffer mov ebx,buffer
@ -302,7 +303,7 @@ get_pid:
mov ax,[ebx+4] mov ax,[ebx+4]
mov [mypno],ax mov [mypno],ax
retn retn
get_vert_rate: get_vert_rate:
xor eax,eax xor eax,eax
mov ebx,eax mov ebx,eax
@ -318,11 +319,11 @@ get_vert_rate:
rol ecx,16 rol ecx,16
mov [currvm],ecx mov [currvm],ecx
retn retn
get_initial_videomode: get_initial_videomode:
retn retn
draw_table: draw_table:
mov eax,13 mov eax,13
mov ebx,9*65536+303 mov ebx,9*65536+303
@ -425,7 +426,7 @@ dt_loc_01:
add edx,4 add edx,4
mcall mcall
retn retn
;IN: ah=keycode ;IN: ah=keycode
safekey: safekey:
sub ah,30h sub ah,30h
@ -474,7 +475,7 @@ sk_loc_01:
call draw_window call draw_window
pop bx pop bx
retn retn
; IN: ebx=Xstart*65536+Xend ; IN: ebx=Xstart*65536+Xend
; ecx=Ystart*65536+Yend ; ecx=Ystart*65536+Yend
; edx=color ; edx=color
@ -514,7 +515,7 @@ draw_rect:
pop ebx pop ebx
pop eax pop eax
retn retn
; ;
; OUT: eax = 0 - no event ; OUT: eax = 0 - no event
protect_and_return: protect_and_return:
@ -564,7 +565,7 @@ par_loc_00:
par_loc_02: par_loc_02:
pop ebx pop ebx
retn retn
debug_ftr: debug_ftr:
; xor eax,eax ; xor eax,eax
; mov ebx,eax ; mov ebx,eax
@ -580,7 +581,7 @@ debug_ftr:
; add edx,54*65536 ; add edx,54*65536
; mcall ; mcall
retn retn
print_cur_vm: print_cur_vm:
mov eax,4 mov eax,4
mov ebx,20*65536+40 mov ebx,20*65536+40
@ -689,7 +690,7 @@ print_cur_vm:
pop esi pop esi
pcv_loc_00: pcv_loc_00:
retn retn
print_all_herz: print_all_herz:
push esi push esi
push edi push edi
@ -733,7 +734,7 @@ pah_loc_03:
pop edi pop edi
pop esi pop esi
retn retn
; IN: ebx=X*65536+Y - coordinate ; IN: ebx=X*65536+Y - coordinate
print_noherz: print_noherz:
push eax push eax
@ -754,7 +755,7 @@ print_noherz:
pop ebx pop ebx
pop eax pop eax
retn retn
; IN: eax=numer_of_herz ; IN: eax=numer_of_herz
; ebx=X*65536+Y ; ebx=X*65536+Y
print_herz: print_herz:
@ -778,14 +779,14 @@ print_herz:
pop ebx pop ebx
pop eax pop eax
retn retn
get_pixelclock: get_pixelclock:
retn retn
; light version of function ; light version of function
calc_refrate: calc_refrate:
retn retn
rect_select: rect_select:
mov ax,[vmselect] mov ax,[vmselect]
; mov [ftr_ebx],eax ; mov [ftr_ebx],eax
@ -833,7 +834,7 @@ rs_loc_01:
call draw_rect call draw_rect
rs_loc_00: rs_loc_00:
retn retn
draw_face: draw_face:
call draw_table call draw_table
; ;
@ -917,12 +918,12 @@ draw_face:
call print_cur_vm call print_cur_vm
call print_all_herz call print_all_herz
retn retn
warning_info: warning_info:
call warning_window call warning_window
call warning_loop call warning_loop
retn retn
warning_window: warning_window:
mov eax,12 ; function 12:tell os about windowdraw mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw mov ebx,1 ; 1, start of draw
@ -969,7 +970,7 @@ warning_window:
mov ebx,2 ; 2, end of draw mov ebx,2 ; 2, end of draw
mcall mcall
retn retn
warning_loop: warning_loop:
mov eax,5 mov eax,5
mov ebx,13 mov ebx,13
@ -1021,9 +1022,9 @@ warning_loop:
mcall mcall
jmp warning_loop jmp warning_loop
retn retn
;------------DATA AREA--------------- ;------------DATA AREA---------------
oldX dd ? oldX dd ?
oldY dd ? oldY dd ?
initvm dd ? initvm dd ?
@ -1038,43 +1039,73 @@ vmselect dw 0
ftr_eax dd ? ftr_eax dd ?
ftr_ebx dd ? ftr_ebx dd ?
blinkcol dd 0ffh blinkcol dd 0ffh
; db 0,0,0,0,0,0,0,0 ; db 0,0,0,0,0,0,0,0
;_m1 dw 0,0,0,0,0 ;_m1 dw 0,0,0,0,0
;_m2 dw 0,0,0,0,0 ;_m2 dw 0,0,0,0,0
;_m3 dw 0,0,0,0,0 ;_m3 dw 0,0,0,0,0
;_m4 dw 0,0,0,0,0 ;_m4 dw 0,0,0,0,0
title db 'Vertical Refresh Rate v2.0 (C) 2003 TRANS',0 if lang eq it
title db 'Vertical Refresh Rate v2.0 (C) 2003 TRANS',0
_m1280x1024 db '1280x1024'
_m1024x768 db '1024x768 ' _m1280x1024 db '1280x1024'
_m800x600 db ' 800x600 ' _m1024x768 db '1024x768 '
_m640x480 db ' 640x480 ' _m800x600 db ' 800x600 '
_mk db 'Key1Key2' _m640x480 db ' 640x480 '
_mk db 'Key1Key2'
curmode db 'Current mode: '
db ' x x Hz' curmode db 'Modalita intera: '
cmlen=$-curmode db ' x x Hz'
selmode db ' Select mode: ' cmlen=$-curmode
selcans db '----x----x---Hz' selmode db ' Select mode: '
noherz db '---' selcans db '----x----x---Hz'
width db 'Width',11h,10h noherz db '---'
tmode db ' Mode ' width db 'Width',11h,10h
actions db ' Actions ' tmode db ' Modalita '
button1 db 'Ok' ;len=2 actions db ' Azioni '
button2 db 'Cancel' ;len=6 button1 db 'Ok' ;len=2
button3 db 'Return' ;len=6 button2 db 'Cancella' ;len=6
button4 db 'Default' ;len=7 button3 db 'Torna' ;len=6
button4 db 'Default' ;len=7
strt db 'LAUNCHER '
strt db 'LAUNCHER '
warn00 db ' W A R N I N G ! '
len_warn00=$-warn00 warn00 db ' A T T E N Z I O N E ! '
warn01 db 'V i d e o D r i v e r N O T I n s t a l l e d' len_warn00=$-warn00
len_warn01=$-warn01 warn01 db 'D R I V E R V I D E O N O N I N S T A L L A T O'
len_warn01=$-warn01
else
title db 'Vertical Refresh Rate v2.0 (C) 2003 TRANS',0
_m1280x1024 db '1280x1024'
_m1024x768 db '1024x768 '
_m800x600 db ' 800x600 '
_m640x480 db ' 640x480 '
_mk db 'Key1Key2'
curmode db 'Current mode: '
db ' x x Hz'
cmlen=$-curmode
selmode db ' Select mode: '
selcans db '----x----x---Hz'
noherz db '---'
width db 'Width',11h,10h
tmode db ' Mode '
actions db ' Actions '
button1 db 'Ok' ;len=2
button2 db 'Cancel' ;len=6
button3 db 'Return' ;len=6
button4 db 'Default' ;len=7
strt db 'LAUNCHER '
warn00 db ' W A R N I N G ! '
len_warn00=$-warn00
warn01 db 'V i d e o D r i v e r N O T I n s t a l l e d'
len_warn01=$-warn01
end if
drvinfo: ; 512 bytes driver info area drvinfo: ; 512 bytes driver info area
; +0 - Full driver name ; +0 - Full driver name
; +32 - Driver version ; +32 - Driver version
@ -1087,8 +1118,6 @@ vidmode:
org $+64 org $+64
_m1: _m1:
org drvinfo+200h org drvinfo+200h
buffer: buffer:
I_END: I_END:

View File

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

View File

@ -0,0 +1,16 @@
#!gmake
# Macro
FASM=/opt/bin/fasm
KPACK=/opt/bin/kpack
LANG=lang.inc
FILE=ZKEY
SOURCE=${FILE}.ASM
OUT=${FILE}.bin
en:
${FASM} ${SOURCE} ${OUT}
clean:
rm -f ${LANG} ${OUT}