Compiler Support on StarCore
var0 = | /* var0 = |
}
/*** Truncate results and store in y[] ***/
y[n] = extract_h(res0); y[n+1] = extract_h(res1); y[n+2] = extract_h(res2); y[n+3] = extract_h(res3);
x_ptr += 20; /* Increment pointer by 20 to point to x[n+7] for next iteration */
}
/*** Print results, y[] ***/
for (n=0; n<32; n++)
{
printf ("y[%d] = 0x%04hX\n", n, y[n]);
}
}
Further Optimizing the Speed
/*****************************************************************************
* | MOTOROLA INC. |
* | SEMICONDUCTOR PRODUCTS SECTOR |
* | COPYRIGHT 1999 MOTOROLA INC. |
*******************************************************************************
* | INTRODUCTION TO THE SC140 TOOLS |
* | Developed by MOTOROLA SPS/NCSG/WISD |
*******************************************************************************/
/*
#include <stdio.h> #include <prototype.h>
short a[12]={0x1000,0x2000,0x3000,0x4000,0x5000,0x6000, 0x7000,0x8000,0x9000,0xA000,0xB000,0xC000};
short input[32+11]={0,0,0,0,0,0,0,0,0,0,0, /*
short y[32]; /**********************************************************************
*** For reference, the following output should be observed after | *** |
*** running the code. | *** |
********************************************************************** | |
* | * |
Introduction to the SC140 Tools | 33 |