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

2CEIT501 Computer Architecture and Organization

PRACTICAL – 10

Aim: - Program Related to COMPARE and branch Instruction.

Useful Instruction
LXI(Load register pair immediate): - The instruction loads 16-bit data in
the register pair designated in the
operand.
Eg: - 
          
mvi a,10h
sta 9100h
lxi h,9100h (REG H=91 & L=00)
mov c,m (M 🡪HL Register Pair)
hlt

1. Write a program to find minimum of 32 and 23.store 00 if first no. is


smaller,otherwise store FF in register C.

CPI Instruction

CY Z Relation

0 1 A=B

1 0 A<B

0 0 A>B

CMP M Instruction

CY Z Relation

0 1 A=M

1 0 A<M

0 0 A>M

CE/IT Department
2CEIT501 Computer Architecture and Organization

2. Write an ALP to transfer a block of memory that starting from B101H to B103H. The
destination memory address staring form C101H

First we are storing 3 numbers to B101H to B103H memory location and then we
transfer this 3 blocks to C101H to C103h.

3. Write an ALP to perform subtraction operation on content of register A and B. if


result is positive then store 01H in register C otherwise store 00H in register C.

CE/IT Department

You might also like