Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions