挂钩诠释09H中断 [英] Hooking Int 09h interrupt

查看:391
本文介绍了挂钩诠释09H中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题挂钩INT 09H我已经改变了指向我的新的ISR,如果我在调试窗口,中断触发每次我推一个关键的时间。但在VMWare似乎只有被触发一次,并没有更多的。我在DOS 6.22测试情况一模一样。

I have a problem hooking int 09h I've changed the pointer to my new Isr, if I debug on windows, the interrupt is triggered every time I push a key. But in VMWare it seems that only is triggered one time and no more. I've tested in DOS 6.22 and happens exactly the same.

我的code是这样的:

My code look like this:


MyIsr:
PUSHA
PUSHF
;告诉中断已完成PIC
MOV人,0x20的
出为0x20,人
POPF
波帕
IRET

如果我使用USB键盘可我发送相同的命令,像PS / 2?

If I use a USB keyboard can I send the same commands like Ps/2?

推荐答案

有可能是一些问题在这里,因为你还没有贴$ C $的c您正在编写一个完整视图。能否请您解释一下您是绑来完成什么?

There could be a number of issues here, as you haven't posted a complete view of the code you are writing. Could you please explain exactly what you are tying to accomplish?

如果一个ISR被调用并没有被处理,你将无法做任何事情,所以记住这一点。您的问题可能与你是如何在中断向量表安装ISR。

If an ISR is called and not handled, you won't be able to do anything, so keep this in mind. Your problem may be related to how you are installing the ISR in the interrupt vector table.


  • 在实模式下,你跟INT 21H做到这一点,AH = 25H

  • 在保护模式下,DJGPP下,你需要使用一个DPMI功能(使用INT 21H功能,或者使用C函数。见的<​​a href =htt​​p://www.delorie.com/djgpp/doc/libc /libc_199.html相对=nofollow> DPMI文档

  • 锁定下来PM运行时也需要,因为内存可以得到换出为ISR内存(需要使用此中断服务程序,因为我们真的不知道什么时候会运行)。

无论如何,你应该ISR看起来更像以下内容:

Regardless, your ISR should look more like the following:

newInt9:

enter 0,0
push eax

in al, 60h
mov [raw_key], al

mov al, 20h
out 20h, al

pop eax
leave
iret     

ENDPROC

;endproc

这篇关于挂钩诠释09H中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