Question No 5 1. Assume that the following variables have been defined: .data val1 dw 2000h val2 dw1000h val3 dw 0 The following statements call a procedure named Exchange, using stack parameters:...


Question No 5<br>1. Assume that the following variables have been defined:<br>.data<br>val1 dw 2000h val2<br>dw1000h val3 dw 0<br>The following statements call a procedure named Exchange, using stack parameters:<br>push offset val1 push<br>offset val2<br>call Exchange<br>add sp,4<br>The Exchange procedure exchanges the values of val1 and val2, so that after the call,<br>val1 equals 1000h and val2 equals 2000h. Here is the beginning of Exchange: Exchange<br>proc Exchange<br>push ebp<br>mov ebp,esp<br>What instructions should occur next in the Exchange procedure to complete the exchange of<br>the values inside the two variables that were passed to this function?<br>

Extracted text: Question No 5 1. Assume that the following variables have been defined: .data val1 dw 2000h val2 dw1000h val3 dw 0 The following statements call a procedure named Exchange, using stack parameters: push offset val1 push offset val2 call Exchange add sp,4 The Exchange procedure exchanges the values of val1 and val2, so that after the call, val1 equals 1000h and val2 equals 2000h. Here is the beginning of Exchange: Exchange proc Exchange push ebp mov ebp,esp What instructions should occur next in the Exchange procedure to complete the exchange of the values inside the two variables that were passed to this function?

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here