Compiler Support on StarCore
Exercise 6:
Intermediate version: Compromise between Memory and 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. | *** |
********************************************************************** | |
* | * |
* 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 | * |
Introduction to the SC140 Tools | 31 |