Coursework 2 2D Led Array

Coursework 2: 2D Led Array
In this task, we assume that an 8¡Á8 LED array is controlled by 2 words specified in led_array. Each bit in this memory space controls the on/off state of one LED with 1 turns on an LED and 0 turns off an LED. Each byte of the led_array maps to one row of LEDs and the least significant bit of this byte controls the right-most LED of this row.
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte
One example is shown below. 0x81 is the first byte of led_array, the first bit is 1 and the last bit is also 1, this will turn on the top left and top right LEDs.
led_array DCD 0x00000081, 0x81000000
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte
If there were issues found in this coursework specification after its initial release, it will be updated and announced on LMO.

CS Help, Email: tutorcs@163.com
Task 1: (60%)
In this task, we assume that only one LED on the edge of this led array is turned on. Implement the function ¡°spin_single¡±, which rotates the position of the light-emitting LED clock-wise once.
For example, if the original state of led_array is:
led_array DCD 0x18666602, 0x00243C3C
After calling function ¡°spin_single¡± once, led_array should become:
led_array DCD 0x18666601, 0x00243C3C
Calling it once more, led_array should become:
led_array DCD 0x18666700, 0x00243C3C
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte

Calling it once more, led_array should become:
led_array DCD 0x18676600, 0x00243C3C
There are 4 important requirements/restrictions on your program:
1. Your function should not modify the state of any LEDs in the middle. Only the LEDs on the edge can be changed.
2. You are not allowed to use DCD (or similar assembler directives like DCW or DCB) to declare new memory blocks.
3. Your function must return to its caller when finished.
4. You should not assume a fixed initial position of the light-emitting LED on the edge. It may appear at any position when spin_single is called.
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte
Programming Help, Add QQ: 749389476
Task 2: (40%)
Implement the function called ¡°spin_multi¡±, which rotates light-emitting LEDs on the edge clock- wise once. There¡¯s no fixed pattern for light-emitting LEDs on the edge. Given the example state of led_array below:
After calling spin_multi once, it should become:
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte
0th byte 1st byte 2nd byte 3rd byte 4th byte 5th byte 6th byte 7th byte
Calling spin_multi again, it should become:
Just like task 1, There are 4 important requirements/restrictions on your program:
1. Your function should not modify the state of any LEDs in the middle. Only the LEDs on the edge can be changed.
2. You are not allowed to use DCD (or similar assembler directives like DCW or DCB) to declare new memory blocks.
3. Your function must return to its caller when finished.
4. You should not assume a fixed initial position of the light-emitting LED sequences on the edge.
Code Help