Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A linked list is a linear data structure consisting of a set of nodes, where eac

ID: 3678726 • Letter: A

Question

A linked list is a linear data structure consisting of a set of nodes, where each one except the last one points to the next node in the list. Suppose we have the set of 5 nodes. Using MARIE assembly language, write a program that will traverse the list and print the data in order as stored in each node. Here is a fragment of the program:

MARIE program fragment:

Address Label

(Hex)

00D Addr, Hex ???? / Top of list pointer: / You fill in the address of Node1

00E Node2, Hex 0032 / Node’s data is the character “2”

00F Hex ???? / Address of Node3

010 Node4, Hex 0034 / Character “4”

011 Hex ????

012 Node1, Hex 0031 / Character “1”

013 Hex ????

014 Node3, Hex 0033 / Character “3”

015 Hex ????

016 Node5, Hex 0035 / Character “5”

017 Hex 0000 / Indicates terminal

Explanation / Answer

Addr, Hex _0005H___ / Top of list pointer
Node2, Hex 0032 / Node's data is the character "2."
Hex _0004H___ / Address of Node4.
Node4, Hex 0034 / Character "4."
Hex _0003H___ //Address of Node3
Node1, Hex 0031 / Character "1"
Hex _0002H___ //address of node2
Node3, Hex 0033 / Character "3"
Hex 0001H //address of Node1
Node5, Hex 0035 / Character "5"
Hex 0000 / Indicates terminal node.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote