Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6. Write a subroutine that takes 8 integer arguments and computes the product of these integers Note extra arguments are passed to the subroutine via
6. Write a subroutine that takes 8 integer arguments and computes the product of these integers Note extra arguments are passed to the subroutine via the stack r1,#8 ; 8th argument r0,#7 ; 7th argument main: MOV MOV PUSH fre,rl} ; rl is pushed first MOV MOV PUSHfre,r1) MOV MOV MOV MOV BL sum 8 B stop r1,#6 ; 6th argument r0 , #5 ; 5th argument r2,#4 ; 4th argument r3,#3 ; 3rd argument r1,#2 ; 2nd argument r0 , #1 ; 1st argument @ToDo complete sum8 subroutine sum8: stop: 6. Write a subroutine that takes 8 integer arguments and computes the product of these integers Note extra arguments are passed to the subroutine via the stack r1,#8 ; 8th argument r0,#7 ; 7th argument main: MOV MOV PUSH fre,rl} ; rl is pushed first MOV MOV PUSHfre,r1) MOV MOV MOV MOV BL sum 8 B stop r1,#6 ; 6th argument r0 , #5 ; 5th argument r2,#4 ; 4th argument r3,#3 ; 3rd argument r1,#2 ; 2nd argument r0 , #1 ; 1st argument @ToDo complete sum8 subroutine sum8: stop
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started