Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need in x86 assembly programming Write an assembly program to find the largest e

ID: 3812618 • Letter: N

Question

Need in x86 assembly programming

Write an assembly program to find the largest element by searching an array int ary[] = {1, 5, -3, -4, 0, 641, -9, 18} int index = 0; int max = ary[0]; int arraySize = sizeof array/sizeof max while (index max) max = ary[index];} Use cmp instruction and the appropriate jump instruction (signed or unsigned) to translate the if and while statements Use $ operator (see chapter 3) to calculate the size of the array, and inc instruction to increment the index of the array Run your program using the debugger to verify your answers (do this too for questions 2 and 3) Submit the following:

Explanation / Answer

DATA SEGMENT ARR DB 1,5,-3,-4,0,6,11,-9,18 LEN DW $-ARR LARGE DB ? DATA ENDS CODE SEGMENT ASSUME DS:DATA CS:CODE START: MOV AX,DATA MOV DS,AX LEA SI,ARR MOV AL,ARR[SI] MOV LARGE,AL MOV CX,LEN REPEAT: MOV AL,ARR[SI] CMP LARGE,AL JG NOCHANGE MOV LARGE,AL NOCHANGE: INC SI LOOP REPEAT MOV AH,4CH INT 21H CODE ENDS END START

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote