Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

// Write an assembly language version of the following C code segment: char A[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

// Write an assembly language version of the following C code segment:

char A[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} char B[10] = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20}

for (char i=1; i<10; i++) { A[i] = A[i-1] + B[i]; }

// the .h and .ino file are provided and we are of course being asked to write our own .S file. This question is an // example of a question that is going to be on an exam and I'm completely stuck here at home.

// .ino code

#include "Practice3.h"

void setup() {

compute(); Serial.begin(9600); for (int i=0; i<10;i++) Serial.println(dataA[i], DEC); }

void loop() { }

// the .h file provided...

/* * Global register variables. */ #ifdef __ASSEMBLER__

/* Assembler-only stuff */

#else /* !ASSEMBLER */

/* C-only stuff */

#include

extern "C" void compute(); extern "C" uint8_t dataA[];

#endif /* ASSEMBLER */

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Plan, write, and format letters

Answered: 1 week ago

Question

7. Where Do We Begin?

Answered: 1 week ago

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago