Question
Closestdata.asm: A: .word -491 .word 490 .word 144 .word -107 .word 257 .word -233 .word -388 .word 427 .word -324 .word 269 .word 179 .word
Closestdata.asm:
A: .word -491 .word 490 .word 144 .word -107 .word 257 .word -233 .word -388 .word 427 .word -324 .word 269 .word 179 .word 41 .word -433 .word 461 .word 248 .word 259 .word 397 .word -326 .word 435 .word -37 .word -446 .word 410 .word 73 .word -338 .word 329 .word 272 .word -216 .word -173 .word -125 .word 117 .word 179 .word -387 .word 497 .word -375 .word -185 .word 490 .word 338 .word 425 .word 13 .word 447
B: .word -310 .word 9 .word -266 .word -346 .word -179 .word -255 .word -398 .word 94 .word -35 .word 448 .word 360 .word 367 .word -498 .word -260 .word -132 .word 418 .word 412 .word -494 .word -53 .word -469 .word 63 .word 35 .word -322 .word -163 .word -177 .word -22 .word 390 .word 134 .word -52 .word -188 .word -483 .word 325 .word 107 .word -402 .word 104 .word -322 .word 31 .word -421 .word 475 .word 391
Problem 3: Closest Points (20 points) Problem Description: 'A' is an array of 20 items. Each item consists of two words, representing an x and a y coordinate for a point in the plane. 'B' is an array of another 20 items and organized similarly. The vertices of each point will be between - 500 and +500. The distance between points A[i] and B[i], for a particular i, is (ACE). 2 B[7.x)+(A7, y BLE),y)?' Write an Assembly program to find the value of i (from 0 to 19) such that A[i] and B[i] are the closest to each other. Print the result. Initialize your arrays with the following values. If your program is working correctly, it should print 8. Note: You do not have to take square roots to write this program. sqrt(p)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started