Need help for the Tlink.

Z

zhongjiechao

Hello,

I using the TCC compile some C source file. and then link the object
files by the tlinker. but, I can't specify the programme entry point,
such as 0x7C00. I know that it can specify the point in asm ORG
instruction. Can you help me? thanks.

COMMAND:

tcc -mt -c src.c
tlink src.obj, src.exe
exe2bin src.exe
 
W

Walter Roberson

I using the TCC compile some C source file. and then link the object
files by the tlinker. but, I can't specify the programme entry point,
such as 0x7C00. I know that it can specify the point in asm ORG
instruction. Can you help me? thanks.

I don't even recognize TCC, which is a good clue that the question
is implementation specific and so should be asked in a newsgroup
devoted to development in (whatever it is.)

comp.lang.c does not deal with specific compilers, only with the
language itself.
 
K

Kenneth Brody

Hello,

I using the TCC compile some C source file. and then link the object
files by the tlinker. but, I can't specify the programme entry point,
such as 0x7C00. I know that it can specify the point in asm ORG
instruction. Can you help me? thanks.
[...]

The entry point is the function called "main", which is either:

int main()

or
int main(int argc,char *argv[])

If by "TCC" you mean the old Turbo C compiler, I believe that it also
supports a non-standard:

int main(int argc,char *argv[],char *envp[])

Well, technically, the "entry point" is someplace within the runtime
library, but main() is what you care about.

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top