Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an ARM assembly program that tallies the number of 0s,1s, 2s 9s in the DCB array sourceArray and stores the 10 number counts in

Write an ARM assembly program that tallies the number of 0s,1s, 2s 9s in the DCB array sourceArray and stores the 10 number counts in a 10-element word array starting at location 0x40000000. For example, the 0s count will be in location 0x40000000, the 1s count will be in location 0x40000004, etc. Your code must initialize each element of the count array to zero.

Use the following data definitions in your program.

sourceArray DCB 2,4,6,6,0,1,4,8,3,0,3,1,2,2,5,2,2,3, 8,1

DCB 9,1,5,3,4,2,6,7,8,9,0,4,4,3,2,3,6,5,4,5,6,7

DCB 4,1,2,1,4,6,7,6,3,3,2,6,8,9,9,9,1,4,2,3,4,5

sourceArraySize DCB (sourceArraySize-sourceArray)image text in transcribedI am not sure why I am getting these compilation errors. It is unable to rebuild.

File Edit View Project Flash Debug Peripherals Tools SVCS Window Help lid |"e .) .. | P1// Project Program2s Project: Programs Target 1 Reaet, CODE READHRITE Source Group 1 Startups 2, LENGTH r2, r2, #1 re, #0 FOR INIT MOV r1,#0 3, ARRAY END FOR , [3],#4 6, 6, 4 FOR CHE 13 END FOR r, sunM STOP STOP 19 AREA SUMARRAY,DATA,EADWRITE 23 DCD 5, 10, 15, 20, 30, 40, SO DCD 7 0FFFFFFFF ARRAY LENGTH 26 Build Output TrialalSet 21Program2.(7) error: A1163E: Unknown opcode FOR INIT expecting opcode or Hacro Trial5\Set 2\Program2.5(9): error : A1163E: Unknown opcode FORCMP expecting opcode or M cro Trial \Set 2\Program2.s (11): error: 1647E: Bad register name symbol, expected Integer register Trials Set 2\Program2.8 (12):error: A1163E: Unknown opcode n, expecting opcode or Hacro Trials\Set 2\Program2.5(16): error : A1163E: Unknown opcode END FOR , expecting opcode or Hacro Trials\Set 2\Program2.s(18): error : 1163E : Unknown opcode STOP , expecting opcode or Macro - .ATriala\Set 21Program2.8 (20) error:A1l63E: Unknown opcode sourceArray, expecting opcode or Macro Trials', Set 2\Program2.s(30): error: 1163E: Unknown opcode SUM , expecting opcode or Macro TrialaSet 2\Program2. 8 (31) error: A1l63E: Unknown opcode ARRAY, expecting opcode or Nacro Trials Set 2\Program2.s (32) ero:Al163E: Unknown opcode LENGTHexpecting opcode or Macro

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