Uploaded to ftp://ftp.devoresoftware.com/downloads/emm386 are the files
emmx207.zip, EMM386/HIMEM mostly executable package, and emms207.zip,
EMM386/HIMEM mostly source package. Also available are the files
nhimem.zip, nomyso.zip, and mutant-upx125-cygwin-exe.zip.
Version 2.07 of EMM386 fixes an error in its upper memory handler which
causes crashes when attempting to free an upper memory
block. Specifically, this caused problems when trying to unload CTMOUSE
via its /U option. HIMEM has a few minor source changes, but the binary is
effectively unchanged. The EMM386 release is optional for users unless
they load and unload things in upper memory. I will discuss details and
the other files in the following remarks.
The EMM386 and HIMEM details are basically much as stated. HIMEM does now
use BCD internal versioning, for no good reason since internal versioning
does not require BCD, but it pretties up some dumb utility's output. Oh,
and HIMEM had very minor source code changes to better work with the NASM
conversion.
First new file up: mutant-upx125-cygwin-exe.zip. This is the previously
discussed Cygwin-target executable version of the mutant UPX I modified to
work with HIMEM and EMM386, the source having been uploaded last month as
mods-upx125-dos.zip. Feedback from other users (all two of them) indicated
they had problems recompiling for DOS. Accordingly, my build is now
available for general download. I have heard -- though not verified --
that you CAN run the Cygwin EXE build under DOS using the HRX DOS extender
and the Cygwin DLL. Both are freely downloadable on the Internet.
Starting with this version, HIMEM and EMM386 are compressed with the
modified UPX. Compression is worse than the original SP3 packing, though
not horrendously so. On the plus side the modified UPX can compress SYS
files larger than 64K, taking a test Norton AntiVirus SYS file down from
90K+ to under 40K. So the EMM386 compression is now open-source and
consequently the files are bigger. I suppose a lot of people consider that
progress.
Oh, that NASM thing. Maybe you wondered about that. Well, it seems that a
bunch of people want to be able to assemble HIMEM and EMM386 with a
non-MS-tainted non-commercial open-source assembler. NASM is the first
choice, despite it being underfeatured and buggy in comparison to the last
releases of MASM and TASM. But hey, vox populi and all that. I'm not
using NASM for HIMEM and EMM386 myself, but 1) it would be really nice for
other people without MASM or TASM to be able to test code changes
themselves before asking me to incorporate them and 2) I'm winding down my
HIMEM+EMM386 work and the next idiot...err...hero who maintains the code
may want alternate assembler choices.
A utility which converts MASM/TASM-ish code to NASM would be handy. Here's
how it could work: I keep the MASM-TASM code while NASM advocates convert
the source for their own purposes and for testing code to send back to me.
Problem is, all the converters I could find either were simple
text-replacement toys or unavailable for general use. Alack and alas, this
left me with little choice but to re-invent the wheel and write my
own. The result was a modest Perl program of around 2000 lines, called
Nomyso, a half-wit acronym for Not My Source. I retain copyright, but
Nomyso is released under a sane open-source license.
A word of warning to those wishing to make wholesale conversion of other
MASM/TASM files to NASM via Nomyso. This is phase 1 of Nomyso. Nomyso
meets its initial goal of converting HIMEM.ASM without requiring any
source changes. Phase 2 will be making it convert EMM386 -- far more
complex with macros and other fanged beasts of the dread night. Nomyso has
actual intelligence behind it, but the initial release was written to
convert HIMEM. Period, only, solo. A whole bunch -- probably most --
MASM/TASM source code will not fully translate with Nomyso at this
1.0-release stage. If you make heavy use of macros or HLL-style features,
likely very little of your code will translate properly. After phase 2
with EMM386 translation support, Nomyso should perform much better. There
is a good chance I will continue to extend Nomyso to support other ASM
files of interest. Money raining from the sky would help, but the winds do
not seem favorable.
In case you're wondering about the HIMEM source changes, there were a few
segment overrides that were not necessary and which Nasm cannot determine
are unnecessary, so I removed them to have the TASM and NASM EXE's
match. Also, I changed a LEA to a MOV since TASM automatically makes that
optimization behind your back. If you are interested in seeing what Nomyso
hath wrought without dealing with its Perl nature, the NHIMEM.ZIP file
contains the NASM source conversion from HIMEM64.ASM to NHIMEM.ASM. I
briefly tested the NASM EXE and it seemed to work ok, although I didn't
test it very long for fear it would break and I would be honor-bound to fix it.
And another warning: NASM done got it some bugs. Even with the relatively
modest source of HIMEM, I hit a couple. First, NASM would not allow a
non-floating point initialization of DQ. Second, you need to watch out for
the number of passes specified. I knew NASM needed more than one pass to
properly handle jumps etc., and it gave feedback appropriate to that
need. Bumping NASM up to two passes gave no errors, but it also failed to
general any public references within the OBJ file. Very nice to debug
that. Ahh, but three passes was the winner of the
waste-my-time-debugging-phantom-errors award: at three passes NASM gave no
error feedback but created two entire images of HIMEM within the OBJ
file. Everything was doubled. Fortunately, four passes made NASM work
properly. The magic incantation is nasm -O4 -f obj NHIMEM.ASM. You might
consider bumping the O passes higher yet to give NASM additional chances at
a clean assemble.
On a final note, I will be taking a break -- i.e. an extended weekend --
without my FreeDOS e-mail and with mail lists turned O-F-F. If you have a
burning need to tell me something, you have a day or two to do
it. Otherwise you might as well wait a week, when I turn the FreeDOS
electronic missives back on.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user