//int main(){
 //char8 au8_X1[6]={0x91,0xD4,0x80,0x70,0x81,0x20};
 //char8 au8_X2[6]={0x6E,0x2A,0xF5,0X8C,0x7A,0xF8};
 //i8vec_add(char8* pi8_a, char8* pi8_b, uint8 u8_cnt)

// This subroutine adds the contents of two integer arrays
// The number of elements to add given by cnt
#include "pic24_all.h"
#include <stdio.h>

void i16vec_add(int16* pi16_a, int16* pi16_b, uint8 u8_cnt) {
  while (u8_cnt != 0) {
    //do the following
    *pi16_a = *pi16_a + *pi16_b;
    pi16_a++; pi16_b ++;
   u8_cnt--;
    }
  }

Recommended Answers

what's the question??

Jump to Post

All 2 Replies

what's the question??

i need to convert the C code to assembly using the 2 array1 provided!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.