Question

In: Computer Science

Draw the stack (use, word/pdf) before every instruction that is marked red is executed to show...

Draw the stack (use, word/pdf) before every instruction that is marked red is executed to show your understanding of the call and return functions.   Use N/A to represent unpredictable values.

            
            Main Proc
            4040018          mov ecx, 0000000Ch
            404001C          mov ebx, 0000000Bh
            4040020          call FADD
            4040026          mov eax, ebx
                      …
                      …                    

            Main EndP

            FADD  PROC
            4041040          Push ecx
            4041044          Push ebx
            4041048          mov eax, edx
                      …
                      …
            404A060         Pop ebx
            404A062         Pop ecx
            404A064         ret
            FADD EndP

Solutions

Expert Solution

Answer:

Main Process will start

At instruction 4040018 the ecx variable will be having 0000000Ch as a value

At instruction 404001C the ebx variable will be having 0000000Bh as a value

ecx

0000000Bh

ebx

0000000Ch

At instruction 4040020 the FMul process will be called

The control will be under the FMul process now

At instruction 4041040 the value of variable ecx will be pushed in Stack

At instruction 4041044 the value of variable ebx will be pushed in Stack

At instruction 4041048 the value(N/A) of variable edx will be moved to eax variable

At instruction 404A060 the value of variable ebx will be poped out from Stack

At instruction 404A062 the value of variable ecx will be poped out from Stack

At instruction 404A064 the value of variable ebx and ecx will be returned and provided to the Main Process

Now the control will be under Main Process once the execution of FMul Process is completed

At instruction 4040026 the value of variable ebx will be moved to the variable eax.


Related Solutions

Draw the stack (use, word/pdf) before every instruction that is marked red is executed to show...
Draw the stack (use, word/pdf) before every instruction that is marked red is executed to show your understanding of the call and return functions.   Use N/A to represent unpredictable values. Main Proc 4040018 mov ecx, 0000000Ch 404001C mov ebx, 0000000Bh 4040020 call FADD 4040026 mov eax, ebx … … Main EndP FADD PROC 4041040 Push ecx 4041044 Push ebx 4041048 mov eax, edx … … 404A060 Pop ebx 404A062 Pop ecx 404A064 ret FADD EndP
1 Draw a stack diagram to show how the following code is executed and write the...
1 Draw a stack diagram to show how the following code is executed and write the generated output. def sequence(a, b, c): if a < b < c: return a + b + c if a >= b: return sequence(a - 1, b, c) if a >= c: return sequence(c, b, a) if b >= c: return sequence(c, b, a + 2) return 0 print(sequence(10, 10, 10)) 2 Draw a stack diagram to show how the following code is executed...
Instruction: Use Microsoft Visio to draw a use case diagram and a sequence diagram for the...
Instruction: Use Microsoft Visio to draw a use case diagram and a sequence diagram for the following business requirements. Online Recruiting System (website) 1) The Online Interview System: The search committee usually selects 3 to 5 candidates for a Skype interview. When the search committee starts a Skype interview, they connect their web browsers to an interview module developed by the company’s IT team (we call this type of software as home-developed software). The interview module then connects to Skype....
Instruction: Answer in a Word file and submit. Show the formula and all corresponding numbers you...
Instruction: Answer in a Word file and submit. Show the formula and all corresponding numbers you use in the formula. Do NOT use spreadsheet and submit. 1. (3 points)     You deposit your $10,000 in a new savings account that earn 4 % annually. You don’t take the interest out and keep it in the savings account so that you can earn interest on interest (compounding!). What would be the value of the $10,000 after 40 years? (Show your calculation) 2....
Instruction: when you do the frequency distribution use 10 classes. You can attach a pdf or...
Instruction: when you do the frequency distribution use 10 classes. You can attach a pdf or word document file. This is another similar question in determining normality (section 6.2). Each part worth 4 points. Question: The numbers of branches of the 50 top banks are shown below:    67 84 80 77 97 59 62 37 33 42 36 54 18 12 19 33 49 24 25 22 24 29 9 21    21 24 31 17 15 21 13...
Answer the following questions and upload to Canvas. Submit in Word or PDF format.  Show your work...
Answer the following questions and upload to Canvas. Submit in Word or PDF format.  Show your work and upload the Excel sheet as well. All the writing parts must be your original writing, don't quote, write in your own words. The following table presents the orders of Samson Company for the last 36 months (3 years). Month Order Year 1 Order Year 2 Order Year 3 January 502 614 712 February 408 592 698 March 491 584 686 April 456 532...
GIVEN THE FOLLOWING PSOSTFIX EXPRESSION, SHOW TO USE A STACK TO EVALUATE ITS FINAL VALUE. SHOW...
GIVEN THE FOLLOWING PSOSTFIX EXPRESSION, SHOW TO USE A STACK TO EVALUATE ITS FINAL VALUE. SHOW STACK CONFIGURATION DETAILS 20 3 18 8 - * 10 + +10 12 - /
. You must use Excel (submit either a pdf, word or Excel file only). . You...
. You must use Excel (submit either a pdf, word or Excel file only). . You must identify the 5 steps (you must address each in detail). Problem: Use the given data to complete a t-test using Excel. Question: Is there a difference in group means between the number of words spelled correctly for two groups of fourth graders? Group Assignment Score 1 3 1 4 1 10 2 14 2 7 2 8 2 10 2 15 2 9...
For the following molecules draw their lewis structure, show their orbital diagrams before and after hybridization,...
For the following molecules draw their lewis structure, show their orbital diagrams before and after hybridization, determine what hybrid orbitals are formed in the molecule, and label the bonds in the lewis structure as sigma or pi bonds CF2O CH3(CH)2CH3 C2N2 CH3CCH CHONH2
For the following molecules, draw their lewis structure,show their orbital diagrams before and after hybridization, determine...
For the following molecules, draw their lewis structure,show their orbital diagrams before and after hybridization, determine what hybrid orbitals are formed in the molecule, and label the bonds in the lewis structure as sigma or pi bonds SiH4 SF4 XeF4 C2H4 C2H2
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT