0

I would like to learn PPC so I want to know the best way to learn. It is to compile my own C/C++ code in PowerPC architecture and then see the assembly output of my code. Is this possible on windows 7 OS?

hata
  • 11,633
  • 6
  • 46
  • 69
user3287975
  • 95
  • 1
  • 4
  • sure, if you were running NT 3.x or 4.x on a PPC system, or find a PPC emulator for x86 windows... – Marc B Dec 10 '14 at 14:55

4 Answers4

0

The answer given to this question about PowerPC emulation is the most appropriate if you want to stay with the idea to develop on Windows, use

If you really want to develop on PowerPC, you could also consider buying an evaluation board or a second-hand G3 or G4 based Mac.

Community
  • 1
  • 1
amigadev
  • 396
  • 1
  • 5
0

I have used GCC targeting PPC architectures using Cygwin on Windows. Most PPC development boards comes with precompiled binaries. GCC can generate Assembly output.

Gerhard
  • 6,850
  • 8
  • 51
  • 81
0

QEMU can emulate PowerPC.

As others have mentioned, you can procure a PPC cross compiler toolchain, and examine the emitted output of C programs. This is a great way to learn assembly language programming for a new architecture.

Also, old PowerPC Macintoshes are sometimes available on the used market for cheap. (less than $100) For example, a G4 IMac runs about $75, and can run Linux. In such a case the native compiler will emit PPC assembly, so no need to deal with cross compiling nor emulation.

Unfortunately, there seem to be no cheap PowerPC single-board computers (SBCs), unlike ARM, where you have the Raspberry Pi at ~$35, among others.

0

If you just want to read the assembly, the best way to do this is to use the GodBolt Compiler Explorer on the web rather than on Windows 7. For example, this is a simple C function compiled with gcc 4.8.5 for PowerPC. Using the Compiler Explorer, you can compare compilers across vendors, architectures, versions and flags.

Olsonist
  • 2,051
  • 1
  • 20
  • 35