Wednesday 16 November 2011

How do you create a .COM file? in C programming

How do you create a .COM file?

Creating a .COM file is accomplished by compiling your program with the Tiny memory model and using special linker commands to make the output extension .COM rather than the normal .EXE extension. Keep in mind that for your program to qualify for a .COM file, all code, data, and stack must be able to fit in 64KB.

This memory model is typically restricted to only the smallest of programs, usually programs such as TSRsand small utility programs.Each compiler has a different method of creating .COM files. You should refer to your compiler’sdocumentation for information regarding which compiler or linker switches you need to use to create a .COM file rather than an .EXE file.

Cross Reference:

XVIII.6: What is the benefit of a .COM file over an .EXE file?

No comments:

Post a Comment