Board logo

标题: DOS扩展8253定时器中断求助? [打印本页]

作者: zhb1284     时间: 2008-4-2 12:37    标题: DOS扩展8253定时器中断求助?
这段程序为什么中断会响应不了呢?哪位大侠能帮我解决一下,我的QQ:19684802,Email:zhanghuaben@yahoo.cn #include "graphics.h" #include "stdio.h" #include "fcntl.h" #include "stdlib.h" #include "alloc.h" #include "stdlib.h" #include "dos.h" #define LOW_BYTE(n) (n&0x00ff) #define HI_BYTE(n) ((n>>8)&0x00ff)÷ // 主轴使用的变量 union{ unsigned int b; unsigned char d[2]; }MAxisCnt; void SetXMotTimer(unsigned count) { outportb(0x3e7, 0xb0); outportb(0x3e6, LOW_BYTE(count)); outportb(0x3e6, HI_BYTE(count)); } void interrupt XMotorInt(void) { disable(); SetXMotTimer(1000); ......//向IO口输出脉冲信号 outportb(0x20, 0x20); enable(); } void main(void) { outportb(0x3eb, 3); outportb(0x21, 0); setvect(11, XMotorInt); SetXMotTimer(1000); getch(); return; }

作者: sun51     时间: 2008-8-15 22:57
我现在也遇到和楼主相似的问题啊,请问楼主最后怎么解决了?