Micro Processor
Micro Processor
Micro Processor
IC) 0OH
[HL]-4500H
[A] [M]
[HLI HL]+1
[A]-[AJ+[M]
Is there a NO
carry?
YES
IC]I+1
[HLIHL}+1
[M] [A]
[HLI HLJ+1
[M) [C)
STOP
Programn:
ADDRESS OPCODE LABEL MNEMONICS OPERANDD OMMENT
4100 START MVI C,00 Clear C reg.
4101
4102 LXI H, 4500O Initialize HL reg. to
4103 4500
4104
4105 MOV A, M Transfer first data to
accumulator
4106 INX H Increment HL reg. to
point next memory
Location.
4107 ADD M Add first number to acc.
Content.
4108 JNC LI Jump to location if result
4109 does not yield carry.
410A
410B INR IncrementC reg.
410C L1 INX Increment HL reg. to
point next memory
Location.
410D MOV M, A Transfer the result from
acc. to memory.
410E INX H Increment HL reg. to
point next memory
410F
Location,
MOV M,C Move carry to memory
4110 HLT
Stop the program
RESULT:
Thus the 8 bit numbers stored at 4500 &4501 added and the result stored
are at 4502 & 4503.
OBSERVATION:
INPUT OUTPUTT
4500 4502
4501 4503