Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 485 → Rev 484

/programs/develop/scancode/trunk/scancode.asm
5,7 → 5,7
;
 
include "lang.inc"
include "..\..\..\macros.inc"
include "macros.inc"
 
use32
org 0x0
23,20 → 23,13
mov eax,66 ; keyboard mode definitions
mov ebx,1 ; set
mov ecx,1 ; return scancodes
mcall
int 0x40
 
mov eax,26 ; get setup for keyboard
mov ebx,2
mov ecx,1 ; base keymap
mov edx,keymap
mcall
 
mov eax, 48 ; GET SYSTEM COLORS
mov ebx, 3
mov ecx, sc
mov edx, sizeof.system_colors
mcall
 
int 0x40
red:
call draw_window
 
43,7 → 36,7
still:
 
mov eax,10 ; wait here for event
mcall
int 0x40
 
cmp eax,1 ; redraw request ?
je red
57,7 → 50,7
 
key: ; key
mov eax,2 ; just read it and ignore
mcall
int 0x40
 
mov esi,scan_codes+1
mov edi,scan_codes+0
142,7 → 135,7
 
button: ; button
or eax, -1 ; close this program
mcall
int 0x40
 
 
 
154,10 → 147,15
 
draw_window:
 
mov eax, 48 ; GET SYSTEM COLORS
mov ebx, 3
mov ecx, sc
mov edx, sizeof.system_colors
int 0x40
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw
mcall
int 0x40
 
; DRAW WINDOW
mov eax, 0 ; function 0 : define and draw window
165,8 → 163,8
mov ecx, 100*65536+275 ; [y start] *65536 + [y size]
mov edx, [sc.work] ; color of work area RRGGBB,8->color gl
or edx, 0x33000000
mov edi, title ; WINDOW LABEL
mcall
mov edi, header ; WINDOW LABEL
int 0x40
mov eax, 4
mov ebx, 15*65536+10
173,13 → 171,13
xor ecx, ecx
mov edx, text
mov esi, text.len
mcall
int 0x40
 
call draw_codes
 
mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw
mcall
int 0x40
 
ret
 
199,7 → 197,7
mov eax,13 ; filled rectangle
mov ebx,15*65536+160
mov edx,[sc.work]
mcall
int 0x40
popa
pusha
mov ebx,edx
210,10 → 208,10
imul edi,12
add edx,edi
mov esi,12
mcall
int 0x40
popa
movzx ecx,byte [scan_codes+edi]
mcall ; number
int 0x40 ; number
inc ecx
add edx,12
inc edi
293,13 → 291,13
db '‘—ˆ’›‚€ž „€›… ‘ Š‹€‚ˆ€’“›'
.len = $ - text
 
title db '‘Š€ŠŽ„› Š‹€‚ˆ€’“›',0
header db '‘Š€ŠŽ„› Š‹€‚ˆ€’“›',0
else
text:
db 'READING RAW SCANCODE DATA'
.len = $ - text
 
title db 'KEYBOARD SCANCODES',0
header db 'KEYBOARD SCANCODES',0
end if
 
ext db 0x0