Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly (ARM) write two function. One to compute quadratic (ax^2 + bx + c). One to compute sqrt(n). I have attached the other problems I

Assembly (ARM) write two function. One to compute quadratic (ax^2 + bx + c). One to compute sqrt(n). I have attached the other problems I solved when writing the ARM Assembly code for example. Best CORRECT answer will get many points. Thanks!

image text in transcribed

image text in transcribed

Course Project Filename Date COEN 20 (Embedded Systems) #4 : lab4. : 02/05/2018 k/ unified cortex-m4 .syntax . cpu .text .thumb func .align 2 Discriminant .global .global Root1 global Root2 .global Quadratic .global SquareRoot Discriminant: MUL LSL MLS BX /7 Computes b*b // Computes a4 R1, R1,R1 RO, RO,2 R0, R0, R2,R1 /7 Computes b 2 - 4a*c LR Root1: LDR SUB ADD LSL SDIV R3, =0 R1, R3, R1 R1,R1,R2 R0, Re,1 R0, R1, RO LR // Store the value in R3 // Store in R1, 0-b =-b /7 Computes-b +sqrtd /7 Computes 2*a /7Computes-b sqrt d / 2a Root2: LDR SUB SUB LSL SDIV BX .end R3, 0 R1, R3,R1 R1, R1,R2 RO, R0,1 R0, R1, R0 LR // Store the value in R3 // Store in R1, 0-b =-b /7Computes -b -sqrt_d // Computes 2*a /7 Computes-b-sqrt_d / 2%a Course Project Filename Date COEN 20 (Embedded Systems) #4 : lab4. : 02/05/2018 k/ unified cortex-m4 .syntax . cpu .text .thumb func .align 2 Discriminant .global .global Root1 global Root2 .global Quadratic .global SquareRoot Discriminant: MUL LSL MLS BX /7 Computes b*b // Computes a4 R1, R1,R1 RO, RO,2 R0, R0, R2,R1 /7 Computes b 2 - 4a*c LR Root1: LDR SUB ADD LSL SDIV R3, =0 R1, R3, R1 R1,R1,R2 R0, Re,1 R0, R1, RO LR // Store the value in R3 // Store in R1, 0-b =-b /7 Computes-b +sqrtd /7 Computes 2*a /7Computes-b sqrt d / 2a Root2: LDR SUB SUB LSL SDIV BX .end R3, 0 R1, R3,R1 R1, R1,R2 RO, R0,1 R0, R1, R0 LR // Store the value in R3 // Store in R1, 0-b =-b /7Computes -b -sqrt_d // Computes 2*a /7 Computes-b-sqrt_d / 2%a

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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Fill out the truth table for this half adder circuit

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago