Write an ARM assembly program that copies the 64-bit integers in array sourceArr
ID: 3603903 • 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
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
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.