flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > c code for 8086

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
How can i use gcc to produce code for 8086 cpu?

More important, how can i tell gcc not to trash my code with msvcrt crap?
Post 18 Feb 2011, 16:11
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
You can't. GCC doesn't support segmented memory, or, by inclusion, real mode. BCC is a good C compiler for real mode. http://linux.die.net/man/1/bcc
Post 18 Feb 2011, 19:25
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
b1528932 wrote:
How can i use gcc to produce code for 8086 cpu?


Finish the 16-bit GCC support (project abandoned unfinished years ago).

Or use WATCOM Smile

Quote:
More important, how can i tell gcc not to trash my code with msvcrt crap?


1. M$WCRT.DLL doesn't run on 8086 anyway AFAIK.
2. It's not GCC's fault, it's MinGW AFAIK.
3. Use some C lib (see CC386 or WATCOM compilers).
4. Go to MinGW maintainers and present this problem there Wink
Post 19 Feb 2011, 12:39
View user's profile Send private message Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
about trashing, -nostdlib fixed problem. But gcc cant make real mode code.
bye gcc.
Post 19 Feb 2011, 14:31
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
Did you expect a Window's compiler not to link to a Window's library?

If you want a cross compiler(for any architecture), you need to build it.
Post 19 Feb 2011, 19:09
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.