Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Threading in MS DOS 7.1

Name: Anonymous 2011-03-17 17:01

I have here an old laptop and intend to send/receive data on the parallel port in set time intervals (20 kHz max).
The laptop has MS DOS 7.1 installed, as well as Turbo C. Is it possible to create threads in DOS via some lib, and if not, how would I implement ISRs in C? So far I have only done this in assembler, and I'm not quite sure how exactly to mix C and assembler without breaking everything.

I could install TinyCore, but I kinda want to keep MS DOS so I can play Commander Keen.

Name: Anonymous 2011-03-17 20:53

>>10
I just need to call a function every 50µs (i.e. 20kHz).That's quite fast. What I would do is determine the CPU's speed then see how many ticks are in one second, then adjust that to your requirements. I would say to hook interrupt 8 or 1C, but by default those are called only every 18.2 times per second, which is much slower than your need, which means you'll need to program the timer, read http://wiki.osdev.org/Programmable_Interval_Timer for information on how to do this.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List