Search for question
Question

4. You are given a partial E20 assembly language program containing only the following: beginning: end: .fill 3 . fill 1 fill O .fill 9 fill 5 .fill 7 . fill 1 fill 4 That is, your program's data consists of an array of numbers between addresses beginning (inclusive) and end (exclusive). z T Complete the program so that it reverses the contents of the array in place. In other words, when the program ends, the value at memory address beginning will be 4; the value at memory address beginning+1 will be 1; the value at beginning+2 will be 7; the value at memory address end-1 will be 3; etc. You must implement your program using a loop. Your program should work with an array of any length. You may not assume that the length or content of the array is the same as given above. The only thing you know about the array is that it is bound by labels beginning and end. When using jump instructions, specify the destination as a label, not as a numeric address. Hint: use paired 1w and sw to copy a memory value from one address to another.

Fig: 1