Ask Question

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

Answers (1)
  1. 10 July, 12:44
    0
    100 MOV Si, 500

    101 MOV CL [Si]

    102 MOV CH, 00

    103 INC SI

    104 MOV AL,[SI]

    105 A MOV BL, AL

    105 C MUL AL

    105 E MUL BL

    106 MOV [SI], AL

    107 INC SI

    108 LOOP 104

    109 HLT

    The above is the required ALP program.

    Explanation:

    Step1: Sets the SI value to 500

    Step 2: Loads the data from the SI offset to the CL register

    Step 3: Increase the SI value by 1

    Step 4: Move the value of the register from AL to BL

    AL is the single 8-bit register

    Step 5: Multiply the AL by AL

    Step 6: Multiply the value of the register AL by BL

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

    Step 8: Now the value of the SI is increased by 1.

    LOOP 104: The program now jumps to the address 104 if the CX=CX - 1 and CX is not 0.

    HLT: means stop
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write an ALP to find cube of N 8-bit numbers in an array using 8086 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers
Sign In
Ask Question