Question: Write an assembly program that will compare three different numbers a, b and c and put the maximum number in MAX. Where (a, b,
Write an assembly program that will compare three different numbers a, b and c and put the maximum number in MAX. Where (a, b, c and MAX) defined as words with the following values: a = 5, b=10, c=15 MODEL SMALL .DATA A dw 5 B dw 10 C dw 15 MAX dw? .CODE START: MOV AX,@DATA MOV DS,AX MOV AX,A MOV BX,B MOV CX.C e: CMP AX.BX JG X CMP BX,CX JG Y Z: MOV MAX.CX JMP e X: CMP AX,CX JG XI JMP Z XI: MOV MAX,AX JMP e Y: MOV MAX,BX END START END
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
