option in gcc that lets us produce object code for 16-bit processor

C

chandanlinster

I was just curious to know whether there is an option within the gcc
compiler that lets us produce object code for 16-bit processor, while
we are working on 32-bit machines.
 
W

Walter Roberson

I was just curious to know whether there is an option within the gcc
compiler that lets us produce object code for 16-bit processor, while
we are working on 32-bit machines.

Yes, No, Maybe.

If you need assistance with gcc itself, you should ask in one of the
gnu newsgroups.

Generally speaking, gcc does support cross-compiling even
between completely different systems, but it isn't been universally
ported yet, so without further information from you we wouldn't
be able to tell you whether it is supported on -your- "32 bit machine"
or whether it supports -your- "16 bit processor".
 
M

Morris Dovey

chandanlinster (in
(e-mail address removed)) said:

| I was just curious to know whether there is an option within the gcc
| compiler that lets us produce object code for 16-bit processor,
| while we are working on 32-bit machines.

Yes - take a look at the gcc documentation for target processor
options.
 
T

Tom St Denis

chandanlinster said:
I was just curious to know whether there is an option within the gcc
compiler that lets us produce object code for 16-bit processor, while
we are working on 32-bit machines.

Assuming you mean 8086 like 16-bit then the answer is no. As far as I
know the public GCC archives do not target it.

Cygnus does offer GCC based compilers [or they used to at least] for
various 8 and 16-bit platforms which most likely included the 8086 [186
and 286, etc] but they're not free.

To answer the question in general ... others have answered it. To sum
up, GCC is often used as a "cross-compiler" which means you build for a
TARGET platform which is not your HOST platform. GCC is a bit weirder
that it also has a BUILD platform. That is, you can build a cross
compiler on platform A, to run on platform B and build code for
platform C. [my apologies if I got the names mixed up].

Tom
 
K

Keith Thompson

Tom St Denis said:
chandanlinster said:
I was just curious to know whether there is an option within the gcc
compiler that lets us produce object code for 16-bit processor, while
we are working on 32-bit machines.

Assuming you mean 8086 like 16-bit then the answer is no. As far as I
know the public GCC archives do not target it.

Cygnus does offer GCC based compilers [or they used to at least] for
various 8 and 16-bit platforms which most likely included the 8086 [186
and 286, etc] but they're not free.
[...]

That raises some interesting licensing questions which are, of course,
completely off-topic here.

Followups redirected. If you want to discuss it further, try
gnu.misc.discuss or misc.int-property.
 
T

Tom St Denis

Keith said:
That raises some interesting licensing questions which are, of course,
completely off-topic here.

Followups redirected. If you want to discuss it further, try
gnu.misc.discuss or misc.int-property.

For someone who complains about the nasty and rude behaviours of
others, you certainly are no shining example of maturity.

I'm sorry you don't like the regulars here [which I'm not really one
of] but that's no reason to reply to everything with childish
hostility.

Tom
 
K

Keith Thompson

Tom St Denis said:
Keith said:
That raises some interesting licensing questions which are, of course,
completely off-topic here.

Followups redirected. If you want to discuss it further, try
gnu.misc.discuss or misc.int-property.

For someone who complains about the nasty and rude behaviours of
others, you certainly are no shining example of maturity.

I'm sorry you don't like the regulars here [which I'm not really one
of] but that's no reason to reply to everything with childish
hostility.

No rudeness or hostility was intended.

I meant exactly what I said: what you wrote upthread:

| Cygnus does offer GCC based compilers [or they used to at least] for
| various 8 and 16-bit platforms which most likely included the 8086 [186
| and 286, etc] but they're not free.

does raise some interesting licensing questions. gcc itself is
covered by the GPL. I'm not sure how a gcc based compiler can be
non-free. I'm *not* saying it can't be, I'm saying I'm not sure how.
I'm also aware of the important distinction between "free as in beer"
and "free as in speech", but I'm no expert in this field. In fact,
I'm curious myself about the details.

Since this has nothing to do with C, I didn't want to start a long
discussion of it here in comp.lang.c. I also didn't want to redirect
the thread either to gnu.misc.discuss or to misc.int-property. By
redirecting followups to /dev/null *and* explicitly mentioning in the
body of my article that followups had been redirected, I intended to
(a) discourage a long off-topic discussion here in comp.lang.c and (b)
encourage anyone interested to discuss the issue in a more appropriate
newsgroup.

I understand that redirecting to /dev/null might seem rude, an
indication that the discussion is of no value; that wasn't my intent
in this case. And of course you managed to override the redirection
yourself.

As for your "I'm sorry you don't like the regulars here", I have no
idea what that's supposed to mean. Perhaps you'e confused me with
someone else.
 
T

Tom St Denis

Keith said:
No rudeness or hostility was intended.

I meant exactly what I said: what you wrote upthread:

