Question: 1. The second argument that you pass to scanf in rsi determines where the information read from the keyboard goes. Explain why, in the code

1. 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

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!