delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/14/08:13:18

Date: Tue, 14 May 1996 13:47:55 GMT
Message-Id: <199605141347.NAA04595@teaser.teaser.fr>
Mime-Version: 1.0
To: djgpp AT delorie DOT com
From: Michael Duval <mduval AT teaser DOT fr>
Subject: Re: Interrupt Handler
Cc: ralf DOT suessbrich AT nuernberg DOT netsurf DOT de

On Tue, 14 May 1996, Ralf Suessbrich wrote:

> My proggi compiles fine, but when i am running it,
>i get only one sound (when i press serveral keys on the keyboard).
> After 20 seconds it comes back to a dos prompt, but something went
> wrong with restoring the old vector: the keyboard is still out of 
> function.

Try this :

main () {
	_go32_dpmi_seginfo old_handler, my_handler;

	printf ("Getting old I-Vector !\n");
	_go32_dpmi_get_protected_mode_interrupt_vector (9, &old_handler);

	my_handler.pm_offset = (int) keyb_handler;
//******Add this line \/
	my_handler.pm_selector = _go32_my_cs();
//******Delete this line \/
//******_go32_dpmi_allocate_iret_wrapper (&my_handler);

	printf("\nSeting new I-Vector !");
//******And change _go32_dpmi_set... with _go32_dpmi_chain...
	_go32_dpmi_chain_protected_mode_interrupt_vector (9, &my_handler);

	printf("\nDONE !!\n\nWaiting now 20 seconds for testing.\n");
	sleep (20);
	_go32_dpmi_set_protected_mode_interrupt_vector (9, &old_handler);

	printf("\n\nOld I-Vector restored ;)\nEnd");
	return 0;
}

For the solution, just read help file for _go32_dpmi_set... with INFO ;)

Bye

******************
 Michael Duval
 mduval AT teaser DOT fr
******************

P.S. : Sorry for my faults but i only learn (very little!) english at school !

- Raw text -


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