![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-20 05:38 |
47,814 topics / 349,908 posts / today 0 new / 48,259 members |
| DOS开发编程 & 发展交流 (开发室) » Interrupt of 8253 Timer under Turbo C 3.0 |
| Printable Version 2,008 / 1 |
| Floor1 zzq1986 | Posted 2010-03-28 11:00 |
| 新手上路 Posts 3 Credits 8 | |
|
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(); } |
|
| Floor2 zzq1986 | Posted 2010-03-28 11:25 |
| 新手上路 Posts 3 Credits 8 | |
|
Or I'm looking for a source code for controlling the speaker using interrupts in Turbo C. Little brother is very grateful here
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |