MVI B, 30H
MVI C, 40H
MOV A, B
CMP C
JZ EQU
JC SML
OUT PORT1
HLT
EQU: MVI A, 01H
OUT PORT1
HLT
SML: MOV A, C
OUT PORT1
HLT
MVI C, 40H
MOV A, B
CMP C
JZ EQU
JC SML
OUT PORT1
HLT
EQU: MVI A, 01H
OUT PORT1
HLT
SML: MOV A, C
OUT PORT1
HLT
Write an assembly language program to find the smallest among two numbers.
Reviewed by enakta13
on
December 15, 2011
Rating: