Writing an assembly program to define an array


1) Write an assembly program that:

a) Defines an array of 10 (word type)elements;

b) Finds out the number of negative elements

c) Calculate the summation of the positive elements

d) Using procedure to sort the elements in descending order

2) a) Trace the following program fragment and find out the content of ax after the execution of the program.

X db   5,7  -3,-9,4,-7,9
Mov cx,  7
Mov bx, offset  x
Xor ax, ax
Xor si, si
Next : add ax, [bx +si]
inc si,
Loop next

b) Trace the following program fragment and find out the content of ax after the execution of the program.

mov     ax, 3
next:    add       ax, 2
cmp     ax, 13
jge          out
jmp    next
out:   ...............

Request for Solution File

Ask an Expert for Answer!!
Assembly Language: Writing an assembly program to define an array
Reference No:- TGS01044

Expected delivery within 24 Hours