Just started to get in touch with DOS. Since the requirement is that the I/O port of the industrial control computer sends a square wave of 1K - 10K, which cannot be realized under Windows, so I switched to DOS 7.1 (downloaded from the forum, thank you very much), and plan to use the timer of 8253 to do it.
I read a few examples, but I just don't know how to jump into this 8253 interrupt. The current test program is so long. Please help the master to answer and see what is missing.
#include "dos.h"
void interrupt intp()
{
enable();
}
void main()
{
disable();
outportb(0x43, 0x11); // Select 8253 counter 0, work in mode 0
outportb(0x40, 50); // Is to set the count initial value to 50
enable();
}
I read a few examples, but I just don't know how to jump into this 8253 interrupt. The current test program is so long. Please help the master to answer and see what is missing.
#include "dos.h"
void interrupt intp()
{
enable();
}
void main()
{
disable();
outportb(0x43, 0x11); // Select 8253 counter 0, work in mode 0
outportb(0x40, 50); // Is to set the count initial value to 50
enable();
}
