The code below uses the Space macro which simply displays the number of blank spaces specified by its argument. What is the first number printed to the screen after this code executes? (ignore the .0000 from Canvas)main PROC push 4 push 10 call rcrsn exitmain ENDPrcrsn PROC push ebp mov ebp,esp mov eax,[ebp + 12] mov ebx,[ebp + 8] cmp eax,ebx jl recurse jmp quitrecurse: inc eax push eax push ebx call rcrsn mov eax,[ebp + 12] call WriteDec Space 2quit: pop ebp ret 8rcrsn ENDP

Respuesta :

Answer:

Code explained below

Explanation:

Include Irvine32.inc

INCLUDE Macros.inc               ;Include macros for space

.code

main proc

  push 4                   ;Push 4 to the stack

push 10                   ;Push 10 to the stack

  call rcrsn                   ;call the function  

  exit

  ;invoke ExitProcess,0           ;After return from the function

                      ;call exit function

  main ENDP               ;end the main

  rcrsn PROC               ;define the function

      push ebp               ;push the ebp into stack

      mov ebp,esp           ;set ebp as frame pointer

      mov eax,[ebp + 12]       ;This is for second parameter

      mov ebx,[ebp + 8]       ;This is for first parameter

      cmp eax,ebx           ;compare the registers

      jl recurse           ;jump to another function  

      jmp quit               ;call quit

      recurse:               ;Implement another function  

      inc eax               ;increment count value

      push eax               ;push the eax value into stack

      push ebx               ;push ebx into stack

      call rcrsn           ;call above function

      mov eax,[ebp + 12]       ;This is for second parameter

      call WriteDec           ;write the value on the screen

      mWritespace 2           ;Space macro print 2 spaces

                      ;pause the screen

      quit:               ;Implement quit function

      pop ebp               ;pop the pointer value from the stack

      ret 8               ;clean up the stack

 

  rcrsn ENDP          

end main

ACCESS MORE