Assembly language program for addition of two-8bit number with carry

 Program:

MVI C,00
MVI A,0FFH
MVI B,083H
ADD B
JNC L
INR C
L: STA 2050
MOV A,C
STA 2051
HLT
Observation:
INPUT:
A= (FF)16=(255)10    , B=(83)16=(131)10

OUTPUT:
A+B=255+131=(386)10= (182)16
(82)16= (130)10
(1)16=(1)10
Result:
Memory  Location
Data value
2048
255
2049
131
2050
130
2051
01

Comments

Popular posts from this blog

Preamble to the Constitution of India:

Designing a calculator using HTML and JavaScript