Question: a) Figure on page 3 shows an ARM assembly language program with some errors. This program is supposed to search through a series of 100

a) Figure on page 3 shows an ARM assembly language program with some errors. This program is supposed to search through a series of 100 (64-bit) numbers for a match with a key item (0xFFAA0099) in the table. Your task is to identify and correct the errors. Based on your corrected program, answer the following questions: (i) (ii) (iii) (iv) State the memory usage (in bytes) of the corrected program. State the start and end addresses of the table What information is returned to the processor if there is a match? Modify the program to replace the first number in the table with the key item if there is no match. AREA DataTable, CODE, READONLY base of table TABLE BASE EQU 0x40000004 ENTRY LDR R0, #TABLE-BASE LDR R1,-0xFFAA0099 MOV R2,#0x100 MOV R3,#0x4 LOOP LDR CMP BEQ SUBS BNE R4, [RO, R3] R1, R4 MATCH R2, R2, #2 LOOP DONE R0,R0,#2 R6, RO DONE MATCH SUB MOV DONE END Figure 1 a) Figure on page 3 shows an ARM assembly language program with some errors. This program is supposed to search through a series of 100 (64-bit) numbers for a match with a key item (0xFFAA0099) in the table. Your task is to identify and correct the errors. Based on your corrected program, answer the following questions: (i) (ii) (iii) (iv) State the memory usage (in bytes) of the corrected program. State the start and end addresses of the table What information is returned to the processor if there is a match? Modify the program to replace the first number in the table with the key item if there is no match. AREA DataTable, CODE, READONLY base of table TABLE BASE EQU 0x40000004 ENTRY LDR R0, #TABLE-BASE LDR R1,-0xFFAA0099 MOV R2,#0x100 MOV R3,#0x4 LOOP LDR CMP BEQ SUBS BNE R4, [RO, R3] R1, R4 MATCH R2, R2, #2 LOOP DONE R0,R0,#2 R6, RO DONE MATCH SUB MOV DONE END Figure 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
