Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fat binary
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Combined COM and SYS files=== DOS [[device driver]]s (typically with file extension [[.SYS]]) start with a file header whose first four bytes are [[hexadecimal|FFFFFFFFh]] by convention, although this is not a requirement.<ref name="Paul_2002_COMSYS"/> This is fixed up dynamically by the operating system when the driver [[loader (computing)|loads]] (typically in the [[DOS BIOS]] when it executes [[DEVICE (CONFIG.SYS directive)|DEVICE]] statements in [[CONFIG.SYS]]). Since DOS does not reject files with a .COM extension to be loaded per DEVICE and does not test for FFFFFFFFh, it is possible to combine a COM program and a device driver into the same file<ref name="Paul_2002_CTMOUSE"/><ref name="Paul_2002_COMSYS"/> by placing a jump instruction to the entry point of the embedded COM program within the first four bytes of the file (three bytes are usually sufficient).<ref name="Paul_2002_COMSYS"/> If the embedded program and the device driver sections share a common portion of code, or data, it is necessary for the code to deal with being loaded at offset +0100h as a .COM style program, and at +0000h as a device driver.<ref name="Paul_2002_CTMOUSE"/> For shared code loaded at the "wrong" offset but not designed to be [[position-independent]], this requires an internal address fix-up<ref name="Paul_2002_CTMOUSE"/> similar to what would otherwise already have been carried out by a [[relocating loader]], except for that in this case it has to be done by the loaded program itself; this is similar to the situation with [[self-relocating driver]]s but with the program already loaded at the target location by the operating system's loader.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)