Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write an ARM assembly program that copies the 64-bit integers in array sourceArr

ID: 3603862 • Letter: W

Question

Write an ARM assembly program that copies the 64-bit integers in array sourceArray into a destination array beginning at location 0x40000000 removing duplicate array entries in the process.  Hint: read a number from sourceArray and write it to the next available location in the destination array if it is new.  If the number is already in the destination array, ignore it.  Both arrays are of type DCQ. The DCQ directive allocates one or more eight-byte blocks of memory, aligned on four-byte boundaries, and defines the initial runtime contents of the memory. Copy and paste sourceArray into your program.

sourceArray

            DCQ   0x0200200AD00236DD

            DCQ   0x00003401AAC4D097

            DCQ   0x000001102ACFF200

            DCQ   0x00010AA0AD3C66DF

            DCQ   0x0000FC3D76400CCB

            DCQ   0x000090045ACDD097

            DCQ   0x00000FF000004551

            DCQ   0x0200200AD00236DD

            DCQ   0x003AC401AAC4D097

            DCQ   0x000090045ACDD097

            DCQ   0x09990AA0AD3C66DF

            DCQ   0x1000200AD00236DD

            DCQ   0x00003401AAC4D097

            DCQ   0x000001102ACFF200

            DCQ   0x00010AA0AD3C66DF

            DCQ   0x003AC401AAC4D097

            DCQ   0x1000FC3D76400CCB

            DCQ   0x000090045ACDD097

            DCQ   0x00000FF000004551

            DCQ   0x00000000003C66DF

endArr  

tsize   EQU   ((endArr-sourceArray) / 8)

Explanation / Answer

SRAM_BASE EQU 0x40000000; start of the address AREA Reset, CODE, READONLY ENTRY stop B stop sourceArray DCB 2,44,66,66,1,1,4,10,3,10,23,1,23,255,254,2,2,3 asize DCB (asize-sourceArray) END

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote