🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50983

Re: C code --> m68k assembly code

#50983
From: Joe Buck
Date: Sun, 18 Jul 1993 21:31
25 lines
1635 bytes
etsun@ecst.csuchico.edu (Edwin Tsun) writes:
>Would I be able to convert C code to 68000 assembly code using gcc?

Yes, if you have a compiler or cross-compiler configured to generate code
for a 68K based platform.

>I read the man page for gcc but it didn't help a bit.  
>Is this correct: gcc -b m68000 -S test.c

This will work if someone has built a cross-compiler with "m68000" as a
target.  In reality, though, targets are more specific than this; for
example, "m68k-sun-sunos4.1" is a target.

If you want to build a cross-compiler, read the GCC documentation to
learn how.

Another note: there are several different assembly language formats for
68000 assembly language, and different assemblers expect different ones.
For example, the Sun-3 uses a very different format than the "Motorola
format" that it appears you want.  You'll need to make sure that the
target you select causes MOTOROLA to be defined.


--
Joe Buck	jbuck@ohm.EECS.Berkeley.EDU
Technical Details
Message-ID: <22cffh$2hk@agate.berkeley.edu>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!agate!forney.eecs.berkeley.edu!jbuck
References: <22ccq7INN4i0@charnel.ecst.csuchico.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,13df56925f31ef5d
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-07-18 14:31:31 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!agate!forney.eecs.berkeley.edu!jbuck
From: jbuck@forney.eecs.berkeley.edu (Joe Buck)
Newsgroups: gnu.gcc.help
Subject: Re: C code --> m68k assembly code
Date: 18 Jul 1993 21:31:29 GMT
Organization: University of California at Berkeley
Lines: 25
Distribution: gnu
Message-ID: <22cffh$2hk@agate.berkeley.edu>
References: <22ccq7INN4i0@charnel.ecst.csuchico.edu>
NNTP-Posting-Host: forney.eecs.berkeley.edu