Ask Question
9 December, 23:47

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

+5
Answers (1)
  1. 10 December, 03:24
    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?
Get 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 & 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