Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objectives In this lab, students will learn how to use instructions MOV, ADD, SUB, INC, DEC, and NEG in an assembly language program. Lab Tasks

Objectives

In this lab, students will learn how to use instructions MOV, ADD, SUB, INC, DEC, and NEG in an assembly language program.

Lab Tasks

Task 1: Read the syntax of assembly language instructions MOV, ADD, SUB, INC, DEC, and NEG (purpose, no. of operands required, and legal/illegal operands) from textbook ch#4. Also, find out all valid combinations of MOV instructions using data register and immediate values or both operands as data register.

Task 2: Now execute the following instructions (single-step) in EMU8086 and observe the changes in contents of destination operand. If any instruction gives error, correct that error.

  1. MOV AL, 256
  2. MOV AX, F1ABh
  3. MOV AX, -123
  4. MOV BX, 123
  5. MOV AH, 010010001b
  6. MOV 1234h, BX
  7. MOV DX, 33h
  8. MOV CX, AB
  9. MOV CH, AL
  10. MOV DL, BL
  11. MOV AH, BL
  12. MOV AX, CL

Task 3: For each of the following assembly language instructions, what will be the possible register value (in hex)? Assume all statements are being executed in a sequence and initially all registers contain zero.

No.

Instructions

AX

BX

CX

DX

AH

AL

BH

BL

CH

CL

DH

DL

MOV AX, 0110b

MOV BH, 90H

MOV CX, 10

MOV DX, 1234H

ADD DH, DL

ADD AX, BX

SUB CX, BX

SUB AH, DL

INC AX

INC BL

DEC DX

DEC CH

NEG CX

NEG BL

Task 4: Execute following statements (single-step) in EMU8086. Observe changes in the contents of destination operand.

No.

Code Snippet

Result

MOV AX, 4D12h

MOV BX, 1C21h

ADD AX, BX

MOV AX, 4D12h

MOV BX, 1C21h

SUB AX, BX

MOV AL, 25

MOV BH, 1Ch

ADD AL, BH

MOV CL, 10000011b

MOV CH, 10010010b

SUB CH, CL

MOV AX, 80h

ADD AX, 01

MOV AL, 80h

ADD AL, 01

MOV AL, 0A5h

MOV BL, 12h

ADD AL, BL

MOV DH, BL

SUB DH, 10

image text in transcribed

image text in transcribed

image text in transcribed

Lab Tasks Task 1: Read the syntax of assembly language instructions MOV, ADD, SUB, INC, DEC, and NEG (purpose, no. of operands required, and legal/illegal operands) from textbook ch#4. Also, find out all valid combinations of MOV instructions using data register and immediate values or both operands as data register. Task 2: Now execute the following instructions (single-step) in EMU8086 and observe the changes in contents of destination operand. If any instruction gives error, correct that error. a. MOV AL, 256 b. MOV AX, F1ABh c. MOV AX, -123 d. MOV BX, 123 e. MOV AH, 010010001b f. MOV 1234h, BX g. MOV DX, 33h h. MOV CX, 'AB' i. MOV CH, AL j. MOV DL, BL k. MOV AH, BL 1. MOV AX, CL Task 3: For each of the following assembly language instructions, what will be the possible register value in hex)? Assume all statements are being executed in a sequence and initially all registers contain zero. No. Instructions AX BX CX DX AH AL BH BL CH CL DH DL 1. 2. 3 4. MOV AX, 0110b MOV BH, 90H MOV CX, 10 MOV DX, 1234H ADD DH, DL ADD AX, BX SUB CX, BX 5. 6. 7. Microprocessor and Assembly Language-Lab 8. 9. 10. SUB AH, DL INC AX INC BL DEC DX DEC CH 11 12. 13. 14. NEG CX NEG BL Task 4: Execute following statements (single-step) in EMU8086. Observe changes in the contents of destination operand. No. Code Snippet Result A. MOV AX, 4D12h MOV BX, 1C21h ADD AX, BX B. MOV AX, 4D12h MOV BX, 1C21h SUB AX, BX C. MOV AL, 25 D. MOV BH, 1Ch ADD AL, BH MOV CL, 10000011b MOV CH, 10010010b SUB CH, CL MOV AX, 80h E. ADD AX, 01 F. MOV AL, 80h ADD AL, 01 MOV AL, OA5h G. MOV BL, 12h ADD AL, BL MOV DH, BL SUB DH, 10

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_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

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

Be familiar with the integrative servicescape model.

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago