Instructions: 1)
Download from Moodle a comma-separated value file (**.csv) with your student ID (SID) as the file name – for example, if your SID is EE0100106 then the file you should download is EE0100106.csv. The file contains a unique dataset that you will be using for the assignment. This dataset consists of 320 16-bit (2-byte) unsigned hexadecimal numbers. You can use Notepad or any text editor to open the file and copy the dataset.
2) Write an assembly program to:
a. Find the smallest element in the dataset, and save the answer to file registers 0x000 and 0x001 at data memory using little-endian format.
b. Find / count the total number of elements in the dataset which are odd, and save the answer to file register 0x002 and 0x003 at data memory using little-endian format.
c. Sum all the elements which are odd in your dataset, and save the result as a 4- byte sum to file registers 0x010 till 0x013 at data memory using the little-endian format.
d. Lastly, multiply the sum (found in Part (c)) with D’32’, and save the 5-byte
answer to file registers starting at 0x020 till 0x024 at data memory using the
little-endian format.
Get Free Quote!
365 Experts Online