You are on page 1of 2

Unsigned Array Addition and Signed Array Sorting

Date :

EXP No: 3

Write the execution of the following instructions in ur record. (Right side)

● DAA , CMP,  XCHG, JMP, LOOP


● Conditional jump instructions table with flag status

AIM

Write the assembly language program to perform the following operations using 8086
instruction set:
a) to add an array of N unsigned binary numbers (16 bit numbers, N=5)
stored
in the source location CS : IP and the sum will be displayed in decimal form
in the memory location. (Indicate the flag status)
b) to sort an array of N signed binary (includes both positive and negative
numbers) numbers in descending / ascending order. The source location is
DS:SI and the destination location is ES:DI.

Software required:
Emulator 8086

Program Code:
(table format (label, CS:IP, opcode, operand, comment)

a)
Label CS:IP Opcode Operand Comment

left side of the record

a) Execution result: Before execution and after execution

Before Execution After Execution


H L H L
Registers used

CS:IP
DS:SI
Sum value in decimal
form
b)

Label CS:IP Opcode Operand Comment

left side of the record

b) Execution result: Before execution and after execution

Before Execution After Execution


H L H L
Registers
used

Source Destination (Sorting in


Ascending order)

DS:SI H L Decimal ES:DI H L Decimal


Equivalen Equivalent
t

1000:0100 45 87 17799 2000:0200

1000:0102 A 23 -23517 2000:0202


F

Result:

You might also like