Google

Dec 11, 2008

program to find the largest between two numbers

following program is to find the largest between two numbers

For the execution of this program we load si and di registers with initial address and move ah to 0 and we move the contents of si to al and we compare the contents of di with that of al register.

then we user jump if carry with DOWN label and move the contents of al to that of di and halt the program

code:

MOV SI, 2000
MOV DI,4000
MOV AH,00
MOV AL,[SI]
CMP AL,[SI]
CMP AL,[DI]
JC DOWN
MOV [DI], AL
DOWN INT A5

code ends

No comments: