View Single Post
Old 22 February 2021, 21:55   #43
Bruce Abbott
Registered User
 
Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,584
Back to the OP,
Quote:
Originally Posted by Photon View Post
DOS LoadSeg works fine, but I'm looking out for pitfalls from experience.
If DOS LoadSeg works fine then there is no reason not to use it.

Are there any pitfalls? Nobody here seems to know of any.

Quote:
Some executable files have multiple hunks, decompression etc. The last hunk might have the last 0 longword (IIRC) removed to save 4 bytes, and they still work.
They still work because if they didn't it would be a fatal bug, which the coder would be forced to fix. What's left after that are latent bugs that don't prevent the OS from loading them, but might be a problem for other implementations. Therefore your best choice for compatibility is to use the same code as the OS, ie. LoadSeg.

So what you are really asking is does anyone have experience of programs that don't load in a particular OS due to bad hunk formatting. I can't think of any, but there probably are a few. There is a lot of bad stuff out there, but unless it is something really important to me I don't generally bother trying to find out why it fails (life's too short to spend it trying to fix other people's crappy code!).

having said that, a discussion on differences between hunk formats and possible issues with them could be quite informative (I found a few issues with my own implementation - required for my disassembler - which have actually been touched on here). So if anyone does have something to share please tell us, because it might be useful to know.
Bruce Abbott is offline  
 
Page generated in 0.04436 seconds with 11 queries