Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A. (8 points) Implement the following expression in assemblylanguage: AX = val2 + 9 + val3 - val1 Assume that val1, val2, and val3 are

A. (8 points) Implement the following expression in assemblylanguage:
AX = val2 + 9 + val3 - val1
Assume that val1, val2, and val3 are 16-bit integer memoryvariables.
? Besides, val2 and val3 are unsigned integer while val1 is signedinteger.
? Assign val2=11, val3=16, val1=6.
? Use the debugger to verify the result in AX.
? Report AX value in decimal as part of the Comment header:
Comment header for .ASM files:
Student:
Class:
Assignment#: 3-1
Description: This program ………….
Result: AX= in decimal
o Submit the following:
- Lastname1.asm
B. (7 points) Write a program that contains fourinstructions:
- add the number 10 to the EAX register,
- add 8 to the EDX register,
- add 3 to ax register,
- add 2 to al register.
? Build the program and make sure it has no error.
? Run the program and make sure it works.
? Generate a listing file and examine the machine code generated bythe assembler.
- What differences, if any, did you find between the instructionsformats?

Step by Step Solution

3.44 Rating (167 Votes )

There are 3 Steps involved in it

Step: 1

Lines starting with semicolon are comments Lines sta... 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_2

Step: 3

blur-text-image_3

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

Applied Regression Analysis And Other Multivariable Methods

Authors: David G. Kleinbaum, Lawrence L. Kupper, Azhar Nizam, Eli S. Rosenberg

5th Edition

1285051084, 978-1285963754, 128596375X, 978-1285051086

More Books

Students also viewed these Programming questions