From b1255773b2f69f6b3b6a37795898464e6ab6972c Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Sun, 3 Feb 2013 22:01:05 +0000 Subject: [PATCH] Added belgian keymap to setup program. git-svn-id: svn://kolibrios.org@3221 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/setup/trunk/keymaps.inc | 41 + programs/system/setup/trunk/setup.asm | 1080 ++++++++++++----------- 2 files changed, 592 insertions(+), 529 deletions(-) diff --git a/programs/system/setup/trunk/keymaps.inc b/programs/system/setup/trunk/keymaps.inc index ac5e5d6eae..87037fe8e4 100644 --- a/programs/system/setup/trunk/keymaps.inc +++ b/programs/system/setup/trunk/keymaps.inc @@ -199,4 +199,45 @@ et_keymap_shift: db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ' db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + + + +be_keymap: + + db '6',27 + db '&щ"',39,'(зш!чр)-',8,9 + db 'azertyuiop^$',13 + db '~qsdfghjklm∙╡<',0,'wxcvbn,;:=',0,'45 ' + db '@234567890123',180,178,184,'6',176,'7' + db 179,'8',181,177,183,185,182 + db 'AB',0,'WXCVBN?./+',0,'45 ' + db '@234567890123',180,178,184,'6',176,'7' + db 179,'8',181,177,183,185,182 + db 'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ' + db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + +be_keymap_alt_gr: + + db '6',27 + db 28,'|@#',0,'^',0,0,'{}',0,0,8,9 + db 'azertyuiop[]',13 + db '~qsdfghjklm┤`\',0,'wxcvbn',0,0,0,'~',0,'45 ' + db '@234567890123',180,178,184,'6',176,'7' + db 179,'8',181,177,183,185,182 + db 'AB + pusha + shl ecx,16 + add ecx,12 + mcall 8,<(350-57),(46+BBB)> - inc edx - mcall ,<(350-85),9> + inc edx + mcall ,<(350-85),9> - inc edx - mcall ,<(350-73),9> + inc edx + mcall ,<(350-73),9> - popa - ret + popa + ret ;------------------------------------------------------------------------------- ; ******************************************** ; ******* WINDOW DEFINITIONS AND DRAW ******* ; ******************************************** draw_window: - pusha - mcall 12,1 + pusha + mcall 12,1 - xor eax,eax ; DRAW WINDOW - xor esi,esi - mcall ,<40,(355+BBB)>,<40,(12*16)>,0xB4111199,,title - - mcall 9,procinfo,-1 - - mov eax,[ebx+70] ;status of window - test eax,100b - jne .end + xor eax,eax ; DRAW WINDOW + xor esi,esi + mcall ,<40,(355+BBB)>,<40,(12*16)>,0xB4111199,,title + + mcall 9,procinfo,-1 + + mov eax,[ebx+70] ;status of window + test eax,100b + jne .end - mcall 8,<(350-85),100>,<(5+16*8),12>,100,0x005588dd ; APPLY ALL + mcall 8,<(350-85),100>,<(5+16*8),12>,100,0x005588dd ; APPLY ALL - add ecx,16*65536 ; SAVE ALL - dec edx - mcall + add ecx,16*65536 ; SAVE ALL + dec edx + mcall - mov esi,0x5580c0 + mov esi,0x5580c0 - mov edx,41 - mov ecx,5+0*8 - call draw_buttons + mov edx,41 + mov ecx,5+0*8 + call draw_buttons - mov edx,3 - mov ecx,5+2*8 - call draw_buttons + mov edx,3 + mov ecx,5+2*8 + call draw_buttons - mov edx,91 - mov ecx,5+4*8 - call draw_buttons + mov edx,91 + mov ecx,5+4*8 + call draw_buttons - mov edx,101 - mov ecx,5+6*8 - call draw_buttons + mov edx,101 + mov ecx,5+6*8 + call draw_buttons - mov edx,131 - mov ecx,5+8*8 - call draw_buttons + mov edx,131 + mov ecx,5+8*8 + call draw_buttons - mov edx,141 - mov ecx,5+10*8 - call draw_buttons - - mov edx,151 - mov ecx,5+12*8 - call draw_buttons + mov edx,141 + mov ecx,5+10*8 + call draw_buttons + + mov edx,151 + mov ecx,5+12*8 + call draw_buttons - call draw_infotext + call draw_infotext .end: - mcall 12,2 - popa - ret + mcall 12,2 + popa + ret ;------------------------------------------------------------------------------- draw_infotext: - pusha - mov eax,[keyboard] ; KEYBOARD - test eax,eax - jnz noen - mov [text00+LLL*1+28],dword 'ENGL' - mov [text00+LLL*1+32],dword 'ISH ' + pusha + mov eax,[keyboard] ; KEYBOARD + test eax,eax + jnz noen + mov [text00+LLL*1+28],dword 'ENGL' + mov [text00+LLL*1+32],dword 'ISH ' ;-------------------------------------- noen: - cmp eax,1 - jnz nofi - mov [text00+LLL*1+28],dword 'FINN' - mov [text00+LLL*1+32],dword 'ISH ' + cmp eax,1 + jnz nofi + mov [text00+LLL*1+28],dword 'FINN' + mov [text00+LLL*1+32],dword 'ISH ' ;-------------------------------------- nofi: - cmp eax,2 - jnz noge - mov [text00+LLL*1+28],dword 'GERM' - mov [text00+LLL*1+32],dword 'AN ' + cmp eax,2 + jnz noge + mov [text00+LLL*1+28],dword 'GERM' + mov [text00+LLL*1+32],dword 'AN ' ;-------------------------------------- noge: - cmp eax,3 - jnz nogr - mov [text00+LLL*1+28],dword 'RUSS' - mov [text00+LLL*1+32],dword 'IAN ' + cmp eax,3 + jnz nogr + mov [text00+LLL*1+28],dword 'RUSS' + mov [text00+LLL*1+32],dword 'IAN ' ;-------------------------------------- nogr: - cmp eax,4 - jnz nofr - mov [text00+LLL*1+28],dword 'FREN' - mov [text00+LLL*1+32],dword 'CH ' + cmp eax,4 + jnz nofr + mov [text00+LLL*1+28],dword 'FREN' + mov [text00+LLL*1+32],dword 'CH ' ;-------------------------------------- nofr: - cmp eax,5 - jnz noet - mov [text00+LLL*1+28],dword 'ESTO' - mov [text00+LLL*1+32],dword 'NIAN' + cmp eax,5 + jnz noet + mov [text00+LLL*1+28],dword 'ESTO' + mov [text00+LLL*1+32],dword 'NIAN' ;-------------------------------------- noet: - mov eax,[syslang] ; SYSTEM LANGUAGE - dec eax - test eax,eax - jnz noen5 - mov [text00+LLL*0+28],dword 'ENGL' - mov [text00+LLL*0+32],dword 'ISH ' + cmp eax,6 + jnz nobe + mov [text00+LLL*1+28],dword 'BELG' + mov [text00+LLL*1+32],dword 'IAN ' +;-------------------------------------- +nobe: + mov eax,[syslang] ; SYSTEM LANGUAGE + dec eax + test eax,eax + jnz noen5 + mov [text00+LLL*0+28],dword 'ENGL' + mov [text00+LLL*0+32],dword 'ISH ' ;-------------------------------------- noen5: - cmp eax,1 - jnz nofi5 - mov [text00+LLL*0+28],dword 'FINN' - mov [text00+LLL*0+32],dword 'ISH ' + cmp eax,1 + jnz nofi5 + mov [text00+LLL*0+28],dword 'FINN' + mov [text00+LLL*0+32],dword 'ISH ' ;-------------------------------------- nofi5: - cmp eax,2 - jnz noge5 - mov [text00+LLL*0+28],dword 'GERM' - mov [text00+LLL*0+32],dword 'AN ' + cmp eax,2 + jnz noge5 + mov [text00+LLL*0+28],dword 'GERM' + mov [text00+LLL*0+32],dword 'AN ' ;-------------------------------------- noge5: - cmp eax,3 - jnz nogr5 - mov [text00+LLL*0+28],dword 'RUSS' - mov [text00+LLL*0+32],dword 'IAN ' + cmp eax,3 + jnz nogr5 + mov [text00+LLL*0+28],dword 'RUSS' + mov [text00+LLL*0+32],dword 'IAN ' ;-------------------------------------- nogr5: - cmp eax,4 - jne nofr5 - mov [text00+LLL*0+28],dword 'FREN' - mov [text00+LLL*0+32],dword 'CH ' + cmp eax,4 + jne nofr5 + mov [text00+LLL*0+28],dword 'FREN' + mov [text00+LLL*0+32],dword 'CH ' ;-------------------------------------- nofr5: - cmp eax,5 - jne noet5 - mov [text00+LLL*0+28],dword 'ESTO' - mov [text00+LLL*0+32],dword 'NIAN' + cmp eax,5 + jne noet5 + mov [text00+LLL*0+28],dword 'ESTO' + mov [text00+LLL*0+32],dword 'NIAN' ;-------------------------------------- noet5: - mov eax,[lba_read] - call onoff ; LBA READ - mov [text00+LLL*2+28],ebx + mov eax,[lba_read] + call onoff ; LBA READ + mov [text00+LLL*2+28],ebx - mov eax,[pci_acc] - call onoff ; PCI ACCESS - mov [text00+LLL*3+28],ebx - - mov eax,[speaker_mute] - call onoff ; SPEAKER - mov [text00+LLL*6+28],ebx + mov eax,[pci_acc] + call onoff ; PCI ACCESS + mov [text00+LLL*3+28],ebx + + mov eax,[speaker_mute] + call onoff ; SPEAKER + mov [text00+LLL*6+28],ebx - mov eax,[mouse_speed] ; MOUSE SPEED - add al,48 - mov [text00+LLL*4+28],al + mov eax,[mouse_speed] ; MOUSE SPEED + add al,48 + mov [text00+LLL*4+28],al - mov eax,[mouse_delay] - mov esi,text00+LLL*5+32 - call hexconvert ; MOUSE DELAY - call text_out - - popa - ret + mov eax,[mouse_delay] + mov esi,text00+LLL*5+32 + call hexconvert ; MOUSE DELAY + call text_out + + popa + ret ;------------------------------------------------------------------------------- text_out: - mcall 13,<165,85>,<0,(14*8)>,0x80111199 ;0x80111199-19 + mcall 13,<165,85>,<0,(14*8)>,0x80111199 ;0x80111199-19 - mov edx,text00 - mov ebx,3*65536+7 - mov eax,4 - mov ecx,0xffffff - mov esi,LLL - mov ebp,text1_strings + mov edx,text00 + mov ebx,3*65536+7 + mov eax,4 + mov ecx,0xffffff + mov esi,LLL + mov ebp,text1_strings ;-------------------------------------- newline: - mcall - add ebx,8+8 - add edx,esi - dec ebp - jnz newline + mcall + add ebx,8+8 + add edx,esi + dec ebp + jnz newline - mov ebp,text2_strings - add ebx,8+8 + mov ebp,text2_strings + add ebx,8+8 ;-------------------------------------- @@: - mcall - add ebx,8+8 - add edx,esi - dec ebp - jnz @b - ret + mcall + add ebx,8+8 + add edx,esi + dec ebp + jnz @b + ret ;------------------------------------------------------------------------------- -hexconvert: ;converting dec to hex in ascii - xor ebx,ebx - mov bl,al - and bl,15 - add ebx,hex - mov cl,[ebx] - mov [esi],cl - shr eax,4 - xor ebx,ebx - mov bl,al - and bl,15 - add ebx,hex - mov cl,[ebx] - dec esi - mov [esi],cl - shr eax,4 - xor ebx,ebx - mov bl,al - and bl,15 - add ebx,hex - mov cl,[ebx] - dec esi - mov [esi],cl - ret +hexconvert: ;converting dec to hex in ascii + xor ebx,ebx + mov bl,al + and bl,15 + add ebx,hex + mov cl,[ebx] + mov [esi],cl + shr eax,4 + xor ebx,ebx + mov bl,al + and bl,15 + add ebx,hex + mov cl,[ebx] + dec esi + mov [esi],cl + shr eax,4 + xor ebx,ebx + mov bl,al + and bl,15 + add ebx,hex + mov cl,[ebx] + dec esi + mov [esi],cl + ret ;------------------------------------------------------------------------------- onoff: - cmp [syslang],4 - jne norus1 - mov ebx,'ДА ' - cmp eax,1 - je exitsub - mov ebx,'НЕТ ' - ret + cmp [syslang],4 + jne norus1 + mov ebx,'ДА ' + cmp eax,1 + je exitsub + mov ebx,'НЕТ ' + ret ;-------------------------------------- norus1: - mov ebx,'ON ' - cmp eax,1 - je exitsub - mov ebx,'OFF ' + mov ebx,'ON ' + cmp eax,1 + je exitsub + mov ebx,'OFF ' ;-------------------------------------- exitsub: - ret + ret ;------------------------------------------------------------------------------- _lba_read: - mcall 21,11,[lba_read] - ret + mcall 21,11,[lba_read] + ret ;------------------------------------------------------------------------------- _pci_acc: - mcall 21,12,[pci_acc] - ret + mcall 21,12,[pci_acc] + ret ;------------------------------------------------------------------------------- _syslang: - mcall 21,5,[syslang] - ret + mcall 21,5,[syslang] + ret ;------------------------------------------------------------------------------- _mouse_speed: - mcall 18,19,1,[mouse_speed] - ret + mcall 18,19,1,[mouse_speed] + ret ;------------------------------------------------------------------------------- _mouse_delay: - mcall 18,19,3,[mouse_delay] - ret + mcall 18,19,3,[mouse_delay] + ret ;------------------------------------------------------------------------------- _speaker_mute: - mcall 18,8,1 - cmp [speaker_mute],eax - je @f - inc ecx - mcall 18 -;-------------------------------------- + mcall 18,8,1 + cmp [speaker_mute],eax + je @f + inc ecx + mcall 18 +;-------------------------------------- @@: - ret + ret ;------------------------------------------------------------------------------- loadtxt: - mov edi,text00 - mov ecx,LLL*(text1_strings + text2_strings)/4+1 - cmp [syslang],4 - jne norus + mov edi,text00 + mov ecx,LLL*(text1_strings + text2_strings)/4+1 + cmp [syslang],4 + jne norus - mov esi,textrus - jmp sload + mov esi,textrus + jmp sload ;-------------------------------------- norus: - mov esi,texteng + mov esi,texteng ;-------------------------------------- sload: - rep movsd - ret + rep movsd + ret ;------------------------------------------------------------------------------- cleantxt: - xor eax,eax - mov ecx,LLL*(text1_strings + text2_strings)/4 - cld - mov edi,text00 - rep stosd - mov [text00+1711],byte 'x' - ret + xor eax,eax + mov ecx,LLL*(text1_strings + text2_strings)/4 + cld + mov edi,text00 + rep stosd + mov [text00+1711],byte 'x' + ret ;------------------------------------------------------------------------------- ; DATA AREA -count: db 0x0 -blinkpar: dd 0x0 -time: dw 0x0 -date: dd 0x0 +count: db 0x0 +blinkpar: dd 0x0 +time: dw 0x0 +date: dd 0x0 ;------------------------------------------------------------------------------- textrus: - db 'Язык системы : ENGLISH - + Применить' - db 'Раскладка клавиатуры : ENGLISH - + Применить' - db 'Включить LBA : OFF - + Применить' - db 'Доступ к шине PCI : OFF - + Применить' - db 'Скорость курсора мыши : 1 - + Применить' - db 'Задержка ускорения мыши : 0x00a - + Применить' - db 'Выключить SPEAKER : OFF - + Применить' - - db 'ВНИМАНИЕ: Применить все ' - db 'НЕ ЗАБУДЬТЕ СОХРАНИТЬ НАСТРОЙКИ Сохранить все ' + db 'Язык системы : ENGLISH - + Применить' + db 'Раскладка клавиатуры : ENGLISH - + Применить' + db 'Включить LBA : OFF - + Применить' + db 'Доступ к шине PCI : OFF - + Применить' + db 'Скорость курсора мыши : 1 - + Применить' + db 'Задержка ускорения мыши : 0x00a - + Применить' + db 'Выключить SPEAKER : OFF - + Применить' + + db 'ВНИМАНИЕ: Применить все ' + db 'НЕ ЗАБУДЬТЕ СОХРАНИТЬ НАСТРОЙКИ Сохранить все ' ;------------------------------------------------------------------------------- texteng: - db 'System language : ENGLISH - + Apply ' - db 'Keyboard layout : ENGLISH - + Apply ' - db 'LBA read enabled : OFF - + Apply ' - db 'PCI access for appl. : OFF - + Apply ' - db 'Mouse pointer speed : 1 - + Apply ' - db 'Mouse pointer delay : 0x00a - + Apply ' - db 'SPEAKER disabled : OFF - + Apply ' + db 'System language : ENGLISH - + Apply ' + db 'Keyboard layout : ENGLISH - + Apply ' + db 'LBA read enabled : OFF - + Apply ' + db 'PCI access for appl. : OFF - + Apply ' + db 'Mouse pointer speed : 1 - + Apply ' + db 'Mouse pointer delay : 0x00a - + Apply ' + db 'SPEAKER disabled : OFF - + Apply ' text1_strings = 7 - db 'NOTE: Apply all ' - db 'SAVE YOUR SETTINGS BEFORE QUITING KOLIBRI Save all ' + db 'NOTE: Apply all ' + db 'SAVE YOUR SETTINGS BEFORE QUITING KOLIBRI Save all ' text2_strings = 2 ;------------------------------------------------------------------------------- -title db 'System setup',0 +title db 'System setup',0 -hex db '0123456789ABCDEF' +hex db '0123456789ABCDEF' ;------------------------------------------------------------------------------- include 'keymaps.inc' ;------------------------------------------------------------------------------- read_fileinfo: - dd 0 - dd 0 - dd 0 - dd 28 - dd keyboard - db 0 - dd file_name + dd 0 + dd 0 + dd 0 + dd 28 + dd keyboard + db 0 + dd file_name ;------------------------------------------------------------------------------- save_fileinfo: - dd 2 - dd 0 - dd 0 - dd 28 - dd keyboard -file_name: db '/sys/setup.dat',0 + dd 2 + dd 0 + dd 0 + dd 28 + dd keyboard +file_name: db '/sys/setup.dat',0 ;------------------------------------------------------------------------------- -keyboard dd 0x0 -syslang dd 0x4 ; 4 - rus -lba_read dd 0x1 -pci_acc dd 0x1 -mouse_speed dd 0x2 -mouse_delay dd 0xa -speaker_mute dd 0 ; 0 - enable, 1 - disable +keyboard dd 0x0 +syslang dd 0x4 ; 4 - rus +lba_read dd 0x1 +pci_acc dd 0x1 +mouse_speed dd 0x2 +mouse_delay dd 0xa +speaker_mute dd 0 ; 0 - enable, 1 - disable ;----------------------------------------------------------------------------- IM_END: ;----------------------------------------------------------------------------- align 4 text00: - rb LLL*(text1_strings + text2_strings)+4 + rb LLL*(text1_strings + text2_strings)+4 ;----------------------------------------------------------------------------- align 4 boot_param: procinfo: - rb 1024 + rb 1024 ;----------------------------------------------------------------------------- align 4 - rb 0x1000 + rb 0x1000 stack_area: ;----------------------------------------------------------------------------- I_END: