Hello.
I'm writing assembler resident program (next TSR) and I have problem now.
I catch 16h interruption but I don't know how to catch combination of keys (eg. Ctrl+Shift+S) into this handler.
May be I do it's wrong, but I couldn't imagine it better ...
Well, If someone knows how to solve this problem - please tell me, because it's very important for me ...
Below my code (it's only handler for 16h interrupt):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
;+======================================+
;| Catch combination of keys |
;+======================================+
INT16H_HANDLER PROC FAR
pushf ;save flags
cmp ah, 10h
je @playsound ;if it's need to me - yes !
jmp @baseirp ;no, gives it anyone
@playsound:
push ds ;save register
push dx ;save register
push cs ;save register
pop ds ;DS must point to CS
call PLAYSOUND ;play music
pop dx ;востанавливаем регистр
pop ds ;востанавливаем регистр
popf ;restore flags
IRET ;exit from interruption
@baseirp:
popf ;restore flags
jmp cs:OLD16H_HANDLER ;gives handler for system
;=========== Тут находятся данные
OLD16H_HANDLER DD 0 ;address of original handler
INT16H_HANDLER ENDP
| |
I use TASM 5.0 and I write for DOS.
General plan is following - program stayed in memory and if I pressed some combination of keys, will need to play some music ... All.
Program working apart from combination of keys ... :(
TIA.