Mail Archives: djgpp-workers/2001/12/11/22:10:35
> How about if we pass something special in _stubinfo->basename? Like
> "<v2load>", for example? ....
Triggered memories of differences. Sure enough, I set the stubinfo size
to a truncated value (0x44) when v2load'ing. We could use this to
decide, since the real stub has never used a stubinfo this short (at
least not since pre-beta 2.00 development... This requires no changes
to v2load or go32-v2, small change to dpmiexcp.
If testing is OK will commit for both v2_03_1 and CVS.
void __maybe_fix_w2k_ntvdm_bug(void)
{
if (_osmajor == 5 && _get_dos_version(1) == 0x532) /* Windows NT, 2000 or XP
{
+ if(_stubinfo->size < STUBINFO_END) /* V2load'ed image, stubinfo PSP bad */
+
+ /* Protected mode call to SetPSP - uses BX from GetPSP (0x51) */
+ asm volatile("movb $0x51, %%ah \n\
+ int $0x21 \n\
+ movb $0x50, %%ah \n\
+ int $0x21 "
+ : : : "ax", "bx" ); /* output, input, regs */
+ else
+
/* Protected mode call to SetPSP - may destroy RM PSP if not extended */
asm volatile("movw %0, %%bx \n\
- Raw text -