And now: int 0x21 in hw interrupt handler? (Developers)
> 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:
- Basics of interrupt chaining? - myrkraverk, 13.12.2012, 19:39 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Basics of interrupt chaining? - myrkraverk, 13.12.2012, 20:19
- Basics of interrupt chaining? - Japheth, 13.12.2012, 21:31
- And now: int 0x21 in hw interrupt handler? - myrkraverk, 14.12.2012, 02:58
- And now: int 0x21 in hw interrupt handler? - Japheth, 14.12.2012, 06:10
- And now: int 0x21 in hw interrupt handler? - tom, 14.12.2012, 18:25
- And now: int 0x21 in hw interrupt handler? - bretjohn, 15.12.2012, 01:29
- And now: int 0x21 in hw interrupt handler? - myrkraverk, 15.12.2012, 15:52
- And now: int 0x21 in hw interrupt handler? - bretjohn, 17.12.2012, 18:08
- And now: int 0x21 in hw interrupt handler? - myrkraverk, 18.12.2012, 20:16
- And now: int 0x21 in hw interrupt handler? - tom, 19.12.2012, 15:54
- And now: int 0x21 in hw interrupt handler? - myrkraverk, 18.12.2012, 20:16
- And now: int 0x21 in hw interrupt handler? - bretjohn, 17.12.2012, 18:08
- And now: int 0x21 in hw interrupt handler? - myrkraverk, 15.12.2012, 15:52
- And now: int 0x21 in hw interrupt handler? - myrkraverk, 14.12.2012, 02:58
- Basics of interrupt chaining? - bretjohn, 14.12.2012, 19:43
Mix view