Date: Mon, 21 Mar 1994 07:34:12 -0600 (CST) From: "Erik Johnson" Sender: johnson AT cdsmn To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Timers (again) and also MIDI I need a little help getting a high resolution timer working under DJGPP. I have some real mode source for setting timers (timer 0 and timer 2), and also have played around with the timer.c source in samples\dpmi. In the real mode code, they crank up timer 0 and call the original handler at the same old 18.whatever frequency. I would like to do the same under DJGPP. By doing an outportb(0x43,0x36) outportb(0x40,low) outportb(0x40,hi), I have been able to increase the timer's speed, however, the system clock advances far too much because I am chaining the interrupt. If I try to use the set_protected_mode_interrupt instead of the chain_interrupt, my routine gets called only once (I preserve all registers, and return with an IRET). Must I somehow signify that I am done and the interrupt was a success? The real mode code had to read the value at address 0x20 and then outport it back again. Can I set up timer 2? Does it exist in protected mode? Has anyone written routines under djgpp for communicating with the MIDI port on a soundblaster? Thank you, Erik Johnson