Overview In this question, you will create an amd64/x86-64 assembly language program that loops through an array of inte

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Overview In this question, you will create an amd64/x86-64 assembly language program that loops through an array of inte

Post by answerhappygod »

Overview In This Question You Will Create An Amd64 X86 64 Assembly Language Program That Loops Through An Array Of Inte 1
Overview In This Question You Will Create An Amd64 X86 64 Assembly Language Program That Loops Through An Array Of Inte 1 (84.15 KiB) Viewed 23 times
USE ASSEMBLY LANGUAGE ON INTEL USING ONLY ASSEMBLY
extern printf
extern scanf
global main
section .text
main:
; YOUR CODE GOES HERE
ret
section .data
Overview In this question, you will create an amd64/x86-64 assembly language program that loops through an array of integers between 1 and 1000, and calculates and prints the minimum of the all odd integers in the array. Instructions For your convenience, this zip file contains the outline code (finalexam_assembly.asm) and a Makefile which will build a program with the name finalexam_assembly.asm, and creates an executable named finalexam_assembly.out: • starter_code.zip (you will need to extract this file into a known location on your system) Put your code into the file called finalexam_assembly.asm (to prevent accidentally uploading the wrong file). The outline for this part is as follows: 1. Declare an array of integers, called "numbers" The values should be: 2, 18, 5, 36, 19, 25, 22, 37, 24, 32 2. Declare an integer, called "count" This will contain the length of the array, 10 3. Declare an integer, called "userMin" Only array elements strictly greater than this minimum will be considered 4. Declare a variable to store the minimum odd value of those larger than userMin) in the array, called "minimum" 5. Display a prompt to the user, asking for a minimum threshold, put this value into userMin 6. Find the minimum of all odd elements in the array that are greater than userMin Put this value into minimum Exit the loop when you have examined length numbers from the array 7. Generate a search summary, which displays the minimum of the odd array elements greater than userMin (minimum) (see sample output, below) Note: You are not required to, and should not, input numbers from the user. You must initialize your array with the numbers given above.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply