Problem with INT21h/AH=06h in WinXP (Developers)
RayeR complained that under WinXP does not work the keyboard input in Blocek 1.73.
I found that it is true.
For now please try this exacutable.
What is wrong?
I made a change in the non-rezident part of the keyboard handler. Previous versions used the INT 21h/AH=07h for getting the ASCII value from keyboard.
Later I changed to INT 21h/AH=06h/DL=255 because it worked much better for key combinations like CTRL-ALT-arrow.
Do you have some idea in you look at the code below?
(* {WORKS NICE BUT NOT UNDER WIN XP}
mov bh,255
@again:
mov ax,0600h
mov dl,0ffh
inc bh {in the first pass changes to 0, then to 1}
int 21h
jz @nochar {RBIL says that if the char is not ready, then AL=0 and ZF=1}
cmp al,0
jz @again
@nochar:
mov ah,bh
mov dos_ascii,ax
*)
{WORKS UNDER WIN XP BUT HAS PROBLEM WITH SOME KEY COMBINATIONS}
mov AX,$0700
int $21
or AL,AL {here ekvivalent to "cmp al,0"}
jnz @haveit {AL<>0? We are done, go to end}
int $21 {AL=0? call INT once again (in AH is stil $07)}
mov AH,1 {store 1 to AH (marker for extended key)}
jmp @finished {done}
@haveit:
xor AH,AH {AH=0 (normal, not extended key)}
@finished:
mov dos_ascii,ax
---
DOS-u-akbar!
Complete thread:
- Problem with INT21h/AH=06h in WinXP - Laaca, 11.06.2023, 08:53 (Developers)
- Problem with INT21h/AH=06h in WinXP - alexfru, 11.06.2023, 18:05
- Problem with INT21h/AH=06h in WinXP - Laaca, 11.06.2023, 21:40
- Problem with INT21h/AH=06h in WinXP - RayeR, 13.06.2023, 02:53
- Problem with INT21h/AH=06h in WinXP - Laaca, 13.06.2023, 11:40
- Problem with INT21h/AH=06h in WinXP - RayeR, 13.06.2023, 13:30
- Problem with INT21h/AH=06h in WinXP - Laaca, 13.06.2023, 11:40
- Problem with INT21h/AH=06h in WinXP - RayeR, 13.06.2023, 02:53
- Problem with INT21h/AH=06h in WinXP - Laaca, 11.06.2023, 21:40
- Problem with INT21h/AH=06h in WinXP - alexfru, 11.06.2023, 18:05