开发者

Call Int 13h in a ISR

开发者 https://www.devze.com 2023-04-04 21:56 出处:网络
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

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 开发者_如何学JAVAuse this code out of ISR, it's work! Why INT13h in a ISR doesn't work, but other interrupt, for example INT10h work correctly?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号