0% found this document useful (0 votes)
30 views2 pages

Location Content Label Mnemonic

This assembly language program loads values into register pairs D,E and H,L, then performs a series of operations including clearing the accumulator, incrementing/decrementing registers, storing values to memory locations, and comparing values before halting. The program uses labels X, Y, and Z to direct flow.

Uploaded by

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

Location Content Label Mnemonic

This assembly language program loads values into register pairs D,E and H,L, then performs a series of operations including clearing the accumulator, incrementing/decrementing registers, storing values to memory locations, and comparing values before halting. The program uses labels X, Y, and Z to direct flow.

Uploaded by

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

Location

9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
900A
900B
900C
900D
900E
900F
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
901A
901A
901A
901A
901A
901A
9020
9021

Content
11
A0
89
21
00
89
06
00
AF
4E
C6
01
27
D2
11
90
04
0D
C2
0A
90
12
78
13
12
13
7D
FE
09
23
C2
06
90
76

Label

Mnemonic
LXI D,89A0H

LXI H,8900H

X:

MVI B,00H

Y:

XRA A
MOV C,M
ADI 01H
DAA
JNC Z

Z:

INR B
DCR C
JNZ Y
STAX D
MOV A,B
INX D
STAX D
INX D
MOV A,C
CPI 09H
INX H
JNZ X
HLT

Comments
Loads 16-bit data in the D,E register pair

Loads 16-bit data in the H,L register pair

Move 00 in B register
Clears accumulator
Moves data from memory to C register
Add 8-bit data to accumulator
Make binary data of accumulator into BCD
If carry is not set then jump to Z

Increment B register
Decrement C register
If not zero then jump to Y
Store LSB in memory pointed by D,E register pair
Copies content of B register into accumulator
Increment D,E register pair
Store MSB in memory pointed by D,E register pair
Increment D,E register pair
Copies content of C register into accumulator
Compare contents of accumulator with 09H
Increment H,L register pair
If not zero then jump to X
Halt program

You might also like