Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

hot dos (Developers)

posted by kerravon E-mail, Sydney, Free World South, 10.05.2025, 14:40

> > If there is no timer to save the day, then if I do a
> > BIOS request to see if there is a keystroke pending,
> > and then do a HLT if I have nothing, well - the
> > keystroke may have come in and been processed just
> > before I did the HLT. In which case the system will
> > hang waiting for an interrupt that will never come.
>
> That’s an interesting observation, and I think that the CPU would have a
> brief grace time immediately after the return of an ISR, during which it
> would not enter the halted state.

But the code in the interrupt routine itself may
have checked to see if there is any keystrokes in
the queue, and if no, it does (some instructions)
before returning to the caller (DOS 4.0).

And during those (some instructions) the keyboard
may have been hit, the interrupt processed, the
key is now in the buffer, ready for next time I
call the "is keyboard hit?" bios interrupt.

But neither the "is keyboard hit?" routine, nor
DOS 4.0, is aware that that has just happened.

So the hlt is executed, and we wait forever, just
as the user waits forever.

Unless there happens to be a timer interrupt to
save the day. (which I don't think, logically,
we should be dependent on to save the day).

 

Complete thread:

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