Hello. I'm trying to make a keylogger that logs characters that user inputs in any program in DOS.I have two interrupt routines:
1. INT 60h - At the moment I read characters using BIOS call int 16h. I save characters in a buffer.
2. INT 1Ch - every 20 iterations ( ~1sec ) I check if any characters have been input and save them to a previously opened file, if needed.
It works as long as program is running (as long as I'm running the first routine as "main" - looping it). But when I attempt to actually modify the vector table on int60 and leave using int 27h, it stops working because (I guess) the read "function" is a blocking call. By stops working I mean the program returns to DOS and stops responding to user input while the underscore is blinking. I'm pretty sure my code is good, since I tested it several times, but I can still post it if needed.
The question is if its somehow possible to read input in a non blocking call? I tried using int 21h and checking stdin input status, but the problem remains. I think I'm missing the big picture here. When should my read character interrupt routine be called? And by who? I can't call it from my timer routine since it's not reentrant.
Btw. yes this is a school project and I'm not asking for any code, just a tip or two.
Thanks in advance,
Spectre