delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/02/15:15:15

Message-ID: <354B6FA9.FD0599B3@sobieski.ml.org>
Date: Sat, 02 May 1998 21:10:33 +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 ?

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 <dpmi.h>
#include <go32.h>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019