EasyManuals Logo

Texas Instruments C28 Series Student Guide

Texas Instruments C28 Series
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #341 background imageLoading...
Page #341 background image
OPTIONAL Lab D2: C Callable Assembly
Now we need to return the result. To return a value to the calling routine you will need to
place your 32-bit value in the ACC. What register is the result currently in? Adjust your
code, if necessary.
13. Save the assembly file as sop-asm.asm. (Do not name it LabD2.asm because the
compiler has already created with that name from the original LabD2.c code).
Defining the Function Prototype as External
14. Note in LabD2.c an “extern” modifier is placed in front of the sum-of-products function
prototype:
extern int sop(int*,int*,int); //sop function prototype
Verify Assembly Sum of Products Routine
15. Remove the sop-c.c file from the project and add the new sop-asm.asm assembly
file to the project.
16. Rebuild and verify that the new assembly sum-of-products routine produces the same
results as the C function.
End of Exercise
C28x – C Programming D - 19

Table of Contents

Other manuals for Texas Instruments C28 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C28 Series and is the answer not in the manual?

Texas Instruments C28 Series Specifications

General IconGeneral
BrandTexas Instruments
ModelC28 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals