Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Problem with INT21h/AH=06h in WinXP (Developers)

posted by alexfru, USA, 11.06.2023, 18:05

> 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 don't know what you mean by "does not work" but I know one oddity that relates to keyboard handling in the same environment...

If your DOS program is checking for keyboard input too often (via BIOS or DOS service interrupt) in a loop while also trying to do something useful in that same loop, Windows may decide that the program isn't doing anything else but waiting. Windows will then stop executing the program until there's keyboard input available. This will appear as if the program is hung.

One possible way of fixing this is installing a chained ISR on the keyboard interrupt to set a global variable/flag to 1. Then the loop should look at the global variable/flag instead of calling the BIOS/DOS to see if there's any input. If the program sees the flag as non-zero, it should clear it to let the ISR set it to 1 again.

Alex

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 50 users online (0 registered, 50 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum