For each add instruction in this problem, assume that EAX contains the given contents before the instruction is executed, and give the contents of EAX as well as the values of the CF, OF, SF, and ZF flags after the instruction is executed: EAX before (a) 00 00 00 45 (b) FF FF FF 45 (c) 00 00 00 45 (d) FF FF FF 45 (e) FF FF FF FF (f) 7F FF FF FF (g) 00 00 00 99 (h) 00 00 03 AF Instruction add eax, 45 add eax, 45 add eax, -45 add eax, -45 dd eax, 1 add eax, 100 add eax, 1 add eax, 10

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Assembly Language Programming

  • The numbers in the EAX are in hexadecimal form.
  • The negative and positive numbers in the instructions are all in decimal form.
  • The result should be in hexadecimal.

Write on paper if possible. Tysm

For each add instruction in this problem, assume that EAX contains the given
contents before the instruction is executed, and give the contents of EAX as well as
the values of the CF, OF, SF, and ZF flags after the instruction is executed:
EAX before
(a) 00 00 00 45
(b) FF FF FF 45
(c) 00 00 00 45
(d) FF FF FF 45
(e) FF FF FF FF
(f) 7F FF FF FF
(g) 00 00 00 99
(h) 00 00 03 AF
Instruction
add eax, 45
add eax, 45
add eax, -45
add eax, -45
dd eax, 1
add eax, 100
add eax, 1
add eax, 10
Transcribed Image Text:For each add instruction in this problem, assume that EAX contains the given contents before the instruction is executed, and give the contents of EAX as well as the values of the CF, OF, SF, and ZF flags after the instruction is executed: EAX before (a) 00 00 00 45 (b) FF FF FF 45 (c) 00 00 00 45 (d) FF FF FF 45 (e) FF FF FF FF (f) 7F FF FF FF (g) 00 00 00 99 (h) 00 00 03 AF Instruction add eax, 45 add eax, 45 add eax, -45 add eax, -45 dd eax, 1 add eax, 100 add eax, 1 add eax, 10
Expert Solution
Step 1

Here are the results of each instruction:

(a) EAX before: 00 00 00 45

Instruction: add eax, 45

EAX after: 00 00 00 8A

CF: 0 OF: 0 SF: 0 ZF: 0

(b) EAX before: FF FF FF 45

Instruction: add eax, 45

EAX after: 00 00 00 8A

CF: 0 OF: 1 SF: 0 ZF: 0

(c) EAX before: 00 00 00 45

Instruction: add eax, -45

EAX after: 00 00 00 00

CF: 0 OF: 0 SF: 0 ZF: 1

(d) EAX before: FF FF FF 45

Instruction: add eax, -45

EAX after: FF FF FF 00

CF: 0 OF: 1 SF: 0 ZF: 1

(e) EAX before: FF FF FF FF

Instruction: add eax, 1

EAX after: 00 00 00 00

CF: 0 OF: 1 SF: 0 ZF: 1

(f) EAX before: 7F FF FF FF

Instruction: add eax, 100

EAX after: 80 00 00 63

CF: 0 OF: 0 SF: 0 ZF: 0

(g) EAX before: 00 00 00 99

Instruction: add eax, 1

EAX after: 00 00 00 9A

CF: 0 OF: 0 SF: 0 ZF: 0

(h) EAX before: 00 00 03 AF

Instruction: add eax, 10

EAX after: 00 00 03 B9

CF: 0 OF: 0 SF: 0 ZF: 0

 

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education