delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/05/26/20:12:17

Date: Fri, 26 May 1995 19:13:19 -0400
From: dj (DJ Delorie)
To: crigler AT sol DOT cms DOT uncwil DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: What's wrong with this code?

>        _go32_dpmi_set_real_mode_interrupt_vector(0x63, &info);
>        system("myprog.exe");
>        _go32_dpmi_set_real_mode_interrupt_vector(0x63, &old_vector);
>        _go32_dpmi_free_real_mode_callback(&info);
>      }
> 
> myprog.exe crashes when it does the int 0x63.

When you call system(), your program is paged out to memory.  It
doesn't exist in the system.  You are, effectively, asking to jump to
nothing.

go32 restores the interrupt vector table to the original values when
it system()s for you, and sets it back afterwards, since it knows that
you can't possibly service the interrupts.

In V2, this doesn't happen, and you should be able to do what you
want.

- Raw text -


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