0% found this document useful (0 votes)
43 views6 pages

Mpi Labs

The document contains several assembly language programs with the following functions: 1. It initializes registers and performs arithmetic operations like addition and subtraction. 2. It copies values from one memory location to another using instructions like MOV, STA, LXI. 3. It uses loops with counters to repeat copy operations between memory blocks. 4. The programs demonstrate basic assembly language instructions on the 8086 processor.

Uploaded by

Rajeshree Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views6 pages

Mpi Labs

The document contains several assembly language programs with the following functions: 1. It initializes registers and performs arithmetic operations like addition and subtraction. 2. It copies values from one memory location to another using instructions like MOV, STA, LXI. 3. It uses loops with counters to repeat copy operations between memory blocks. 4. The programs demonstrate basic assembly language instructions on the 8086 processor.

Uploaded by

Rajeshree Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Q a)

MVI A,34H
MVI B,45H
MVI C,00H

ADD B

JNC XYZ

INR C
XYZ:
STA 8500H
MOV A,C
STA 8501H

HLT

Qb
MVI A,45H
MVI B,54H
MVI C,00H
SUB B

JP XYZ
INR C
CMA
ADD C

XYZ:
STA 8500H

MOV A,C
STA 8501

HLT

Q C)
MVI H,00H
MVI L,00H
LXI B,8500H
LXI D,8600H

MOV A,C
ADD E
STA 8500H
JC XYZ
XYZ:
INR H
MOV A,B
ADD D

ADD H

STA 8501H
JC PQ
PQ:
INR L
MOV A,L
STA 8502
HLT

Q C) MODIFIED
MVI H,00H
MVI L,00H
LXI B,8511H
LXI D,8609H

MOV A,C
ADD E

STA 8500H

MOV A,B
ADD D

ADD H

STA 8501H
JC PQ
PQ:
INR L
MOV A,L
STA 8502
HLT
c)Real

MVI H,00H
MVI L,00H
LXI B,8500H
LXI D,8600H

MOV A,C
ADD E
STA 8500H

JC XYZ
XYZ:
INR H
MOV A,B
ADD D

ADD H

STA 8501H
JC PQ
PQ:
INR L
MOV A,L
STA 8502
HLT

d) MVI C,00H
LXI B,0001H
LXI D,0001H
LXI H,0007H
MOV A,L
CMA
MOV L,A
MOV A,H
CMA
MOV H,A
DAD B
DAD D
JC XYZ
MOV A,L
CMA
MOV L,A
MOV A,H
CMA
MOV H,A
DAD B
MVI C,00H
INR C
SHLD 8500H
MOV A,C
STA 8502H
HLT
XYZ:
SHLD 8500H
MVI C,00H
MOV A,C
STA 8502H
HLT

LAB 2

A)
i)
MVI C 10 H
LXI H 8600 H
LXI D 8800 H
XYZ:
MOV A M
STAX D
INX H
INX D
DCR C
JNZ XYZ
HLT
ii)

MVI C 10H
LXI H 8604H
LXI D 8800H
XYZ:
MOV A M
STAX D

DCX H
INX D
DCR C
JNZ XYZ
HLT

B)
i)

MVI C 10 H
LXI H 8600H
LXI D 8807H
YZ:
MOV A M
STAX D
INX H
INX D
DCR C
JNZ YZ

MVI C 10 H
LXI H 8807H
LXI D 8607H
XZ:
MOV A M
STAX D
INX H
INX D
DCR C
JNZ XZ

HLT

II)
MVI C 10H
LXI H 8600H
LXI D 8800H
XYZ:
MOV A M
STAX D
INX H
INX D
DCR C
JNZ XYZ

MVI C 10H
LXI H 8809H
LXI D 8600H
YZ:
MOV A M
STAX D
DCX H
INX D
DCR C
JNZ YZ

HLT

You might also like