Question: Question 14 Identify and correct the errors in the following two programs. C Program (main.c) Assembly Program (strcpy.s) char src[25] = Hello!; AREA stringCopy, CODE

Question 14 Identify and correct the errors in the following two programs. C Program (main.c) Assembly Program (strcpy.s) char src[25] = "Hello!"; AREA stringCopy, CODE char dst[25]; ALIGN strcpy PROC loop LDR r2, [r1] ; Load a byte, r1 = *src int main(void) { STR r2, [ro] ;Store a byte, ro = *dst strcpy(dst, src); ADD r1, #1 ;Increase memory pointer while(1); ADD re, #1 ;Increase memory pointer CMP r2, #0 ; Zero terminator BNE loop ; Loop if not null terminator ENDP END
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
