Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Only the assembly Part please! Your functions will be passed two integer arguments (type uint32_t). The first argument (Following AAPCS, this will be passed in

Only the assembly Part please!
image text in transcribed
image text in transcribed
Your functions will be passed two integer arguments (type uint32_t). The first argument (Following AAPCS, this will be passed in R0) will be the base address in memory where the array to be sorted begins. The second argument (AAPCS says this will be in R1) will be the number of items to be sorted. Hint: the number of items can be multiplied by the size of the item in bytes to obtain the size in memory. In both cases, we will be sorting whole structs by one of the items inside of it; the colors will be sorted (in c) by the unsigned values of Cb and the tuples will be sorted (in assembly) by the signed values of b. The sort should be in ascending order; that is, after the sort, the whole structs should be arranged in memory with item containing the largest valued key stored at the highest address, and the item containing the smallest valued key at the lowest address. The provided project zip offers pre-built infrastructure to run on your TivaC board, and to write and test a sort of colors in C in part1.C and a sort of tuples in ARM Assembly in part2. S. You are welcome to look at the support files, and encouraged to use the debugger to observe what your code is doing, but note that no debug symbols are provided for Lab3Hidden - you can see the header and linkage information (the function prototypes), and step through the assembly, but the human readable code is not provided. This is intentional to black-box the setup and testing - the next lab will include writing similar setup code yourself, plus we wanted to make it more complicated to hack the tests than solve the intended problem. The behavior of the existing code is as follows: On reset, the board will turn on all three channels of the RGB LED to indicate execution has started (it will look white-ish). If you press SW1, a simple test will be run on your Part1 color-sorting code. If it succeeds, the RGB LED will blink Blue 5 times. If it fails, the RGB LED will blink Red 5 times. If you press SW2, a simple test will be run on your Part2 tuple-sorting code. If it succeeds, the RGB LED will blink Green 5 times. If it fails, the RGB LED will blink Red 5 times. In all cases, the program will then return to the beginning, unless your code prevents it from doing so (due to a hang, infinite loop, etc.) Parti.c D Partes ;you phould probably atop with a POP of the reglateca in3 you used EX LR Elid

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions