Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

And now: int 0x21 in hw interrupt handler? (Developers)

posted by bretjohn Homepage E-mail, Rio Rancho, NM, 15.12.2012, 01:29

> The only thing I can think of is busy waiting for a flag toggled in the IRQ
> handler. Is there anything else I can do?

As Japheth and Tom have both eluded to, trying to call INT 21h from inside an IRQ handler is a REALLY bad idea. Sometimes it's possible, and sometimes it's not. You really shouldn't even try unless you have no other choice.

Japheth's suggestion is probably the easiest to implement. You just need some kind of a memory buffer, though it doesn't necessarily need to be in XMS. You need to have one process that reads the file when it's safe to do (definitely not from inside an IRQ handler), and puts data into the buffer. As a separate process, you extract data from the buffer in the IRQ handler. Obviously, you need some sort of "communication" between the two (independent) processes to manage the buffer.

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum