how do i assembly program to find the smallest among two numbers.
assuming that first number is located a memory address : 0x2001 second number is located a memory address : 0x2002
store the smaller number in Accumulator
Here is what i attempted :
LDA 0x2001
MOV B, A
LDA 0x2002
CMP B
JNC smaller
exit
smaller :
MOV A, B
exit : HLT
is my solution correct?