Question: -Assembly code question- Please write a program to find the occurrence count of each number. Write your program in Arm Cortex M0+ assembly language.. Your

-Assembly code question-

Please write a program to find the occurrence count of each number. Write your program in Arm Cortex M0+ assembly language.. Your assembly source file is expected to work in Keil Vision IDE v5. Your program must have a subroutine named OCCURRENCE. The occurrence subroutine should find the occurrence count of each number and write this information to the memory. The first byte of the line stores number and the second byte of the line stores its occurrence count. Occurrence subroutine must be called once during the entire program and it cannot contain more than one loop.

The allocation of space for the arrays must change according to INPUT Array size. You must allocate enough (neither less nor more) space in the memory. INPUT Array will be changed for testing your program. At the end of the program, the start address of the INPUT must be stored in R5 and the start address of the OCCURANCE_VALUES must be stored in R6. You must use the stack to store return addresses and other register values if necessary. Your main function name or label must be __main

-Assembly code question- Please write a program to find the occurrence count

1 2 AREA input_data, DATA, READONLY 3 ALIGN 4 INPUT DCB 2, 5, 3, 5, 6, 2, 4 4. 5 END_INPUT Figure 1: Example Input Array 0x200003EC: 02 02 Ox200003EE: 03 01 Ox200003F0: 04 01 Ox200003F2: 05 02 Ox200003F4: 06 01 Figure 2: Occurrence Counts of Example Input Array 1 2 AREA input_data, DATA, READONLY 3 ALIGN 4 INPUT DCB 2, 5, 3, 5, 6, 2, 4 4. 5 END_INPUT Figure 1: Example Input Array 0x200003EC: 02 02 Ox200003EE: 03 01 Ox200003F0: 04 01 Ox200003F2: 05 02 Ox200003F4: 06 01 Figure 2: Occurrence Counts of Example Input Array

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!