How to catch tab on tab in x86 assembly?

I am working on a project in x86 assembly on Windows (MASM) and I need to grab tabs somehow, but I'm not sure how to do this in the assembly (I'm new to this).

I can get user input with int 21h, but as far as I can tell, it only works if the user enters data and then press enter.

I need a way for the user to press the tab key, it will run proc, and then from this proc I can deal with what should happen. Is there any way to do this?

+3
source share
2 answers

If I understood correctly, you can use:

mov ah,1 ; get char from keyboard

int 21h

cmp al, 9 ; 9 is ascii of tab

jnz Dont_Call

Call Proc_Name

Dont_Call:

(REST OF CODE)

+2
source

http://spike.scu.edu.au/~barry/interrupts.html#ah01

DOS INT 21h - DOS

AH = 01h - ,

: AL =

:

^ C/^
^ P EOS- DOS
^ Z , EOF, ,

. : AH = 06h, AH = 07h, AH = 08h, AH = 0Ah

+1

Source: https://habr.com/ru/post/1744979/


All Articles