66 system function have call without shift registers.

git-svn-id: svn://kolibrios.org@1494 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2010-06-13 17:12:43 +00:00
parent 585af7fe82
commit 5a7b0793fb
4 changed files with 49 additions and 51 deletions

View File

@ -168,7 +168,6 @@ iglobal
dd sys_msg_board ; 63-System message board dd sys_msg_board ; 63-System message board
dd 0 dd 0
dd syscall_putimage_palette; 65-PutImagePalette dd syscall_putimage_palette; 65-PutImagePalette
dd sys_process_def ; 66-Process definitions - keyboard
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; NEW SYSTEM FUNCTIONS TABLE ;; ;; NEW SYSTEM FUNCTIONS TABLE ;;
@ -242,7 +241,7 @@ iglobal
dd cross_order ; 63-System message board dd cross_order ; 63-System message board
dd sys_resize_app_memory ; 64-Resize application memory usage dd sys_resize_app_memory ; 64-Resize application memory usage
dd cross_order ; 65-PutImagePalette dd cross_order ; 65-PutImagePalette
dd cross_order ; 66-Process definitions - keyboard dd sys_process_def ; 66-Process definitions - keyboard
dd syscall_move_window ; 67-Window move or resize dd syscall_move_window ; 67-Window move or resize
dd f68 ; 68-Some internal services dd f68 ; 68-Some internal services
dd sys_debug_services ; 69-Debug dd sys_debug_services ; 69-Debug

View File

@ -3459,6 +3459,7 @@ IPC
====================================================================== ======================================================================
<EFBFBD>¥¦¨¬ ¢¢®¤  ¢«¨ï¥â ­  १ã«ìâ âë ç⥭¨ï ª« ¢¨è ä㭪樥© 2. <EFBFBD>¥¦¨¬ ¢¢®¤  ¢«¨ï¥â ­  १ã«ìâ âë ç⥭¨ï ª« ¢¨è ä㭪樥© 2.
<EFBFBD>ਠ§ £à㧪¥ ¯à®£à ¬¬ë ¤«ï ­¥ñ ãáâ ­ ¢«¨¢ ¥âáï ASCII-०¨¬ ¢¢®¤ . <EFBFBD>ਠ§ £à㧪¥ ¯à®£à ¬¬ë ¤«ï ­¥ñ ãáâ ­ ¢«¨¢ ¥âáï ASCII-०¨¬ ¢¢®¤ .
…᫨ Άλ§λΆ ¥βαο ­¥αγι¥αβΆγξι ο ―®¤δγ­<CEB3>ζ¨ο Ά®§Άΰ ι ¥βαο Ά eax=-1.
-------- <20>®¤äã­ªæ¨ï 1 - ãáâ ­®¢¨âì ०¨¬ ¢¢®¤  á ª« ¢¨ âãàë. --------- -------- <20>®¤äã­ªæ¨ï 1 - ãáâ ­®¢¨âì ०¨¬ ¢¢®¤  á ª« ¢¨ âãàë. ---------
<EFBFBD> à ¬¥âàë: <EFBFBD> à ¬¥âàë:

View File

@ -3421,6 +3421,7 @@ Remarks:
====================================================================== ======================================================================
The input mode influences results of reading keys by function 2. The input mode influences results of reading keys by function 2.
When a program loads, ASCII input mode is set for it. When a program loads, ASCII input mode is set for it.
If subfunction is not support then eax=-1.
-------------- Subfunction 1 - set keyboard input mode. -------------- -------------- Subfunction 1 - set keyboard input mode. --------------
Parameters: Parameters:

View File

