At 12:34 AM 1/7/2005 +1300, Bart Oldeman wrote:

An extract from the patch in grub013.zip is below. It's far nastier. Very
nasty. It's code that assumes that the binary code of FD-kernel's IRQ
stack handling never changes, noone uses STACKS=0, and MS HIMEM may be
loaded (int15 hooked by himem.exe not considered apparently). Note the use
of the magic 0x3086 number... Your dog may eat this code for lunch.

No, my dog wouldn't eat it. He draws the line at vomit and wild animal poop.

The code is almost painful to view. Congratulations and pat on the back to them for a noble attempt at FreeDOS compatibility and all that, but where did this code come from? And actually, that's the first problem. How do you get actual GRUB4DOS code? Their SourceForge site fibs and has only the WINGRUB (front-end) Delphi source. The home page link to older versions of GRUB4DOS goes to yginfo.net which appears permanently down. I located the diff file you reference by using the grub013.zip name plugged into Google. And where's the main source; is the diff off the main GNU GRUB source tree? Which, by the way, is now basically unsupported legacy code waiting for GRUB 2 according to FSF's site.

The magic number business.. Memory location 3086h isn't documented as a standard and is tied to one vendor, possibly not all versions. However, scanning for a JMP DWORD PTR CS:[address] 3-byte sig is common and should minimally work for FreeDOS and MS HIMEM.

The code which checks for INT 8-0FH and 70-7Fh for vector address spreads of exactly 6 bytes is cute, but why such a stringent purity test? If GRUB is going to stop operation should FreeDOS fail the test, why not at least try it? Why not just check for FreeDOS presence in an official manner? Surely there must be one.

Etc.

I'm lazy and the atrocity called AT&T syntax makes my head hurt, but it seems that it wouldn't be all that difficult for someone (else) to recode the grub fragment more generically to work with FreeDOS past and present. Assuming they figure out where the patch goes back to.

Although maybe FreeDOS should just follow the same INT vector storage as MS and avoid the whole situation. Better compatibility all the way around. That couldn't cost too much memory, right?




------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to