在开始介绍 SPU 汇编语言之前,先来看一个通过递归算法计算 32 位数的阶乘的简单程序。
To begin looking at SPU assembly language, I will enter in a simple program for calculating the factorial of a 32-bit number using a recursive algorithm.
我们使用一个简单的计算器应用程序作为我们的样本的基础。
We use a simple calculator application as the basis of our samples.
这两个例子 —— 一个简单的计算器和一个解析电子邮件消息的程序,都很简单。
The examples -- a simple calculator and a program to parse e-mail messages -- are simple enough.
It's sort of the canonical hello world program as computer scientists call this very simple example.
这只是某种“hello,world“程序,即计算机界最简单的程序样例。
应用推荐