forked from KolibriOS/kolibrios
keyboard.inc: deleted obsolete code for Alt+arrows
sys32.inc: small bugfix (IRQ reservation free) @numcalc: sources added git-svn-id: svn://kolibrios.org@118 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5638fe22ff
commit
d99e3ea921
@ -879,7 +879,7 @@ terminate: ; terminate application
|
|||||||
|
|
||||||
push esi ; remove hd1 & cd & flp reservation
|
push esi ; remove hd1 & cd & flp reservation
|
||||||
shl esi, 5
|
shl esi, 5
|
||||||
mov esi, [esi+0x3004]
|
mov esi, [esi+0x3000+TASKDATA.pid]
|
||||||
cmp [hd1_status], esi
|
cmp [hd1_status], esi
|
||||||
jnz @f
|
jnz @f
|
||||||
mov [hd1_status], 0
|
mov [hd1_status], 0
|
||||||
@ -897,7 +897,7 @@ terminate: ; terminate application
|
|||||||
pusha ; remove all irq reservations
|
pusha ; remove all irq reservations
|
||||||
mov eax,esi
|
mov eax,esi
|
||||||
shl eax, 5
|
shl eax, 5
|
||||||
mov eax,[edx+0x3000+TASKDATA.pid]
|
mov eax,[eax+0x3000+TASKDATA.pid]
|
||||||
mov edi,irq_owner
|
mov edi,irq_owner
|
||||||
mov ecx,16
|
mov ecx,16
|
||||||
newirqfree:
|
newirqfree:
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -189,38 +189,6 @@ irq1:
|
|||||||
@@: test dl,VKEY_ALT ; alt on ?
|
@@: test dl,VKEY_ALT ; alt on ?
|
||||||
jz @f
|
jz @f
|
||||||
mov bl,[keymap_alt+eax]
|
mov bl,[keymap_alt+eax]
|
||||||
; alt mouse ?
|
|
||||||
xor edx,edx
|
|
||||||
cmp bl,178
|
|
||||||
jnz .no_alt.up
|
|
||||||
mov edx,5*65536
|
|
||||||
jmp .mouse.change
|
|
||||||
.no_alt.up:
|
|
||||||
cmp bl,177
|
|
||||||
jnz .no_alt.down
|
|
||||||
mov edx,251*65536
|
|
||||||
jmp .mouse.change
|
|
||||||
.no_alt.down:
|
|
||||||
cmp bl,176
|
|
||||||
jnz .no_alt.left
|
|
||||||
mov edx,251*256
|
|
||||||
jmp .mouse.change
|
|
||||||
.no_alt.left:
|
|
||||||
cmp bl,179
|
|
||||||
jnz .no_alt.right
|
|
||||||
mov edx,5*256
|
|
||||||
jmp .mouse.change
|
|
||||||
.no_alt.right:
|
|
||||||
cmp bl,' '
|
|
||||||
jne @f
|
|
||||||
xor [altmouseb],1
|
|
||||||
.mouse.change:
|
|
||||||
mov byte[0xF604],1; ps2 data
|
|
||||||
mov byte[0xFB00],0; ps2 chunk count
|
|
||||||
mov word[0x2E0000+4096*12],3; mouse data count
|
|
||||||
mov dl,[altmouseb]
|
|
||||||
mov [0x2E0000+4096*12+0x10],edx
|
|
||||||
mov bl,0
|
|
||||||
@@:
|
@@:
|
||||||
mov bh, 0
|
mov bh, 0
|
||||||
jmp .writekey
|
jmp .writekey
|
||||||
|
49
programs/demos/numcalc/trunk/@numcalc.asm
Executable file
49
programs/demos/numcalc/trunk/@numcalc.asm
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
use32
|
||||||
|
db 'MENUET01'
|
||||||
|
dd 1
|
||||||
|
dd start
|
||||||
|
dd i_end
|
||||||
|
dd mem
|
||||||
|
dd mem
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
|
||||||
|
start:
|
||||||
|
push 66
|
||||||
|
pop eax
|
||||||
|
push 4
|
||||||
|
pop ebx
|
||||||
|
mov cl, 45h ; NumLock scancode
|
||||||
|
xor edx, edx
|
||||||
|
int 40h
|
||||||
|
mov al, 40 ; старшие биты уже обнулены
|
||||||
|
mov bl, 2 ; старшие биты уже обнулены
|
||||||
|
int 40h
|
||||||
|
event:
|
||||||
|
push 10
|
||||||
|
pop eax
|
||||||
|
int 40h
|
||||||
|
; у нас может быть только одно событие - нажата клавиша
|
||||||
|
mov al, 2
|
||||||
|
int 40h
|
||||||
|
cmp al, 2
|
||||||
|
jnz event
|
||||||
|
; у нас есть только одна горячая клавиша
|
||||||
|
push 70
|
||||||
|
pop eax
|
||||||
|
mov ebx, fileinfo
|
||||||
|
int 40h
|
||||||
|
jmp event
|
||||||
|
|
||||||
|
fileinfo:
|
||||||
|
dd 7
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
dd 0
|
||||||
|
db '/rd/1/calc',0
|
||||||
|
|
||||||
|
i_end:
|
||||||
|
align 16
|
||||||
|
rb 16
|
||||||
|
mem:
|
2
programs/demos/numcalc/trunk/build.bat
Normal file
2
programs/demos/numcalc/trunk/build.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
@fasm @numcalc.asm @numcalc
|
||||||
|
@pause
|
Loading…
Reference in New Issue
Block a user