LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 03-24-2005, 03:34 PM   #1
lowpro2k3
Member
 
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).

thanks.

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
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
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.
 
  


Reply


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


All times are GMT -5. The time now is 07:28 PM.

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