Ask Question
19 September, 00:49

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

+3
Answers (1)
  1. 19 September, 02:02
    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?
Find an answer to your question ✅ “ALP to find cube of N 8-bit numbers in an array using 8086 ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers