CODE CONVERSION –DECIMAL TO HEX




ADDRE
SS
OPCO
DE
LABEL
MNEM
ONICS
OPER
AND
COMMENTS
8000


LXI
H,8100
Initialize HL reg. to
8100H
8001




8002




8003


MVI
A,00
Initialize A register.
8004




8005


MVI
B,00
Initialize B register..
8006




8007

LOOP
INR
B
Increment B reg.
8008


ADI
01
Increment A reg
8009




800A


DAA

Decimal Adjust Accumulator
800B


CMP
M
Compare M & A
800C


JNZ
LOOP
If acc and given number are not equal, then go to LOOP
800D




800E




800F


MOV
A,B
Transfer B reg to acc.
8010


STA
8101
Store the result in a memory location.
8011




8012




8013


HLT

Stop the program

Comments

Popular posts from this blog

8086 STRING MANIPULATION –FIND AND REPLACE A WORD

Animated Circles In C++

C program to find out the sum of series 1 + 2 + …. + n.