Question: 2 . ( 1 5 pts ) Linked List A student wrote a subroutine to reverse a linked list, where each element consists of a
pts Linked List
A student wrote a subroutine to reverse a linked list, where each element consists of a pointer to the next element and a value. The subroutine takes a pointer to the first element the head in RO and returns a pointer to the new head in RO However, it's not behaving as it should. Find and correct the mistakes. Just like last time, there are mistakes.
reverse
ST R reverser
ST R reverser
loop
LDR R R #
STR R R #
ADD R R #
ADD R R #
BRz loop
LD R reverser
LD R reverser
RET
reverserBLKW #
reverserBLKW #
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