| Cygnus does offer GCC based compilers [or they used to at least] for
| various 8 and 16-bit platforms which most likely included the 8086 [186
| and 286, etc] but they're not free.

does raise some interesting licensing questions. gcc itself is
covered by the GPL. I'm not sure how a gcc based compiler can be
non-free. I'm *not* saying it can't be, I'm saying I'm not sure how.
I'm also aware of the important distinction between "free as in beer"
and "free as in speech", but I'm no expert in this field. In fact,
I'm curious myself about the details.

Well the GPL says you have to provide the source to your modifications.
It never said for free. It also never said you have to provide it to
the public either. Only to those who receive the corresponding binary.


So for instance, I could sell a copy of GCC for 300$ per seat, then to
the licensee holders send them a copy of the GPL'ed source [including
my modifications if any]. They could then turn around and productize
that but chances are they're not going to. Specifically if your
modifications are of value [e.g. hard to improve on without talent].

So it's not likely that people will copy the code and then try to
compete because they would have to be able to actually improve the
compiler in much the way Cygnus does (they contributed code back to the
public too btw).

So your "value" is that you can provide, maintain, upgrade and support
development tools. You can form a business around this provided you
can find the talent to work the product.
Since this has nothing to do with C, I didn't want to start a long
discussion of it here in comp.lang.c. I also didn't want to redirect
the thread either to gnu.misc.discuss or to misc.int-property. By
redirecting followups to /dev/null *and* explicitly mentioning in the
body of my article that followups had been redirected, I intended to
(a) discourage a long off-topic discussion here in comp.lang.c and (b)
encourage anyone interested to discuss the issue in a more appropriate
newsgroup.

The best way to discourage a long winded off-topic thread is to not
participate in it.

See you use what we call hyperbole. You take things to an extreme to
try and make a point, all while you can BOTH reply to the OP and tell
them it's off topic politely. Instead you chime in about some moral
superiority all the other kids don't like me so I'm going to sulk about
it and cry like the child I am, bullshit.
I understand that redirecting to /dev/null might seem rude, an
indication that the discussion is of no value; that wasn't my intent
in this case. And of course you managed to override the redirection
yourself.

Yeah, your ruse didn't foil me.

Tom
 
R

Richard Heathfield

Tom St Denis said:

The best way to discourage a long winded off-topic thread is to not
participate in it.

For off-topic discussions to dominate the group, it is necessary only for
those who don't want them to do nothing.
See you use what we call hyperbole.

Oh, the irony.

<snip>
 
K

Keith Thompson

Tom St Denis said:
Keith said:
No rudeness or hostility was intended.

I meant exactly what I said: what you wrote upthread:

| Cygnus does offer GCC based compilers [or they used to at least] for
| various 8 and 16-bit platforms which most likely included the 8086 [186
| and 286, etc] but they're not free.

does raise some interesting licensing questions. gcc itself is
covered by the GPL. I'm not sure how a gcc based compiler can be
non-free. I'm *not* saying it can't be, I'm saying I'm not sure how.
I'm also aware of the important distinction between "free as in beer"
and "free as in speech", but I'm no expert in this field. In fact,
I'm curious myself about the details.

Well the GPL says
[snip]

I said I was curious about the details. That wasn't a request for you
to explain them *here*. If you want to start a thread in a more
appropriate newsgroup, I'll be glad to read it. If not, that's fine.
The best way to discourage a long winded off-topic thread is to not
participate in it.

And yet here you are.
See you use what we call hyperbole. You take things to an extreme ton
try and make a point, all while you can BOTH reply to the OP and tell
them it's off topic politely. Instead you chime in about some moral
superiority all the other kids don't like me so I'm going to sulk about
it and cry like the child I am, bullshit.

I honestly don't know (or care) what you're talking about. (Yes, now
I'm being rude.) If you're referring to something I've written in
this thread, I can only suspect that you're making it up,
intentionally or otherwise. If you're referring to other things I've
written in this newsgroup, I suggest that dragging it into this thread
is less than productive.
Yeah, your ruse didn't foil me.

It wasn't a ruse. It was *intended* to be obvious. You were able to
figure it out; I presume anyone else would as well. If it had been a
ruse, I wouldn't have mentioned in the body of my message that I had
redirected followups.

To summarize what I was *trying* to say upthread:

This raises some interesting questions about licensing. These
questions are not topical in this newsgroup, so I won't elaborate
here. If someone wants to discuss it, I suggest doing so in a
more appropriate newsgroup.

You seem to have some problem with that, or with me. That's just too
bad.
 
T

Thad Smith

chandanlinster said:
I was just curious to know whether there is an option within the gcc
compiler that lets us produce object code for 16-bit processor, while
we are working on 32-bit machines.
<OT> There is a GCC compiler which targets the TI MSP430 16-bit
processor and runs on supported platforms, including many 32-bit hosts.
</OT>
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top