Question: Please use C++ and write two functions. One function for the first question and another function for the second function. 1. First clear all your

Please use C++ and write two functions. One function for the first question and another function for the second function.
1. First clear all your general purpose registers by moving the value O into them. Initialize a variable for a BYTE, WORD, DWORD storage size each with any desired value in the data segment. Initialize another variable called Result with the size of a DWORD and make the value as an uninitialized value. In the code segment, create a label called L1 and within that label it will move the variables into the appropriate sized register and make sure NOT to overwrite them in the process. After, create another label L2 that adds all these values together and at the end of your program make sure your ECX register contains the final value. Call the DUMPREGS instruction to display your register values and move the final result into the Result variable. 2. Use the following code below as a template and follow the instructions written in the comments Assume I have the following data segment written: data val1 BYTE 10h val2 WORD 8000h val3 DWORD OFFFFFFFFh val4 WORD 7FFFh .code ;1. Write an instruction that increments val2. ;2. Write an instruction that subtracts val3 from EAX. ;3. Write instructions that subtract val4 from val2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
