Mail Archives: djgpp-workers/1999/02/18/11:59:29
Here's a patch that allows to pass FLAGS back to real mode. (The rest
of TLC required by gormcb.c will have to wait for now.) The diffs are
preceded by a suitable "What's new" entry.
-------------------------------------------------------------------
Real-mode callbacks set up by
@code{_go32_dpmi_allocate_real_mode_callback_iret} no longer overwrite
the @code{flags} member of the @code{__dpmi_regs} struct passed to the
user-defined interrupt handler. Thus, you can now install handlers
which set/reset bits in the @code{flags}, and these changes will be
passed back to real mode.
@findex _go32_dpmi_allocate_real_mode_callback_iret
*** src/libc/go32/gormcb.c~0 Sun Jun 28 22:18:54 1998
--- src/libc/go32/gormcb.c Thu Feb 18 18:35:52 1999
*************** static unsigned char wrapper_retf[] = {
*** 74,81 ****
--- 74,86 ----
};
static unsigned char wrapper_iret[] = {
+ #if 0
+ /* This overwrote the FLAGS in the real-mode call structure with
+ their original value, thus making it impossible for the user's
+ RMCB to change FLAGS (e.g., to set/reset the carry bit). */
0x66, 0x8b, 0x46, 0x04, /* mov ax,[esi+4] */
0x66, 0x26, 0x89, 0x47, 0x20, /* mov es:[edi+32],ax */
+ #endif
0x66, 0x26, 0x83, 0x47, 0x2e, 0x06, /* add es:[edi+46],0x6 */
0xcf /* iret */
};
- Raw text -