Write assembly program using array with the contents given:

5 5 5 5 5 5 5 5 5 5

Define 'Array' and 'RESULT'.

Code:
MOV AX, 0
MOV BX, 0

L1:
ADD AX, [ARRAY+BX]
ADD BX, 2
CMP BX, 20
JL L1

MOV [RESULT], AX

This assembly program calculates the sum of the elements in the 'ARRAY' and stores the result in 'RESULT'.

Here is the code:

```assembly
DATA SEGMENT
ARRAY DB 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
RESULT DW ?
DATA ENDS

CODE SEGMENT
ASSUME DS:DATA, CS:CODE

START:
MOV AX, 0
MOV BX, 0

L1:
ADD AX, WORD PTR [ARRAY+BX]
ADD BX, 2
CMP BX, 20
JL L1

MOV WORD PTR [RESULT], AX

; Exit program
MOV AH, 4Ch
INT 21h
CODE ENDS
END START
```

Explanation:
- The program uses the `DATA` segment to define 'ARRAY' and 'RESULT'.
- 'ARRAY' is defined as a byte array with the given contents: `5 5 5 5 5 5 5 5 5 5`.
- 'RESULT' is defined as a word variable, which will store the sum of the elements in 'ARRAY'.
- The `CODE` segment defines the main code section of the program.
- The `START` label marks the beginning of the program.
- Initialize `AX` and `BX` registers with 0, which will be used for calculations.
- The `L1` loop is used to iterate through the elements of 'ARRAY'.
- The element is accessed using the index `BX`, which starts at 0 and increments by 2 with each iteration since each element in 'ARRAY' is a 2-byte value.
- The element value is added to the `AX` register.
- The `BX` register is incremented by 2 to move to the next element.
- The loop continues until the `BX` register reaches 20, which is the size of 'ARRAY' in bytes (10 elements * 2 bytes each).
- After the loop, the sum in `AX` is stored in 'RESULT' using the `MOV` instruction.
- The program exits gracefully with an interrupt call (`INT 21h` and `AH = 4Ch`) to terminate the program.

Note: The program assumes an Intel x86 architecture and uses the DOS interrupt `INT 21h` for program exit.

Sure! Here's the assembly program using the given array contents:

```
MOV AX, 0 ; Initialize AX register to 0
MOV BX, 0 ; Initialize BX register to 0

L1:
ADD AX, [ARRAY+BX] ; Add the value at (ARRAY+BX) to AX
ADD BX, 2 ; Increment BX by 2 bytes (since each element in the array is 2 bytes)
CMP BX, 20 ; Compare BX with 20 (assuming the array has 10 elements)
JL L1 ; Jump to L1 if BX is less than 20

MOV [RESULT], AX ; Store the final sum in AX to RESULT
```

In this code, we use the AX and BX registers for calculations. The label "L1" represents a loop that iterates over the array elements.

Inside the loop, we add the value at the memory location (ARRAY+BX) to the contents of AX and increment BX by 2 to move to the next element.

The CMP instruction compares the updated value of BX with 20 (assuming there are 10 elements in the array, each taking 2 bytes), and if it is less than 20, the loop continues (JL L1). Otherwise, the program jumps to the next instruction after the loop.

Finally, we store the final sum in AX to the memory location RESULT.