subject

Write a assembly program(mips) that implements a link list to store input lines of text. the program will then print the list constructed.
all nodes and string are to be allocated on the heap. node structure:
address data
address next
nodes are to be added to the head of the list
int strlen(cstring soure) : returns the length of a source (‘\0’ not counted)
cstring strdup(cstring source) : returns a duplicate of source allocated on the heap (sbrk syscall)
address addnode(address data, address next) : returns an address to a new node initialized with data and next traverse(address list, address proc) : traverses the list and calls proc passing the data of the node visit. the last node is to be traversed first.
main:
prompts the user for lines of text (up to 30 characters per line)
creates a link list of these lines head, the lines are to be created using strdup outputs the call traverse(head, print)
print(cstring source) : output source to the terminal
required i/o:
enter text? line 1
enter text? line 2
enter text? enter
line 1
line 2

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:40
What are the three uses of a screw?
Answers: 2
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
question
Computers and Technology, 24.06.2019 19:00
Which of the following "invisible" marks represents an inserted tab?
Answers: 1
You know the right answer?
Write a assembly program(mips) that implements a link list to store input lines of text. the program...
Questions
question
Mathematics, 22.04.2021 20:10
question
Mathematics, 22.04.2021 20:10
question
English, 22.04.2021 20:10
question
Biology, 22.04.2021 20:10
question
Mathematics, 22.04.2021 20:10
question
Mathematics, 22.04.2021 20:10
Questions on the website: 13722367