Hi!

28-Июл-2006 23:13 [EMAIL PROTECTED] (Michael Devore) wrote to
freedos-devel@lists.sourceforge.net:

>> >>      ...but if you not object, I rewrote for you DefragXMS.
MD> You or anyone else can rewrite and submit whatever code you want with my
MD> blessing.  The rules are simple:
[...]

     Well, lets begin.

     First at all, let make source compilable by TC and BC. Done (some
source cleans and one BUG-fix) - see attachment.

     Now, let re-create MISSING build subsystem. Done - I prepare batch
files, makefiles and configs, similar to kernel subsystem. Now EMM386
compilable by TC and BC in same manner, as kernel. How (where) send you
these files?

PS: Interesting to compare result:

        TC    BC
EMM386  39122 38658  (BC 464 bytes shorter)
HIMEM   12969 12995  (BC 26 bytes longer)
diff -rup old/source/emm386/emm386.asm new/source/emm386/emm386.asm
--- old/source/emm386/emm386.asm        2006-07-27 22:49:10.000000000 +0000
+++ new/source/emm386/emm386.asm        2006-07-29 13:24:56.000000000 +0000
@@ -336,7 +336,7 @@ interrupt:
 ; good enough for FreeDOS=UMB, for nothing else :-)
 ;*********************************************************
 
-public _UMBhandler, _UMBoldhandler
+public _UMBhandler, _UMBOldhandler
 
 _UMBhandler:
 
@@ -363,8 +363,8 @@ TheUMBHandler:
 
 
 not_for_us:
-       db 0eah                                     ; jmp far  UMBoldhandler
-_UMBoldhandler dd 0
+       db 0eah                                     ; jmp far  UMBOldhandler
+_UMBOldhandler dd 0
 
 
 
diff -rup old/source/emm386/emm386c.c new/source/emm386/emm386c.c
--- old/source/emm386/emm386c.c 2006-07-27 21:34:30.000000000 +0000
+++ new/source/emm386/emm386c.c 2006-07-29 14:19:04.000000000 +0000
@@ -410,7 +410,7 @@ int xmscall(uint function)
 /*     asm mov cx,xmscx        */
        asm mov bx,xmsbx
 /*     asm mov ax,xmsax        */
-       asm mov ah,function
+       asm mov ah,byte ptr [function]
 
        XMSdriverAdress();
 
@@ -431,7 +431,7 @@ int xmscall32(uint function)
        asm mov dx,reg32.edx_low
        asm db 0x66
        asm mov bx,reg32.ebx_low
-       asm mov ah,function
+       asm mov ah,byte ptr [function]
 
        XMSdriverAdress();
 
@@ -552,9 +552,14 @@ XMSallocAndInitMem(unsigned long kbneede
 {   
        unsigned long xmslargest;
        unsigned long xmstotal;
+#if 0
        unsigned long preallocate;
+#endif
        unsigned long ulcalc;
-       ushort xmshandle, temphandle;
+       ushort xmshandle;
+#if 0
+       ushort temphandle;
+#endif
        int xmsspec3 = 0;
        int badstatus;
 /*     unsigned long reserve = 0;      */
@@ -1143,7 +1148,7 @@ int TheRealMain(int mode, char far *comm
                
                        printf("%c=%x..%x\n",memtype, rangestart,rangestop);
                        
-                       if (rangestart && rangestop && rangestart<=rangestop && 
rangestop <= 0xffff)
+                       if (rangestart && rangestop && rangestart<=rangestop 
/*&& rangestop <= 0xffff*/)
                                for ( ; rangestart < rangestop; rangestart++)
                                        SetMemoryType(rangestart,memtype);
                                
@@ -1299,6 +1304,8 @@ int TheRealMain(int mode, char far *comm
 /* called just before we go resident
 */ 
 void MyFunnyMain(void);
+
+int emmcall(uint function);
  
 void far finishing_touches()
 { 
diff -rup old/source/emm386/useful.c new/source/emm386/useful.c
--- old/source/emm386/useful.c  2004-10-15 22:00:54.000000000 +0000
+++ new/source/emm386/useful.c  2006-07-29 13:04:22.000000000 +0000
@@ -136,7 +136,7 @@ long GetValue(char far *commandline,int 
                case 'M': result *= 1024;
                case 'K': commandline[len]=' ';
                          break;
-               case 'G': result *= 1024*1024;
+               case 'G': result *= 1024UL*1024UL;
                         commandline[len]=' ';
        }
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to