Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-24-2005, 03:34 PM   #1
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
Can gcc cross-compile C code to M68K Assembly?

I have a class in this so it would be really handy to be able to write c/c++ code and compile it into Motorolla M68000 assembly for me to read/view. The M68000 only has 8 data registers, and 7 address registers (plus user/supervisor stack pointer).


edit: btw, would the command be the same for C++ code? I'm not good at C so I'd rather use c++/g++ instead of c/gcc, but I could learn enough C if g++ wont do the cross-compile.

Even if I have to get another compiler I wouldn't mind.

A 68K emulator would be a nice tool to have too, I heard gdb can do it but I've never really used gdb before...

Last edited by lowpro2k3; 03-24-2005 at 03:36 PM.
Old 03-25-2005, 07:50 AM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
It sure can. Last time I built an m68k cross compiler I used these instructions. It wouldn't surprise me if you could find a pre-built slackware package around either.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange GCC compile error with C code exvor Programming 16 08-23-2005 06:05 PM
doubts about assembly code generated from gcc morph_ind Programming 9 05-28-2005 12:08 AM
why gcc permit this code to compile? is there a reason? zeppelin Programming 10 04-30-2004 04:54 AM
Setting up GCC for cross-compile ugenn Linux - Software 0 02-20-2003 09:08 AM
Command for getting assembly code aizkorri Programming 1 06-18-2002 05:04 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:50 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration