Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

68k and/or PPC assembly compiler in CW 7.2?

322 views
Skip to first unread message

petrock99

unread,
Mar 20, 2002, 5:22:56 AM3/20/02
to
I have a bunch of legacy 68k and PPC assembly files that I need to compile
with CW 7.2. There is way to much to convert over to a higher level
language like C/C++ etc (if it aint broke, don't fix it). We use gcc and
MPW to compile them and link the resulting .o files into Mach-O and CFM
apps. I would like to get everything running in CW so I don't have to use
gcc or MPW anymore. Is this do-able?

I know I'm reaching for the 68k compiler, but I would figure that there
would be a PPC assembly compiler somewhere...

Thanks for any help...

--Rob


Bob Bradley

unread,
Mar 20, 2002, 6:24:05 AM3/20/02
to
In article <B8BDA32C.39D2%petrock9...@hotmail.com>,
petrock99 <petrock9...@hotmail.com> wrote:

CodeWarrior includes a PowerPC assembler. Just name your files with a .s
extension and you can add them to the project. It uses PPCAsm syntax.

MW Ron

unread,
Mar 20, 2002, 9:48:10 AM3/20/02
to

You should be able to add the assembly files to a CW project and build
them. As for 68k you can add the 68k compilers from Pro 6 to CW 7 and
use them there too.


Copy over the 68K compiler, linker, and preference panel plug-ins from
CodeWarrior 6.x

If you are going to do any C/C++ programming

Rebuilt the 68K libraries using CodeWarrior 7 using updated targets from
the CodeWarrior 6 projects.
Make a MacHeaders68K.pch precompiled header file that contains
MacHeaders.c and precompile it. (Use the previous version as a guide)

If you are serious about 68k you may want to create your own stationery.

--
TOP PICK HandHeld Computing - issue 4.5
"The best overall development tool for the Palm OS"

Metrowerks, maker of CodeWarrior - "Software Starts Here"
Ron Liechty - MW...@metrowerks.com - http://www.metrowerks.com

petrock99

unread,
Mar 20, 2002, 6:58:20 PM3/20/02
to
Thanks... That should do the trick...

Now the only question I have is... The PPC assembly will need to be linked
to a Mach-0 app. Will the PPC assembler generate Mach-0 code? Or xcoff?
Please say Mach-O... Thanks again...

--Rob


On 3/20/02 3:24 AM, in article bob-D42B59.0...@news.apple.com,

David 'Potatoswatter' Krauss

unread,
Mar 21, 2002, 5:49:58 PM3/21/02
to
In article <B8BE621C.5478%petr...@hotmail.com>, petrock99
<petr...@hotmail.com> wrote:

> Thanks... That should do the trick...
>
> Now the only question I have is... The PPC assembly will need to be linked
> to a Mach-0 app. Will the PPC assembler generate Mach-0 code? Or xcoff?
> Please say Mach-O... Thanks again...
>
> --Rob

Sorry - no. PPCAsm in CW only works for PEF targets. OS X includes an
assembler, "as", which I've ranted against before in this group (see
Google if you want). This is completely incompatible with the PPCAsm
syntax.

Runtime barriers, though unnecessary, exist between PEF and Mach-O.
Mach-O does not use a table of contents; all data is PC-relative. On
the PPC this is very, very bad. R2 is not used by GCC at all; there's
no reason it can't be initialized to be a TOC anchor. I'd recommend
this practice to anyone doing optimized asm on X.

So, you'll need to rewrite your code, and it's not just grepping. Or
call from Mach-O to CFM.

Also, no 68k assembler has ever existed for CW. The C compilers support
embedded assembly, but if you have MPW asm sources, you're stuck with
ToolServer at best. To get the 68k C compiler and linkers, find a copy
of CW6 and copy the appropriate files from the Linkers and Compilers
folders.

- Potatoswatter

0 new messages