Mail Archives: djgpp/1998/05/02/15:14:44
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 -