Mail Archives: djgpp/2000/03/03/11:22:52
In article <89oirc$r5k$1 AT nx6 DOT HRZ DOT Uni-Dortmund DOT DE>,
kuemmler AT fred DOT physik DOT uni-dortmund DOT de says...
>
>Hello !
>
>I have got problems getting something to compile under Windows 2000 ! Rhide
>dies and NTVDM (or whatever) is generating a "core dump". I already read
>about this problem on this newsgroup. Has anybody found a fix for it ?
I suggested a possible fix on djgpp workers but
I will send it here also as apparently noone tested it really until now.
The diff below applies to crt0.S in src/libc/crt0 directory
compiling it will generate a new crt0.o file that you should place in the DJGPP
lib directory.
After this you would need to recompile Rhide
(which is a rather lengthy thing to do !)
and test if you get the same problems with this patch crt0.o file.
The only difference is that the patch keeps interrupts disabled
until the __djgpp_ds_alias base address is fixed after a UNIXY sbrk.
This patch solved instability problems for the FP editor which is
an equivalent of Rhide for Free Pascal.
(Without the patch we had blue screens and no more after,
but it was not only for Windows2000, even if apparently the
unstability was more visible there and on Win 98!)
I can give no warranty that this will improove anything !
*** crt0ori.S Wed Aug 11 02:24:38 1999
--- crt0.S Fri Mar 3 15:55:32 2000
***************
*** 2,7 ****
--- 2,9 ----
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
+ /* Modified to fix the problem of sbrk16 if a RMCB is active
+ like a mouse callback by Pierre Muller */
/*****************************************************************************\
* Interface to 32-bit executable (from stub.asm)
*
***************
*** 38,43 ****
--- 40,53 ----
#include "sbrk16.ah"
sbrk16_last_byte:
+ /* new data used to store the interrupt state before calling
+ sbrk16 code
+ This is necessary because the interrupt must stay
+ disabled until ___djgpp_ds_alias base address
+ is changed PM */
+ sbrk16_interrupt_state:
+ .long 0x902
+
sbrk16_api_ofs:
.long 0
sbrk16_api_seg:
***************
*** 453,465 ****
movw $0x0900, %ax /* disable
interrupts */
int $0x31
! pushl %eax
lcall sbrk16_api_ofs
setc %dl /* Save carry
*/
! popl %eax /* restore interrupts
*/
! int $0x31
test %dl,%dl
popl %edx
--- 463,480 ----
movw $0x0900, %ax /* disable
interrupts */
int $0x31
! /* pushl %eax restoring is postponed
! we need to store the result into data PM */
! movl %eax,sbrk16_interrupt_state
lcall sbrk16_api_ofs
setc %dl /* Save carry
*/
! /* This must be postponed to
! after ___djgpp_ds_alias base is changed also
! otherwise you get crashs in RMCB PM */
! /* popl %eax restore interrupts
! int $0x31 */
test %dl,%dl
popl %edx
***************
*** 552,557 ****
--- 567,576 ----
movw ___djgpp_base_address+2, %cx
int $0x31
+ /* Now we can reenable interrupts PM */
+ movl sbrk16_interrupt_state,%eax
+ int $0x31
+
movl ___djgpp_selector_limit, %edx
12: incl %edx /* Size not
limit */
testb $0x60, __crt0_startup_flags /* include/crt0.h */
- Raw text -