CoyBit
CoyBit

Reputation: 1622

Call Int 13h in a ISR

I have written a ISR for int 9h by assembly in Real Mode. In this ISR, I call INT 13h, AH=0x02 for writing some data on Hard Disk. But data aren't written on Hard Disk. Also int 13h, ah=0x02 doesn't work too (Read data from Hard Disk). after call int 13h, Carry Flag is On, but AH and AL are zero. When I use this code out of ISR, it's work! Why INT13h in a ISR doesn't work, but other interrupt, for example INT10h work correctly?

Upvotes: 2

Views: 398

Answers (1)

Mike Gonta
Mike Gonta

Reputation: 654

The simple answer is thatint 13hwill not complete successfully without the hard drive hardware interrupt IRQ 5 -int 0Dhwhich will not occur until the PIC is acknowleged at the end of keyboard hardware interrupt IRQ 1 -int 9h.

The happy answer is that it is much simpler to use int 16h ah=0 to wait for a keypress.

Upvotes: 2

Related Questions