Date: Tue, 26 Sep 2000 17:59:28 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: computerboy cc: djgpp AT delorie DOT com Subject: Re: how hook int 21h from protect mode! In-Reply-To: <20000914025420.6116.qmail@sina.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 14 Sep 2000, computerboy wrote: > hi, please help me , I'm new for djgpp, I want hook real mode int 21h > at protect mode , I use a source from mailing list - test.c, but > my pc hung, call_dos() seem reenter! can u give a simple and complete > code for hook 21h! [snip] > >static > >void call_dos(_go32_dpmi_registers *r) > >{ > > r->x.cs = old_int21_vector.rm_segment; > > r->x.ip = old_int21_vector.rm_offset; > > _go32_dpmi_simulate_fcall_iret(r); > >} This function should zero r->x.ss, r->x.sp, and r->x.flags, before calling _go32_dpmi_simulate_fcall_iret.