Question: 3.6 Read the entire problem before beginning. (a) Write a C program that clears an array short int M[256]. In other words, the program sets
3.6 Read the entire problem before beginning. (a) Write a C program that clears an array "short int M[256]." In other words, the program sets every location to 0. Hint: your program should only be a couple lines long.(bAssuming M starts at location 256 (and thus ends at location 511), write the same program in assembly language using the earlier instruction set. (c) Measure the time it takes you to perform parts a and b, and report those times 3.4: Programmer's View MOV R0, #0; MOV RI, #10; MOV R2, #1. MOV R3, #0,' //total = 0 //i=10 // constant 1 // constant 0 Loop: JZ R1, Next, Done if i-0 ADD RO, RI; total+i. ians... SUB R1, R2; i- 7 JZ R3, Loop, l Jurmp always Next: /I next instructions... a) C program, (b) equivalent assembly program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
