Motorola SC140 user manual Good To Know

Page 8

Compiler Support on StarCore

11.Compare the fractional assembly instructions generated to the assembly integer instructions.

12.Recompile the code without the -Soption to produce an executable file.

13.Run the code using runsc100. The variables “res” and “fres” should print to the screen. What is the algebraic relationship between these two variables?

Congratulations, you have completed Exercise 2.

Good To Know

To perform fractional operations:

Intrinsics are used.

The variable types remain integer.

The header file prototype.h should be included in the C source file.

All assembly instructions (compiler generated or hand written) between square brackets [ ] execute in parallel as a single execution set.

8

Introduction to the SC140 Tools

Image 8
Contents Motorola Typical development process is represented in Figure Compiler Good To Know File I/O ExerciseHands On 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