Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab Work Hos

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

NAME: SAID WALI

CLASS NO: 05

An Exercise on Using Basic Instructions


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

Tasks
Task 1: Execute following statements (single-step) in EMU8086. Observe changes in the contents of
destination operand.
No. Code Snippet Result
A. MOV AX, 4D12h MOV AX, 4D12h
MOV BX, 1C21h MOV BX, 1C21h
ADD AX, BX -------------------------
ADD , 6933h
B. MOV AX, 4D12h MOV AX, 4D12h
MOV BX, 1C21h MOV BX, 1C21h
SUB AX, BX --------------------------
SUB 30F1h

C. MOV AL, 25 MOV AL, 25


MOV BH, 1Ch MOV BH, 1Ch
ADD AL, BH ----------------------
ADD 0035

D. MOV CL, 10000011b MOV CL, 10000011b


MOV CH, 10010010b MOV CH, 10010010b
SUB CH, CL ----------------------------------
SUB 0000

E. MOV AX, 80h MOV AX, 80h


ADD AX, 01 ADD AX, 01
------------------
0081
F. MOV AL, 80h MOV AL, 80h
ADD AL, 01 ADD AL, 01
------------------
0081

G. MOV AL, 0A5h 00B7

MOV BL, 12h


ADD AL, BL
MOV DH,BL
SUB DH, 10

Task 2: Write assembly language instructions to perform following tasks:

No. Tasks Instructions

A. Copy value 0000100b into lower byte of AX Mov AL,04h


register and value -5 in higher byte of BX
register. Mov BH,0FBh

B. Replace contents of DX register by its 2’s NEG DX


complement.

C. Increment the contents of CX by 1. INC CX

D. Replace contents of BL register by its 1’s NOT BL


complement.

E. Exchange lower byte of AX and higher byte of XCHGB AL,DH


DX.

You might also like