Google

Dec 2, 2008

program to find the product of numbers in an array

This program is to find the product of numbers in an array:

We initalize the registers, then we move the size of the array to a counter and reduce its size bu one. SI is incremented to point to the 1st number of the array and move the 1st number into accumularot.

The 2nd number is moved into BL,, we multiply both the numbers abd this is continued till the numbers in the list, exhaust and finally the result is stored in AX.

Code:

MOV SI, 2000
MOV DI,4000
MOV AX,O
MOV BX,0
MOV CX,0
MOV CL,[SI]
SUB CL,[SI]
INC SI
MOV AL,[SI]
AGAIN: INC SI
MOV BL, [SI]
MUL BL
LOOP AGAIN
MOV [DI],AX
INT A5

Thus the program for product of numbers in an array can be executed using the above code.

1 comment:

iceycabello said...

Gambling, Casinos & Gaming | Doc's
The Gambling Industry and 보령 출장마사지 the Internet are becoming 양주 출장샵 increasingly 울산광역 출장샵 reliant on digital platforms, including social networks, apps and mobile phones. These new  Rating: 제주도 출장마사지 5 · ‎1 vote 강릉 출장마사지