Motorola SC140 user manual Compiler Support on StarCore

Page 34

Compiler Support on StarCore

* y[0] = 0x0020

*

* y[1] = 0x0080

*

* y[2] = 0x0140

*

* y[3] = 0x0280

*

* y[4] = 0x0460

*

* y[5] = 0x0700

*

* y[6] = 0x0A80

*

* y[7] = 0x0D00

*

* y[8] = 0x0EA0

*

* y[9] = 0x0F80

*

* y[10] = 0x0FC0

*

* y[11] = 0x0F80

*

* y[12] = 0x0F40

*

* y[13] = 0x0F00

*

* y[14] = 0x0EC0

*

* y[15] = 0x0E80

*

* y[16] = 0x0E40

*

* y[17] = 0x0E00

*

* y[18] = 0x0DC0

*

* y[19] = 0x0D80

*

* y[20] = 0x0D40

*

* y[21] = 0x0D00

*

* y[22] = 0x0CC0

*

* y[23] = 0x0C80

*

* y[24] = 0x0C40

*

* y[25] = 0x0C00

*

* y[26] = 0x0BC0

*

* y[27] = 0x0B80

*

* y[28] = 0x0B40

*

* y[29] = 0x0B00

*

* y[30] = 0x0AC0

*

* y[31] = 0x0A80

*

**********************************************************************/

main()

{

long res0, res1, res2, res3; short var0, var1, var2, var3; short n, i, *x_ptr;

x_ptr = &input[14]; /* x_ptr points to input[14], which is x[3] */ for(n=0; n<32; n+=4)

{

res0 = 0; res1 = 0; res2 = 0; res3 = 0;

34

Introduction to the SC140 Tools

Image 34
Contents Motorola Typical development process is represented in Figure Compiler Hands On File I/O ExerciseGood To Know Integer and Fractional Arithmetic Exercise Interpretation of 16-bit Integer and Fractional Data ValuesCompiler Support on StarCore Integer ArithmeticFractional Arithmetic Good To Know Local Versus Global Optimization Exercise Local OptimizationCompiler Support on StarCore StarCore C Compiler Local Optimization Global OptimizationMemory Alignment Exercise AA BB CC DD First Code Section Second Code Section Split Summation Exercise Code Generated Assembly Code Multi-Sample Exercise = ∑ a i x n For 0 ≤ n LIntermediate Version Compromise Between Memory and Speed Further Speed Optimization Control Code The True Bit Exercise Save Ex7.c as Ex71.c Calling an Assembly Routine From C Exercise Current Following output should be displayed Challenge Solutions to Exercises Introduction to the SC140 ToolsExercise AlignedExpected Motorola INC Intermediate version Compromise between Memory and Speed Compiler Support on StarCore Further Optimizing the Speed Compiler Support on StarCore Compiler Support on StarCore Motorola INC Zoffset equ Moffset equ Exercise Compiler Support on StarCore Compiler Support on StarCore AN2009/D