COM: Difference between revisions

Jump to navigation Jump to search
397 bytes added ,  12 years ago
added loading and see also sections
[unchecked revision][unchecked revision]
(basic description)
 
(added loading and see also sections)
Line 1:
'''This is about the executable format, not Microsoft's [[Component Object Model]]'''
{{Stub}}
{{File formats}}
==COM Files==
 
===Introduction===
COM files are extremely simple, making them useful if you want to load programs but you don't want to worry about relocating symbols, reading file headers, and other complications. However, their simplicity makes their usefulness limited, so you'll definitely want to support something more complex but useful, once your OS is advanced.
 
Line 9 ⟶ 11:
 
COM files usually terminate with a RET instruction. The operating system starts the COM program using a CALL instruction, so RET returns to the OS, allowing any cleanup (like restarting the command prompt).
===Loading===
To load a COM file you need to load it to a low memory location, set ds and es to be pointing to the start of the file with an 0x100 org, and jump to the start, with offset 0x100.
==See also==
===Executables===
====16 bit====
*[[MZ]]
*[[NE]]
====32 bit====
*[[PE]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu