Write the pseudocode for the following code: sub_401000 proc near var_8 var 4 = dword ptr -8 = dword ptr -4 push mov sub ebp ebp, esp esp, 8 [ebp+var_4], 0 [ebp+var_8], 1 eax, [ebp+var_4] eax, OBh [ebp+var_4], eax ecx, [ebp+var_4] ecx, [ebp+var_8] [ebp+var_4], ecx edx, [ebp+var_4] edx, 1 [ebp+var_4], edx mov mov mov add mov mov sub mov mov sub mov mov eax, [ebp+var_8] еax, 1 [ebp+var_8], eax eax, [ebp+var_4] add mov mov cdq mov есх, 3 idiv есх mov [ebp+var_8], edx eax, еах esp, ebp ebp хоr mov pop retn sub_401000 endp

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please zoom in to see image, I need to make pseudocode using assembly language 

Write the pseudocode for the following code:
| sub_401000
proc near
= dword ptr -8
= dword ptr -4
| var 8
| var 4
ebp
ebp, esp
push
mov
esp, 8
[ebp+var_4], 8
[ebp+var_8], 1
еax, [ebp+uar_4]
eax, OBh
[ebp+var_4], eax
ecx, [ebp+var_4]
есх, [ebp+uar_8]
[ebp+var_4], ecx
edx, [ebp+var_4]
edx, 1
[ebp+var_4], edx
еaх, [ebp+var_8]
еaх, 1
[ebp+var_8], eax
еax, [ebp+uar_4]
sub
mov
mov
mov
add
mov
mov
sub
mov
mov
sub
mov
mov
add
mov
mov
cdq
mov
есх, 3
idiv
есх
mov
[ebp+var_8], edx
xor
еax, еаx
esp, ebp
ebp
mov
рop
retn
sub 401000
endp
Transcribed Image Text:Write the pseudocode for the following code: | sub_401000 proc near = dword ptr -8 = dword ptr -4 | var 8 | var 4 ebp ebp, esp push mov esp, 8 [ebp+var_4], 8 [ebp+var_8], 1 еax, [ebp+uar_4] eax, OBh [ebp+var_4], eax ecx, [ebp+var_4] есх, [ebp+uar_8] [ebp+var_4], ecx edx, [ebp+var_4] edx, 1 [ebp+var_4], edx еaх, [ebp+var_8] еaх, 1 [ebp+var_8], eax еax, [ebp+uar_4] sub mov mov mov add mov mov sub mov mov sub mov mov add mov mov cdq mov есх, 3 idiv есх mov [ebp+var_8], edx xor еax, еаx esp, ebp ebp mov рop retn sub 401000 endp
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY