China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 06:57
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Seeking help with DOS extended 8253 timer interrupt? View 1,640 Replies 1
Original Poster Posted 2008-04-02 12:37 ·  中国 浙江 台州 椒江区 电信
新手上路
Credits 14
Posts 6
Joined 2007-04-24 11:53
19-year member
UID 86302
Gender Male
Status Offline
Why can't the interrupt respond in this program? Which expert can help me solve it, my 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)÷

// Variables used by the spindle
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);
......//Output pulse signals to the IO port
outportb(0x20, 0x20);

enable();
}

void main(void)
{
outportb(0x3eb, 3);

outportb(0x21, 0);

setvect(11, XMotorInt);

SetXMotTimer(1000);

getch();

return;
}
Floor 2 Posted 2008-08-15 22:57 ·  中国 上海 联通
新手上路
Credits 6
Posts 2
Joined 2008-08-15 20:24
17-year member
UID 123294
Gender Male
Status Offline
I'm also encountering a problem similar to the poster's. May I ask how the poster finally solved it?
Forum Jump: