KEYASCII - modified for kernel SVN r.4588

git-svn-id: svn://kolibrios.org@4589 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2014-02-25 01:44:26 +00:00
parent ce96116465
commit 2a658d4655

View File

@ -39,6 +39,8 @@ still:
mov eax,2 ; just read it and ignore
mcall
mov [keyid],ah
shr eax,16
mov [scan_keyid],al
call draw_window
jmp still
@ -55,61 +57,56 @@ still:
jmp still
; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ********
; *********************************************
draw_window:
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
; function 12:tell os about windowdraw ; 1, start of draw
mcall 12,1
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,100*65536+270 ; [x start] *65536 + [x size]
mov ecx,100*65536+80 ; [y start] *65536 + [y size]
mov ecx,100*65536+100 ; [y start] *65536 + [y size]
mov edx,0x34ffffff ; color of work area RRGGBB,8->color gl
mov edi,title
mcall
mov eax,4 ; function 4 : write text to window
; function 4 : write text to window
xor ecx,ecx
mov esi,4
mov ebx,8*65536+8
mov edx,tdec
mcall
mcall 4,<33,8>,,text1,6
mcall ,<85,8>,,text2,9
mcall ,<8,28>,,tdec,4
add ebx,23
mov edx,thex
mcall
mcall ,,,thex
mov ecx,[keyid]
mov eax,47
mov ebx,3*65536
mov edx,40*65536+8
mov esi,0x224466
mcall
movzx ecx,byte [keyid]
mcall 47,0x30000,,<40,28>,0x224466
add edx,23
mov bh,1
mcall
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mov bh,0
movzx ecx,byte [scan_keyid]
mcall ,,,<100,28>
add edx,23
mov bh,1
mcall
; function 12:tell os about windowdraw ; 2, end of draw
mcall 12,2
ret
; DATA AREA
text1: db 'ASCII:'
text2: db 'SCANCODE:'
tdec: db 'DEC:'
thex: db 'HEX:'
title db 'KEYBOARD ASCIICODES-PRESS ANY KEY',0
keyid: db 0
title: db 'KEYBOARD ASCIICODES-PRESS ANY KEY',0
I_END:
keyid: rb 1
scan_keyid: rb 1