Question: Make it simple & brief as much as possible (2). Write an assembly program to find the largest number from 6 (16 bits) numbers (data
(2). Write an assembly program to find the largest number from 6 (16 bits) numbers (data can be defined by yourself) DATAS SEGMENT ;data DATA__ 3,2,1,9,8,7 MAX? DATAS ENDS STACKS SEGMENT ;stack STACKS ENDS CODES SEGMENT ASSUME CS:CODES,DS:DATAS,SS:STACKS START: MOV AX,DATAS MOV DS,AX ;code LEA BX, MOV CX, MOV AX,[BX]; after this step, the value of register AX is NEXT: ADD BX, CMP AX,[BX] MOV AX,[BX] GREAT: MOV MAX AX DEC CX JNZ MOV AH,4CH ; after this step, the value of register AX is JG INT 21H CODES ENDS END START
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
