Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions