Message-ID: <354B6F84.1E5284E8@sobieski.ml.org> Date: Sat, 02 May 1998 21:09:56 +0200 From: Archee/CoNTRACT <01dsolt AT sobieski DOT ml DOT org> Reply-To: soltesz AT hotmail DOT com Organization: School MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: cwsdpmi+timers ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk hi ! I have a big problame with DJGPP (cwsdpmi) I cannot write a timer IRQ to increase a clock variable. My routines work under win95, but not under poor DOS7.0 If I use the MIDAS SOUND systems timer, I dont have any problame, but I use Syntetic Audio system now. The clock variable is incremented for one time. But no more. Nasm code: EXTERN ___djgpp_ds_alias EXTERN _clock EXTERN _oldirq global _irqhandler _irqhandler: push ds push ax mov ax,[cs:___djgpp_ds_alias] mov ds,ax inc dword[_clock] ;db 0x9c ;call far [_oldirq] mov al,32 out 32,al pop ax pop ds sti iret DJGPP code: #include #include extern void irqhandler(); __dpmi_paddr oldirq; void installtimer() { __dpmi_paddr paddr; paddr.offset32=(long)irqhandler; paddr.selector=_my_cs(); __dpmi_get_protected_mode_interrupt_vector(8,&oldirq); __dpmi_set_protected_mode_interrupt_vector(8,&paddr); }; I have tried to make a counter with allegro, but I had the same problame. I have the same problame if I call the old IRQ handler. Please help archee