Ask Question
28 November, 08:54

ALP to find cube of N 8-bit numbers in an array using 8086

+1
Answers (1)
  1. 28 November, 10:37
    0
    200 MOV Si, 500

    201 MOV CL [Si]

    202 MOV CH, 00

    203 INC SI

    204 MOV AL,[SI]

    205 A MOV BL, AL

    205 C MUL AL

    205 E MUL BL

    206 MOV [SI], AL

    207 INC SI

    208 LOOP 104

    209 HLT

    The above ALP program is the required one.

    Explanation:

    Step1: SI value = 500

    Step 2:SI offset data is loaded to the CL register

    Step 3: SI value = SI value + 1

    Step 4: The register value is moved from AL to BL

    AL happens to be an 8-bit register

    Step 5: The AL value is multiplied by itself

    Step 6: The value of the AL is now multiplied by BL

    Step 7: The new value of the AL is stored at the SI.

    Step 8: The value of the SI is incremented by 1 ...

    LOOP 104: The program is now transferred to the 104 in case the CX=CX - 1 and CX is not 0.

    HLT: stop
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “ALP to find cube of N 8-bit numbers in an array using 8086 ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers