![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-10-31 12:23 |
共 47,815 主题排行 / 349,930 发帖 / 今日 0 篇 / 48,290 会员排行 |
| DOS开发编程 & 发展交流 (开发室) » DOS扩展8253定时器中断求助? |
| 可打印版本 1,769 / 1 |
| 第1楼 zhb1284 | 发表于 2008-04-02 12:37 |
| 新手上路 发帖 6 积分 14 | |
|
DOS扩展8253定时器中断求助? 这段程序为什么中断会响应不了呢?哪位大侠能帮我解决一下,我的QQ:19684802,Email:[email protected]
#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; } |
|
| 第2楼 sun51 | 发表于 2008-08-15 22:57 |
| 新手上路 发帖 2 积分 6 | |
|
我现在也遇到和楼主相似的问题啊,请问楼主最后怎么解决了?
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |