The code segment below is to get the value of Ali) for an integer array A[N][M] for some constant values N and M. Assume the address of the array is in %rdx, the row is in %rdl and the column is in %rsi. shl $4, rdi lea ($rsi, &rdi, 4),rax mov ($rdx, rax, 4), teax Based on the code above, what is the number of columns (the value of M) in array A? You may give your answer in hex (starting with Ox) or in decimal.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 10RQ
icon
Related questions
Question

Need help with CS question 

The code segment below is to get the value of Ai][] for an integer array A[N][M] for some constant values N and M. Assume the address of
the array is in %rdx, the row is in %rdi and the column is in %rsl.
shl $4, rdi
lea ($rsi, &rdi, 4), $rax
mov (Srdx, &rax,4), $eax
Based on the code above, what is the number of columns (the value of M) n array A?
You may give your answer in hex (starting with Ox) or in decimal.
Transcribed Image Text:The code segment below is to get the value of Ai][] for an integer array A[N][M] for some constant values N and M. Assume the address of the array is in %rdx, the row is in %rdi and the column is in %rsl. shl $4, rdi lea ($rsi, &rdi, 4), $rax mov (Srdx, &rax,4), $eax Based on the code above, what is the number of columns (the value of M) n array A? You may give your answer in hex (starting with Ox) or in decimal.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning