www.digitalmars.com         C & C++   DMDScript  

c++.dos.16-bits - set start address of .com file

reply Christian Neubert <Codemasterhs yahoo.de> writes:
I want to rewrite my loader in c and I want to give this compiler a try, 
but it is possible to compile to a binary file (like .com) with a start 
offset of 0?
Jan 05 2005
parent reply Christian Neubert <Codemasterhs yahoo.de> writes:
Christian Neubert wrote:
 I want to rewrite my loader in c and I want to give this compiler a try, 
 but it is possible to compile to a binary file (like .com) with a start 
 offset of 0?
I tried it and I need some more info. I want to link several .obj files to 1 .com like file. What commands have I to give to the linker? The next problems are the standard libs. I turn they of with the -NL switch, but when I want to link I get the errors, with a symbol __acrtused and with my function which is written and compiled with nasm.
Jan 05 2005
parent "Walter" <newshound digitalmars.com> writes:
"Christian Neubert" <Codemasterhs yahoo.de> wrote in message
news:crhr0m$5mb$1 digitaldaemon.com...
 Christian Neubert wrote:
 I want to rewrite my loader in c and I want to give this compiler a try,
 but it is possible to compile to a binary file (like .com) with a start
 offset of 0?
I tried it and I need some more info. I want to link several .obj files to 1 .com like file. What commands have I to give to the linker?
The linker doesn't need any special commands. Generating .com files is the "t" memory model. To create hello.com, dmc -mt hello which will show how it is obj2asm'd and exe2bin'd.
 The next problems are the standard libs. I turn they of with the -NL
 switch, but when I want to link I get the errors, with a symbol
 __acrtused and with my function which is written and compiled with nasm.
See www.digitalmars.com/ctg/acrtused.html
Jan 14 2005