energia/Energia — pull request #48 by robertinant (2012-05-15 04:56:07+00:00)
Title: Fix for Issue 47

Members, can you do a quick review on this before I pull it into master?
Patch was tested using the following library and sketch:

Header file: `test.h`
```
#include
#ifdef __cplusplus
extern "C"{
#endif
extern uint16_t asm_test(uint8_t x, uint8_t y);
#ifdef __cplusplus
}
#endif
```
assembly file: ```test.S```
```
#include

;uint16_t asm_test(uint8_t x, uint8_t y)
.section .text.asm_test
.global asm_test
.type asm_test, @function
.func asm_test
asm_test:
add.w r14, r15
ret
.endfunc
```
Sketch file:
```
#include
#include

TimerSerial mySerial;

void setup() {
mySerial.begin();
}

uint8_t i = 0;
void loop() {
uint16_t ret = asm_test(i, i);

mySerial.print("value = ");
mySerial.println(ret);

delay(500);

i++;
}
```
Sketch output:
```
value = 0
value = 2
value = 4
value = 6
value = 8
value = 10
value = 12
value = 14
```