Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly ... 1. The x86-64 processor has sixteen 64-bit registers (all but RBP and RSP are GPRs): RAX, RBX, RCX, RDX, RDI, RSI, RBP, RSP,

Assembly ...

1. The x86-64 processor has sixteen 64-bit registers (all but RBP and RSP are GPRs): RAX, RBX, RCX, RDX, RDI, RSI, RBP, RSP, R8, R9 , R10, R11, R12, R13, R14, R15. It is also possible to reference a chunk of a 64-bit register (i.e., a sub-register). For example, what does EAX refer to?

2. What is the difference between these two instructions?

 mov rax, stuff mov eax, stuff

3. The second argument that you pass to scanf in rsi determines where the information read from the keyboard goes. Explain why, in the code below, to read in a string you use 'mov' and to read an int you use 'lea'.

 ;; read in a string mov rdi, dword str_fmt mov rsi, dword buffer call scanf ;; read in an integer mov rdi, dword num_fmt lea rsi, [rbp-8] call scanf

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

Step: 3

blur-text-image

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

Question How are IRAs treated for state tax law purposes?

Answered: 1 week ago