From: sparky4 Date: Thu, 29 Sep 2016 18:29:32 +0000 (-0500) Subject: xms Works but it is quick and dirty and reliese on older C code with _REG defs and... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=b3e3a0878d3bbb4701207914aa4f41817589772e;p=16.git xms Works but it is quick and dirty and reliese on older C code with _REG defs and the Assembly translation is not smooth --- diff --git a/DEBUG.16W b/DEBUG.16W index 66a0f5a3..35c40cbf 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:9845 Owner:0x0 +Seg:0 Size:9844 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0 -Seg:2675 Size:256 Owner:0x18a8 +Seg:2674 Size:256 Owner:0x18a8 ++++ -Seg:27f1 Size:44 Owner:0x0 +Seg:27f0 Size:44 Owner:0x0 ++ -Seg:281d Size:256 Owner:0x1696 +Seg:281c Size:256 Owner:0x1696 ++++ -Seg:291d Size:256 Owner:0x1698 +Seg:291c Size:256 Owner:0x1698 ++++ -Seg:2a1d Size:256 Owner:0x169a +Seg:2a1c Size:256 Owner:0x169a ++++ -Seg:2b1d Size:256 Owner:0x169c +Seg:2b1c Size:256 Owner:0x169c +++++ -Seg:2c1d Size:256 Owner:0x169e +Seg:2c1c Size:256 Owner:0x169e ++++ -Seg:2d1d Size:256 Owner:0x16a0 +Seg:2d1c Size:256 Owner:0x16a0 ++++ -Seg:2e1d Size:256 Owner:0x16a2 +Seg:2e1c Size:256 Owner:0x16a2 ++++ -Seg:2f1d Size:256 Owner:0x16a4 +Seg:2f1c Size:256 Owner:0x16a4 ++++ -Seg:301d Size:256 Owner:0x16a6 +Seg:301c Size:256 Owner:0x16a6 +++++ -Seg:311d Size:256 Owner:0x16a8 +Seg:311c Size:256 Owner:0x16a8 ++++ -Seg:321d Size:256 Owner:0x16aa +Seg:321c Size:256 Owner:0x16aa ++++ -Seg:331d Size:256 Owner:0x16ac +Seg:331c Size:256 Owner:0x16ac ++++ -Seg:341d Size:256 Owner:0x16ae +Seg:341c Size:256 Owner:0x16ae ++++ -Seg:351d Size:256 Owner:0x16b0 +Seg:351c Size:256 Owner:0x16b0 +++++ -Seg:361d Size:256 Owner:0x16b2 +Seg:361c Size:256 Owner:0x16b2 ++++ -Seg:371d Size:256 Owner:0x16b4 +Seg:371c Size:256 Owner:0x16b4 ++++ -Seg:381d Size:256 Owner:0x16b6 +Seg:381c Size:256 Owner:0x16b6 ++++ -Seg:391d Size:256 Owner:0x16b8 +Seg:391c Size:256 Owner:0x16b8 ++++ -Seg:3a1d Size:256 Owner:0x16ba +Seg:3a1c Size:256 Owner:0x16ba +++++ -Seg:3b1d Size:256 Owner:0x16bc +Seg:3b1c Size:256 Owner:0x16bc ++++ -Seg:3c1d Size:256 Owner:0x16be +Seg:3c1c Size:256 Owner:0x16be ++++ -Seg:3d1d Size:256 Owner:0x16c0 +Seg:3d1c Size:256 Owner:0x16c0 ++++ -Seg:3e1d Size:256 Owner:0x16c2 +Seg:3e1c Size:256 Owner:0x16c2 ++++ -Seg:3f1d Size:256 Owner:0x16c4 +Seg:3f1c Size:256 Owner:0x16c4 +++++ -Seg:401d Size:256 Owner:0x16c6 +Seg:401c Size:256 Owner:0x16c6 ++++ -Seg:411d Size:256 Owner:0x16c8 +Seg:411c Size:256 Owner:0x16c8 ++++ -Seg:421d Size:256 Owner:0x16ca +Seg:421c Size:256 Owner:0x16ca ++++ -Seg:431d Size:256 Owner:0x16cc +Seg:431c Size:256 Owner:0x16cc ++++ -Seg:441d Size:256 Owner:0x16ce +Seg:441c Size:256 Owner:0x16ce +++++ -Seg:451d Size:256 Owner:0x16d0 +Seg:451c Size:256 Owner:0x16d0 ++++ -Seg:461d Size:256 Owner:0x16d2 +Seg:461c Size:256 Owner:0x16d2 ++++ -Seg:471d Size:256 Owner:0x16d4 +Seg:471c Size:256 Owner:0x16d4 ++++ -Seg:481d Size:256 Owner:0x16d6 +Seg:481c Size:256 Owner:0x16d6 ++++ -Seg:491d Size:256 Owner:0x16d8 +Seg:491c Size:256 Owner:0x16d8 +++++ -Seg:4a1d Size:256 Owner:0x16da +Seg:4a1c Size:256 Owner:0x16da ++++ -Seg:4b1d Size:256 Owner:0x16dc +Seg:4b1c Size:256 Owner:0x16dc ++++ -Seg:4c1d Size:256 Owner:0x16de +Seg:4c1c Size:256 Owner:0x16de ++++ -Seg:4d1d Size:256 Owner:0x16e0 +Seg:4d1c Size:256 Owner:0x16e0 ++++ -Seg:4e1d Size:256 Owner:0x16e2 +Seg:4e1c Size:256 Owner:0x16e2 +++++ -Seg:4f1d Size:256 Owner:0x16e4 +Seg:4f1c Size:256 Owner:0x16e4 ++++ -Seg:501d Size:256 Owner:0x16e6 +Seg:501c Size:256 Owner:0x16e6 ++++ -Seg:511d Size:256 Owner:0x16e8 +Seg:511c Size:256 Owner:0x16e8 ++++ -Seg:521d Size:256 Owner:0x16ea +Seg:521c Size:256 Owner:0x16ea ++++ -Seg:531d Size:256 Owner:0x16ec +Seg:531c Size:256 Owner:0x16ec +++++ -Seg:541d Size:256 Owner:0x16ee +Seg:541c Size:256 Owner:0x16ee ++++ -Seg:551d Size:256 Owner:0x16f0 +Seg:551c Size:256 Owner:0x16f0 ++++ -Seg:561d Size:256 Owner:0x16f2 +Seg:561c Size:256 Owner:0x16f2 ++++ -Seg:571d Size:256 Owner:0x16f4 +Seg:571c Size:256 Owner:0x16f4 ++++ -Seg:581d Size:256 Owner:0x16f6 +Seg:581c Size:256 Owner:0x16f6 +++++ -Seg:591d Size:256 Owner:0x16f8 +Seg:591c Size:256 Owner:0x16f8 ++++ -Seg:5a1d Size:256 Owner:0x16fa +Seg:5a1c Size:256 Owner:0x16fa ++++ -Seg:5b1d Size:256 Owner:0x16fc +Seg:5b1c Size:256 Owner:0x16fc ++++ -Seg:5c1d Size:256 Owner:0x16fe +Seg:5c1c Size:256 Owner:0x16fe ++++ -Seg:5d1d Size:256 Owner:0x1700 +Seg:5d1c Size:256 Owner:0x1700 +++++ -Seg:5e1d Size:256 Owner:0x1702 +Seg:5e1c Size:256 Owner:0x1702 ++++ -Seg:5f1d Size:256 Owner:0x1704 +Seg:5f1c Size:256 Owner:0x1704 ++++ -Seg:601d Size:256 Owner:0x1706 +Seg:601c Size:256 Owner:0x1706 ++++ -Seg:611d Size:256 Owner:0x1708 +Seg:611c Size:256 Owner:0x1708 ++++ -Seg:621d Size:256 Owner:0x170a +Seg:621c Size:256 Owner:0x170a +++++ -Seg:631d Size:256 Owner:0x170c +Seg:631c Size:256 Owner:0x170c ++++ -Seg:641d Size:256 Owner:0x170e +Seg:641c Size:256 Owner:0x170e ++++ -Seg:651d Size:256 Owner:0x1710 +Seg:651c Size:256 Owner:0x1710 ++++ -Seg:661d Size:256 Owner:0x1712 +Seg:661c Size:256 Owner:0x1712 ++++ -Seg:671d Size:256 Owner:0x1714 +Seg:671c Size:256 Owner:0x1714 +++++ -Seg:681d Size:256 Owner:0x1716 +Seg:681c Size:256 Owner:0x1716 ++++ -Seg:691d Size:256 Owner:0x1718 +Seg:691c Size:256 Owner:0x1718 ++++ -Seg:6a1d Size:256 Owner:0x171a +Seg:6a1c Size:256 Owner:0x171a ++++ -Seg:6b1d Size:256 Owner:0x171c +Seg:6b1c Size:256 Owner:0x171c ++++ -Seg:6c1d Size:256 Owner:0x171e +Seg:6c1c Size:256 Owner:0x171e +++++ -Seg:6d1d Size:256 Owner:0x1720 +Seg:6d1c Size:256 Owner:0x1720 ++++ -Seg:6e1d Size:256 Owner:0x1722 +Seg:6e1c Size:256 Owner:0x1722 ++++ -Seg:6f1d Size:256 Owner:0x1724 +Seg:6f1c Size:256 Owner:0x1724 ++++ -Seg:701d Size:256 Owner:0x1726 +Seg:701c Size:256 Owner:0x1726 ++++ -Seg:711d Size:256 Owner:0x1728 +Seg:711c Size:256 Owner:0x1728 +++++ -Seg:721d Size:256 Owner:0x172a +Seg:721c Size:256 Owner:0x172a ++++ -Seg:731d Size:256 Owner:0x172c +Seg:731c Size:256 Owner:0x172c ++++ -Seg:741d Size:256 Owner:0x172e +Seg:741c Size:256 Owner:0x172e ++++ -Seg:751d Size:256 Owner:0x1730 +Seg:751c Size:256 Owner:0x1730 ++++ -Seg:761d Size:256 Owner:0x1732 +Seg:761c Size:256 Owner:0x1732 +++++ -Seg:771d Size:256 Owner:0x1734 +Seg:771c Size:256 Owner:0x1734 ++++ -Seg:781d Size:256 Owner:0x1736 +Seg:781c Size:256 Owner:0x1736 ++++ -Seg:791d Size:256 Owner:0x1738 +Seg:791c Size:256 Owner:0x1738 ++++ -Seg:7a1d Size:256 Owner:0x173a +Seg:7a1c Size:256 Owner:0x173a ++++ -Seg:7b1d Size:256 Owner:0x173c +Seg:7b1c Size:256 Owner:0x173c +++++ -Seg:7c1d Size:256 Owner:0x173e +Seg:7c1c Size:256 Owner:0x173e ++++ -Seg:7d1d Size:256 Owner:0x1740 +Seg:7d1c Size:256 Owner:0x1740 ++++ -Seg:7e1d Size:256 Owner:0x1742 +Seg:7e1c Size:256 Owner:0x1742 ++++ -Seg:7f1d Size:256 Owner:0x1744 +Seg:7f1c Size:256 Owner:0x1744 ++++ -Seg:801d Size:256 Owner:0x1746 +Seg:801c Size:256 Owner:0x1746 +++++ -Seg:811d Size:256 Owner:0x1748 +Seg:811c Size:256 Owner:0x1748 ++++ -Seg:821d Size:256 Owner:0x174a +Seg:821c Size:256 Owner:0x174a ++++ -Seg:831d Size:256 Owner:0x174c +Seg:831c Size:256 Owner:0x174c ++++ -Seg:841d Size:256 Owner:0x174e +Seg:841c Size:256 Owner:0x174e ++++ -Seg:851d Size:256 Owner:0x1750 +Seg:851c Size:256 Owner:0x1750 +++++ -Seg:861d Size:256 Owner:0x1752 +Seg:861c Size:256 Owner:0x1752 ++++ -Seg:871d Size:256 Owner:0x1754 +Seg:871c Size:256 Owner:0x1754 ++++ -Seg:881d Size:256 Owner:0x1756 +Seg:881c Size:256 Owner:0x1756 ++++ -Seg:891d Size:256 Owner:0x1758 +Seg:891c Size:256 Owner:0x1758 ++++ -Seg:8a1d Size:256 Owner:0x175a +Seg:8a1c Size:256 Owner:0x175a +++++ -Seg:8b1d Size:256 Owner:0x175c +Seg:8b1c Size:256 Owner:0x175c ++++ -Seg:8c1d Size:273 Owner:0xe400 +Seg:8c1c Size:273 Owner:0xe400 ++++ -Seg:b81d Size:18402 Owner:0x0 +Seg:b81c Size:18403 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index c61787ab..df0e710e 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,35 +1,35 @@ == default == - USED block at 28130016 of size 66 - USED block at 28130058 of size 66 - FREE block at 2813009a of size 18 - USED block at 281300ac of size 136 - USED block at 28130134 of size 20 - FREE block at 28130148 of size 7860 + USED block at 28120016 of size 66 + USED block at 28120058 of size 66 + FREE block at 2812009a of size 18 + USED block at 281200ac of size 136 + USED block at 28120134 of size 20 + FREE block at 28120148 of size 7860 OK - end of heap == near == - USED block at 1812e436 of size 12 - USED block at 1812e442 of size 332 - USED block at 1812e58e of size 52 - USED block at 1812e5c2 of size 20 - USED block at 1812e5d6 of size 20 - USED block at 1812e5ea of size 20 - USED block at 1812e5fe of size 20 - USED block at 1812e612 of size 20 - USED block at 1812e626 of size 6614 + USED block at 1811e436 of size 12 + USED block at 1811e442 of size 332 + USED block at 1811e58e of size 52 + USED block at 1811e5c2 of size 20 + USED block at 1811e5d6 of size 20 + USED block at 1811e5ea of size 20 + USED block at 1811e5fe of size 20 + USED block at 1811e612 of size 20 + USED block at 1811e626 of size 6614 OK - end of heap == far == - USED block at 28130016 of size 66 - USED block at 28130058 of size 66 - USED block at 2813009a of size 18 - USED block at 281300ac of size 136 - USED block at 28130134 of size 20 - USED block at 28130148 of size 7860 + USED block at 28120016 of size 66 + USED block at 28120058 of size 66 + USED block at 2812009a of size 18 + USED block at 281200ac of size 136 + USED block at 28120134 of size 20 + USED block at 28120148 of size 7860 OK - end of heap Memory Type Total Used Free diff --git a/src/exmmtest.c b/src/exmmtest.c index 26bfc964..6d6e9a85 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -141,8 +141,8 @@ for(w=0;w<2;w++) //printf("dark purple = purgable\n"); //printf("medium blue = non purgable\n"); //printf("red = locked\n"); - printf("press any key to continue!\n"); - DebugMemory_(&gvar, 1); +// printf("press any key to continue!\n"); +// DebugMemory_(&gvar, 1); if(baka) printf("\nyay!\n"); else printf("\npoo!\n"); printf("press any key to continue!\n"); diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index c8cb9251..51b4925a 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -1619,12 +1619,14 @@ void MM_Report_(global_game_variables_t *gvar) printf(" LIMEMS\n"); printf(" EMM v%x.%x available\n", gvar->pm.emm.EMSVer>>4,gvar->pm.emm.EMSVer&0x0F); printf(" totalEMSpages: %u ", gvar->pm.emm.totalEMSpages); printf("freeEMSpages: %u\n", gvar->pm.emm.freeEMSpages); - printf(" EMSPageFrame: %x\n", gvar->pm.emm.EMSPageFrame); + printf(" EMSPageFrame: %04x\n", gvar->pm.emm.EMSPageFrame); } if(MML_CheckForXMS()) { printf(" XMS\n"); - printf(" XMSDriver: %X\n", gvar->pm.xmm.XMSDriver); +//++++ printf(" XMS v%x.%x available\n", gvar->pm.xmm.XMSVer>>4,gvar->pm.xmm.XMSVer&0x0F); + printf(" XMSDriver: %Fp\n", XMSDriver); + printf(" XMSHandle: %04x\n", gvar->pm.xmm.XMSHandle); } printf("nearheap: %lu ", gvar->mmi.nearheap); printf("farheap: %lu\n", gvar->mmi.farheap); if(MML_CheckForEMS()) printf("EMSmem: %lu ", gvar->mmi.EMSmem); if(MML_CheckForXMS()) printf("XMSmem: %lu", gvar->mmi.XMSmem); printf("\n"); diff --git a/src/lib/16_pm.c b/src/lib/16_pm.c index bbfec527..191061f0 100755 --- a/src/lib/16_pm.c +++ b/src/lib/16_pm.c @@ -354,15 +354,22 @@ PML_ShutdownEMS(global_game_variables_t *gvar) boolean PML_StartupXMS(global_game_variables_t *gvar) { - boolean errorflag; +//#define STARTUPXMSASM byte err; - word /*XMSAvail,*/ XMSHandle; - - word XMSAvail1, XMSAvail2, XMSAvail3, XMSAvail4; - +#ifndef STARTUPXMSASM +#define XMSAVI gvar->pm.xmm.XMSAvail +#define XMSHAN gvar->pm.xmm.XMSHandle +#else + #define BRACKETXMS + word XMSAvail, XMSHandle; +#define XMSAVI XMSAvail +#define XMSHAN XMSHandle +#endif +//++++ word XMSVer; + boolean errorflag=false; word e=0; - errorflag=gvar->pm.xmm.XMSPresent = false; // Assume failure - gvar->pm.xmm.XMSAvail = gvar->mmi.XMSmem = 0; + gvar->pm.xmm.XMSPresent = false; // Assume failure + XMSAVI = gvar->mmi.XMSmem = 0; __asm { mov ax,0x4300 @@ -375,20 +382,23 @@ PML_StartupXMS(global_game_variables_t *gvar) int XMS_INT // Get address of XMS driver mov [WORD PTR XMSDriver],bx mov [WORD PTR XMSDriver+2],es // function pointer to XMS driver +//++++ mov ah,0 +//++++ call [DWORD PTR XMSDriver] //; Get XMS Version Number +//++++ mov [XMSVer],ax mov e,2 - //XMS_CALL(XMS_QUERYFREE); // Find out how much XMS is available +#ifdef STARTUPXMSASM mov ah,XMS_QUERYFREE // Find out how much XMS is available - call [DWORD PTR XMSDriver] - //mov [XMSAvail],ax - //mov XMSAvail1,ax - //mov ax,XMSAvail2 - //mov [XMSAvail3],ax - mov ax,[XMSAvail4] - mov err,bl - cmp ax,0 // AJR: bugfix 10/8/92 - je error1 + call [DWORD PTR XMSDriver]//DWORD PTR +#ifndef BRACKETXMS + mov XMSAVI,ax +#else + mov [XMSAVI],ax +#endif + or ax,ax // AJR: bugfix 10/8/92 + jz error1 mov e,3 +#endif jmp End1 #ifdef __BORLANDC__ } @@ -407,29 +417,45 @@ End1: #ifdef __WATCOMC__ } #endif - -// XMS_CALL(XMS_QUERYFREE); // Find out how much XMS is available -// XMSAvail = _AX; -// if (!_AX) // AJR: bugfix 10/8/92 -// goto error; - - printf(" XMSAvail=%u e=%u\n", XMSAvail4, e); - //printf(" %u %u %u %u\n", XMSAvail1, XMSAvail2, XMSAvail3, XMSAvail4); - XMSAvail4 &= ~(PMPageSizeKB - 1); // Round off to nearest page size - if (XMSAvail4 < (PMPageSizeKB * 2)){ // Need at least 2 pages - printf("PISS! %u\n", XMSAvail4); + if(errorflag==true) goto error; +#ifndef STARTUPXMSASM + XMS_CALL(XMS_QUERYFREE); // Find out how much XMS is available + XMSAVI = _AX; + if (!_AX) // AJR: bugfix 10/8/92 + { + errorflag = true; + err = _BL; goto error; } + e++; +#endif +#ifdef __DEBUG_PM__ +//++++ printf("XMSVer=%02X ", XMSVer); + printf("XMSAvail=%u\n", XMSAVI); +#endif + XMSAVI &= ~(PMPageSizeKB - 1); // Round off to nearest page size + if (XMSAVI < (PMPageSizeKB * 2)) // Need at least 2 pages + { + errorflag=true; + goto error; + } +#ifdef STARTUPXMSASM __asm { - mov dx,[XMSAvail4] - //XMS_CALL(XMS_ALLOC); // And do the allocation - mov ah,XMS_ALLOC - call [DWORD PTR XMSDriver] - mov XMSHandle,dx - mov err,bl - cmp ax,0 // AJR: bugfix 10/8/92 - je error2 +#ifndef BRACKETXMS + mov dx,XMSAVI +#else + mov dx,[XMSAVI] +#endif + mov ah,XMS_ALLOC // And do the allocation + call [DWORD PTR XMSDriver]//DWORD PTR +#ifndef BRACKETXMS + mov XMSHAN,dx +#else + mov [XMSHAN],dx +#endif + or ax,ax // AJR: bugfix 10/8/92 + jz error2 mov e,4 jmp End2 #ifdef __BORLANDC__ @@ -449,59 +475,43 @@ End2: #ifdef __WATCOMC__ } #endif - - if(errorflag==false) - { - gvar->mmi.XMSmem = XMSAvail4 * (dword)1024; - gvar->pm.xmm.XMSAvail = XMSAvail4; - gvar->pm.xmm.XMSHandle = XMSHandle; - - gvar->pm.xmm.XMSPresent = true; - printf(" %u %u %u\n", gvar->mmi.XMSmem, gvar->pm.xmm.XMSAvail, XMSAvail4); - getch(); - }else printf(" %u errorflag=%02X\n", XMSAvail4, err); -error: - return(gvar->pm.xmm.XMSPresent); -/* - gvar->pm.xmm.XMSPresent = false; // Assume failure - gvar->pm.xmm.XMSAvail = 0; - -__asm mov ax,0x4300 -__asm int XMS_INT // Check for presence of XMS driver - if (_AL != 0x80) - goto error; - - -__asm mov ax,0x4310 -__asm int XMS_INT // Get address of XMS driver -__asm mov [WORD PTR XMSDriver],bx -__asm mov [WORD PTR XMSDriver+2],es // function pointer to XMS driver - - XMS_CALL(XMS_QUERYFREE); // Find out how much XMS is available - gvar->pm.xmm.XMSAvail = _AX; - if (!_AX) // AJR: bugfix 10/8/92 - goto error; - - gvar->pm.xmm.XMSAvail &= ~(PMPageSizeKB - 1); // Round off to nearest page size - if (gvar->pm.xmm.XMSAvail < (PMPageSizeKB * 2)) // Need at least 2 pages - goto error; - - _DX = gvar->pm.xmm.XMSAvail; +#else + _DX = XMSAVI; XMS_CALL(XMS_ALLOC); // And do the allocation - gvar->pm.xmm.XMSHandle = _DX; - + XMSHAN = _DX; if (!_AX) // AJR: bugfix 10/8/92 { - gvar->pm.xmm.XMSAvail = 0; + errorflag=true; + err = _BL; goto error; } - - gvar->mmi.XMSmem = gvar->pm.xmm.XMSAvail * 1024; - - gvar->pm.xmm.XMSPresent = true; + e++; +#endif error: - printf("XMSstart %u %u\n", gvar->mmi.XMSmem, gvar->pm.xmm.XMSAvail); - return(gvar->pm.xmm.XMSPresent);*/ + if(errorflag==false) + { + gvar->mmi.XMSmem = (dword)(XMSAVI) * 1024; +#ifdef STARTUPXMSASM + gvar->pm.xmm.XMSAvail = XMSAVI; + gvar->pm.xmm.XMSHandle = XMSHAN; +#endif +//++++ gvar->pm.xmm.XMSVer = XMSVer; + gvar->pm.xmm.XMSPresent = true; +#ifdef __DEBUG_PM__ + printf(" XMSmem=%lu XMSAvail=%u\n", gvar->mmi.XMSmem, XMSAVI); +#endif + } + else + { +#ifdef __DEBUG_PM__ + //printf("XMSHandle\n"); + //printf(" 1=%u 2=%u 3=%u 4=%u\n", XMSHandle1, XMSHandle2, XMSHandle3, XMSHandle4); + //printf(" 2=%u ", XMSHandle); + //printf(" %u", gvar->pm.xmm.XMSHandle); + printf("err=%02X e=%u\n", err, e); +#endif + } + return(gvar->pm.xmm.XMSPresent); } // diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index 119d8677..6c5ca4e3 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -257,7 +257,7 @@ typedef struct typedef struct { boolean XMSPresent; - word XMSAvail,XMSPagesAvail,XMSHandle; + word XMSAvail,XMSPagesAvail,XMSHandle;//++++,XMSVer; dword XMSDriver; int XMSProtectPage;// = -1; } pm_xmmi_t;