LINK: warning L4038: program has no starting address

Started by nrdev, May 25, 2009, 03:57:12 PM

Previous topic - Next topic

nrdev

what does this warning means and how can I prevent it?

FORTRANS

Hi,

   See my reply in the other thread.  I think it means that
you have mixed instructions for the type of executable,  An
*.EXE needs an entry point specified in the END statement
to tell the linker where to start your program.  A *.COM
executable has a fixed entry point.  So it is a warning that
either you need to specify an entry point, or process it
into a COM program.

Steve N.

dedndave

your program code should always end with a line like this

end start

"end" is a directive that is supposed to tell the assembler that code has ended
the end directive has a parameter - it tells the assembler what the program entry point is (start)

for .com programs, all data is normally declared at the end of the code segment
in the old days, the resulting exe files had to be converted to com files with EXE2BIN
i don't know - the new linkers may create them for you, now days
(notice - no dosseg directive - no stack segment - no data segment)

.model tiny
.
.
.
.code
org 100h
start:
.
.
.
end start


for .exe programs, a stack is required, model is small (at least), segments must be declared, but may be combined
for the sake of simplicity, stay with exe's
when you get bored with 16-bit code (and MS makes it obsolete), you will want to move up to 32-bit code
at that point, .com files do not exist, as far as i know