Hi,

> Hi, I just tried to 'lh display', but it always ends in conventional
> memory (code, codepages are perhaps in XMS):
...

> I myself explain this that the UPX-ed program is probably going to UMB,
> but after its decompression, its resident part will no longer fit there
> for some reason and is placed into conventional memory.

this is right. the .EXE header utility EXEHDR (there are many others)
reports (beyond other stuff) for the UPX'ed file

e:\>exemod y:\temp\BIN\DISPLAY.EXE

           Microsoft (R) EXE File Header Utility  Version 4.02
           y:\temp\BIN\DISPLAY.EXE            (hex)           (dec)

           .EXE size (bytes)                    E43            3651
>>>        Minimum load size (bytes)          1F443          128067
           Minimum allocation (para)           1E62            7778

after decompressing, minimum load size is much smaller

      e:>upx -d  y:\temp\BIN\DISPLAY.EXE
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2017
      UPX 3.93w       Markus Oberhumer, Laszlo Molnar & John Reiser   Jan 29th 
2017

              File size         Ratio      Format      Name
                 --------------------   ------   -----------   -----------
                      62535 <-      3651    5.84%     dos/exe     DISPLAY.EXE

      Unpacked 1 file.

      e:\ntsource\snapshot>exemod y:\temp\BIN\DISPLAY.EXE

      Microsoft (R) EXE File Header Utility  Version 4.02
      y:\temp\BIN\DISPLAY.EXE            (hex)           (dec)

      .EXE size (bytes)                   F447           62535
>>>   Minimum load size (bytes)           FEF7           65271
      Minimum allocation (para)             AD             173



fortunately, after recompressing with the current UPX, the minimum
required load size is only minimally increased, and still load high as
the uncompressed display.exe

         e:\>upx  y:\temp\BIN\DISPLAY.EXE
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2017
         UPX 3.93w       Markus Oberhumer, Laszlo Molnar & John Reiser   Jan 
29th 2017

         File size         Ratio      Format      Name
            --------------------   ------   -----------   -----------
                 62535 ->      3643    5.83%     dos/exe     DISPLAY.EXE

         Packed 1 file.

         e:\>exemod y:\temp\BIN\DISPLAY.EXE

         Microsoft (R) EXE File Header Utility  Version 4.02
         y:\temp\BIN\DISPLAY.EXE            (hex)           (dec)

         .EXE size (bytes)                    E3B            3643
>>>      Minimum load size (bytes)           FEFB           65275
         Minimum allocation (para)            F0E            3854



> What is essential - if so, then this behavior should be IMO mentioned in
> the display documentation (or elsewhere).

wrong. this behaviour should simply be fixed, as the fix is trivial:

       get a recent UPX.
       decompress.
       recompress.
       wait for FreeDOS 2.0 to have this fix published.


some more remarks:

( I didn't look at the sources, so take this with a grain of salt)

12K resident is, even when loaded high, a significant number.
as the compressed .EXE size is just 3,5 K, the executable logic is
most likely ~5 KB size, and the other ~7 KB is buffer space to store font
information.

to move this font buffer to XMS memory shouldn't be a big deal, and
make up ~7 KB more UMB memory.

( in the good old times people would have killed for 7 KB memory :-)

as I have no interest in display.exe, I left this as an exercise to
the reader.


Tom


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to