Question: Computer organization and design Using C language and the DE2-115 Media Computer hardware configuration write a subroutine that will return a value from an array
Using C language and the DE2-115 Media Computer hardware configuration write a subroutine that will return a value from an array that is selected by an input parameter. Use the stack to pass the parameter in, and to return the value of the result. Test your subroutine by writing a program that initializes the stack and calls the subroutine in a loop and passes it the value of the four slide switches SW3...SW0. Write the value that is returned from the subroutine to the HEX0 display. Use the following byte values to create the array: 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x67, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
