Ask Question
14 July, 15:02

What will be the final value of EAX in this example? mov eax, 0 mov ecx, 10; outer loop counter L1: mov eax, 3 mov ecx, 5; inner loop counter L2: add eax, 5 loop L2; repeat inner loop loop L1; repeat outer loop

+2
Answers (1)
  1. 14 July, 18:39
    0
    eax = 28.

    Explanation:

    The given code in question will not end. The following code is correct version. eax will be 28 in both scenarios.

    mov eax, 0; Unnecessary as next instruction changes this

    L1: push ecx; This and the pop below solves the problem

    mov eax, 3

    mov ecx, 5

    L2: add eax, 5

    loop L2

    pop ecx

    loop L1; ECX is decremented first
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What will be the final value of EAX in this example? mov eax, 0 mov ecx, 10; outer loop counter L1: mov eax, 3 mov ecx, 5; inner loop ...” 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