Question: Code in X86 assembly please1. First clear all your general purpose registers by moving the value 0 into them. Initialize a variable for a BYTE,

Code in X86 assembly please1. First clear all your general purpose registers by moving the value 0 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 0FFFFFFFFh

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

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!