kernel: set_keyboard_data

git-svn-id: svn://kolibrios.org@1874 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2011-02-17 11:30:41 +00:00
parent 66539255be
commit 59c4b700c1
4 changed files with 43 additions and 12 deletions

View File

@ -322,8 +322,10 @@ __exports:
unmap_pages, 'UnmapPages', \ ; eax, ecx
sys_msg_board_str, 'SysMsgBoardStr', \
get_timer_ticks, 'GetTimerTicks', \
get_stack_base, 'GetStackBase', \
delay_hs, 'Delay', \ ; ebx
set_mouse_data, 'SetMouseData'
set_mouse_data, 'SetMouseData', \ ;
set_keyboard_data, 'SetKeyboardData' ; gcc fastcall

View File

@ -1166,4 +1166,13 @@ proc set_app_params stdcall,slot:dword, params:dword,\
ret
endp
align 4
get_stack_base:
mov eax,[current_slot]
mov eax,[eax+APPDATA.pl0_stack]
ret
include "debug.inc"

View File

@ -94,12 +94,34 @@ hotkey_do_test:
pop eax
ret
align 4
set_keyboard_data:
movzx eax,word[TASK_COUNT] ; top window process
movzx eax,word[WIN_POS+eax*2]
shl eax,8
mov al,[SLOT_BASE+eax+APPDATA.keyboard_mode]
mov [keyboard_mode],al
mov eax, ecx
push ebx
push esi
push edi
push ebp
call send_scancode
pop ebp
pop edi
pop esi
pop ebx
ret
align 4
irq1:
; save_ring3_context
; mov ax, os_data
; mov ds, ax
; mov es, ax
movzx eax,word[TASK_COUNT] ; top window process
movzx eax,word[WIN_POS+eax*2]
@ -108,6 +130,9 @@ irq1:
mov [keyboard_mode],al
in al,0x60
send_scancode:
mov [keyboard_data],al
; ch = scancode
@ -310,11 +335,6 @@ irq1:
.exit.irq1:
mov [check_idle_semaphore],5
; mov al,0x20 ; ready for next irq
; out 0x20,al
; restore_ring3_context
; iret
ret
set_lights:

View File

@ -144,7 +144,7 @@ struc APPDATA
.ev_count_ dd ? ;unused ;+20
.exc_handler dd ? ;+24
.except_mask dd ? ;+28
.pl0_stack dd ? ;unused ;+32
.pl0_stack dd ? ;+32
.heap_base dd ? ;+36
.heap_top dd ? ;+40
.cursor dd ? ;+44