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

Page 8
Image 8
Motorola SC140 user manual Good To Know