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, 22.06.2019 11:00
The editing of digital photos us about the same level of difficulty as editing an analog photo
Answers: 2
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data.
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, 29.10.2020 09:40
question
Mathematics, 29.10.2020 09:40
question
Biology, 29.10.2020 09:40
question
Chemistry, 29.10.2020 09:40
question
Mathematics, 29.10.2020 09:40
Questions on the website: 13722359