@ -4460,36 +4460,47 @@ end if
.smbl2: .smbl2:
ret ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 66 sys function. ;;
;; in eax=66,ebx in [0..5],ecx,edx ;;
;; out eax ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iglobal
align 4
f66call:
dd sys_process_def.1 ; 1 = set keyboard mode
dd sys_process_def.2 ; 2 = get keyboard mode
dd sys_process_def.3 ; 3 = get keyboard ctrl, alt, shift
dd sys_process_def.4
dd sys_process_def.5
endg
sys_process_def: sys_process_def:
dec ebx
cmp ebx,5
jae .not_support ;if >=6 then or eax,-1
mov edi, [CURRENT_TASK] mov edi, [CURRENT_TASK]
jmp dword [f66call+ebx*4]
dec eax ; 1 = set keyboard mode .not_support:
jne no_set_keyboard_setup or eax,-1
ret
.1:
shl edi,8 shl edi,8
mov [edi+SLOT_BASE + APPDATA.keyboard_mode],bl mov [edi+SLOT_BASE + APPDATA.keyboard_mode],cl
ret ret
no_set_keyboard_setup: .2: ; 2 = get keyboard mode
dec eax ; 2 = get keyboard mode
jne no_get_keyboard_setup
shl edi,8 shl edi,8
movzx eax, byte [SLOT_BASE+edi + APPDATA.keyboard_mode] movzx eax, byte [SLOT_BASE+edi + APPDATA.keyboard_mode]
mov [esp+32],eax
mov [esp+36],eax
ret ret
no_get_keyboard_setup:
dec eax ; 3 = get keyboard ctrl, alt, shift
jne no_get_keyboard_cas
; xor eax,eax ; xor eax,eax
; movzx eax,byte [shift] ; movzx eax,byte [shift]
; movzx ebx,byte [ctrl] ; movzx ebx,byte [ctrl]
@ -4498,20 +4509,14 @@ sys_process_def:
; movzx ebx,byte [alt] ; movzx ebx,byte [alt]
; shl ebx,3 ; shl ebx,3
; add eax,ebx ; add eax,ebx
.3: ;3 = get keyboard ctrl, alt, shift
;// mike.dld [ ;// mike.dld [
mov eax, [kb_state] mov eax, [kb_state]
;// mike.dld ] ;// mike.dld ]
mov [esp+32],eax
mov [esp+36],eax
ret ret
no_get_keyboard_cas: .4:
dec eax
jnz no_add_keyboard_hotkey
mov eax, hotkey_list mov eax, hotkey_list
@@: @@:
cmp dword [eax+8], 0 cmp dword [eax+8], 0
@ -4519,29 +4524,25 @@ sys_process_def:
add eax, 16 add eax, 16
cmp eax, hotkey_list+16*256 cmp eax, hotkey_list+16*256
jb @b jb @b
mov dword [esp+36], 1 mov dword [esp+32], 1
ret ret
.found_free: .found_free:
mov [eax+8], edi mov [eax+8], edi
mov [eax+4], ecx mov [eax+4], edx
movzx ebx, bl movzx ecx, cl
lea ebx, [hotkey_scancodes+ebx*4] lea ecx, [hotkey_scancodes+ecx*4]
mov ecx, [ebx] mov edx, [ecx]
mov [eax], ecx mov [eax], edx
mov [ebx], eax mov [ecx], eax
mov [eax+12], ebx mov [eax+12], ecx
jecxz @f jecxz @f
mov [ecx+12], eax mov [edx+12], eax
@@: @@:
and dword [esp+36], 0 and dword [esp+32], 0
ret ret
no_add_keyboard_hotkey: .5:
movzx ebx, cl
dec eax
jnz no_del_keyboard_hotkey
movzx ebx, bl
lea ebx, [hotkey_scancodes+ebx*4] lea ebx, [hotkey_scancodes+ebx*4]
mov eax, [ebx] mov eax, [ebx]
.scan: .scan:
@ -4549,13 +4550,13 @@ no_add_keyboard_hotkey:
jz .notfound jz .notfound
cmp [eax+8], edi cmp [eax+8], edi
jnz .next jnz .next
cmp [eax+4], ecx cmp [eax+4], edx
jz .found jz .found
.next: .next:
mov eax, [eax] mov eax, [eax]
jmp .scan jmp .scan
.notfound: .notfound:
mov dword [esp+36], 1 mov dword [esp+32], 1
ret ret
.found: .found:
mov ecx, [eax] mov ecx, [eax]
@ -4571,13 +4572,9 @@ no_add_keyboard_hotkey:
mov [eax+8], edx mov [eax+8], edx
mov [eax+12], edx mov [eax+12], edx
mov [eax], edx mov [eax], edx
mov [esp+36], edx mov [esp+32], edx
ret ret
no_del_keyboard_hotkey:
ret
align 4 align 4
sys_gs: ; direct screen access sys_gs: ; direct screen access