Difference between revisions of "Assembler"
m |
m |
||
Line 22: | Line 22: | ||
==Links== | ==Links== | ||
− | [http://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.aixassem/doc/alangref/alangref.pdf AIX assembler] AIX assembler manual (not AS!) with | + | [http://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.aixassem/doc/alangref/alangref.pdf AIX assembler] AIX assembler manual (not AS!) with detailed descriptions of the PowerPC instructions |
[http://www.freescale.com/files/product/doc/MPCFPE32B.pdf MPCFPE32B.pdf] The special PowerPC instructions are documented in chapter 8 of this manual | [http://www.freescale.com/files/product/doc/MPCFPE32B.pdf MPCFPE32B.pdf] The special PowerPC instructions are documented in chapter 8 of this manual |
Revision as of 12:17, 8 August 2009
Assembler programming for the WII
It is possible to write assembler programs for the Wii and this describes how to do it.
Writing games and applications in C or C++ is of cause more efficient. However, it is not forbidden to use Assembler for the WII. If you are interested in assembler programming then give it a try and do it!
The devkitpro toolchain uses the GCC C/C++ compiler. This compiler uses the AS (or GAS) assembler to assemble the code. The AS assembler has a different syntax to most other assemblers since it does not use the Intel syntax but the AT&T syntax which is very different from the Intel syntax. The advantage of the AS assembler among other features is that it can generate code not only for Intel processors but for a lot of different processors as well such as the PowerPC processor. So it supports instructions like stmw, stwu, mflr, mtlr, blr etc.
The assembler code usually has to call the C functions of the devkitpro package which provide support for the WII such as querying the Wiimote. So you have to link these with your assembler code.
Resources
Application Note to compile and run assembler programs on the WII
Tutorial for the PowerPC processor instructions and the AS assembler
Links
AIX assembler AIX assembler manual (not AS!) with detailed descriptions of the PowerPC instructions
MPCFPE32B.pdf The special PowerPC instructions are documented in chapter 8 of this manual
SVR4ABI.pdf or [1] The PowerPC Processor ABI Supplement
Introduction to assembly on the PowerPC