Question: Find Min/Max Array values Given an array of signed quadwords, find the minimum and maximum values stored in that array. The starter code given contains

Find Min/Max Array values

Given an array of signed quadwords, find the minimum and maximum values stored in that array. The starter code given contains an array named array1, and two variables, minval and maxval for storing the minimum and maximum values respectively. Upon completion of the program, minval and maxval should contain the appropriate values.

global _start ; exposes program entry point to the linker

section .text ; start of code segment

_start:

; End the program mov rax, 0x3c ; system call for exit xor rdi, rdi ; exit code 0 syscall ; invoke operating system call

section .data ; start of initialized data segment

array1 dq 45,21,-7,17,-33,25,0,-14,35,-33,42,18,-3,7,-34 array1_len equ ($-array1)/8

section .bss ; start of uninitialized data segment

minval resq 1 maxval resq 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!