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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 16:50, lukeakalucas
15: 28read the summary of "an indian's view of indian affairs."15 betterin "an indian's view of indian affairs," it is asserted that conflicts could be reduced if white americansunderstood native americans..pswhich of the following would make this summary more complete? eleo the fact that chief joseph believes the great spirit sees everythinthe fact that chief joseph was born in oregon and is thirty-eight years oldo the fact that chief joseph states that he speaks from the hearthehehethe fact that chief joseph of the nez percé tribe made this claimebell- ==feetle===-felsefe ==submitmark this and retum.=
Answers: 3
image
Computers and Technology, 23.06.2019 18:30, erjalinalii
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
image
Computers and Technology, 24.06.2019 06:00, bzhsh8282
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
image
Computers and Technology, 24.06.2019 13:30, andybiersack154
Consider jasper’s balance sheet. which shows how to calculate jasper’s net worth?
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 in other subjects: