Question

We are using a raspberry pi in my computer systems class. We need to Write a...

We are using a raspberry pi in my computer systems class. We need to Write a statically allocated linked list in ARM assembly.

Steps You Should Follow

Step 1

You will statically allocate some space for your link list elements. You need to make 5 elements, each elements should have two components, the next pointer first then the value stored. First inialize next pointer to NULL. The value stored at the address will be a string pointer. It doesn't matter which values you use

Step 2

You will then write a function that links the statically alloacted linked list elements together.

Step 3

In your main you call your linking function to link all 5 elements together.

Step 4

Print out each emement in order by traversing the list. This means that you can't store each address in registers. You will lose points if you just print everything.

Extra credit

Use the malloc call to allacte for n (any number of entries represented by the letter n) entries from the command line.

Homework Answers

Answer #1

Note: I've added comments for your understanding, and I've used malloc() in the program.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
"C language" Take this code and make the minor modification necessary to create a circular linked...
"C language" Take this code and make the minor modification necessary to create a circular linked list (Hint: Store a pointer to the first node in the next pointer of the last node.) Demonstrate that this is working by traversing the list until the first pointer is encountered 3 times. Next redefine the node structure to include a back pointer. This will enable your program to move from front to back and then from back to front. It is not...
C++ Goals  Build single linked lists using pointers  Learn how to manipulate linked lists...
C++ Goals  Build single linked lists using pointers  Learn how to manipulate linked lists In this lab, you will create simple single linked structures consisting of Node objects. Each node will have a pointer to the next node. You will use a head pointer to keep track of the first node in the linked list, and a tail pointer to keep track of the last node in the linked list. Set both head and tail to NULL when...
IntNode class I am providing the IntNode class you are required to use. Place this class...
IntNode class I am providing the IntNode class you are required to use. Place this class definition within the IntList.h file exactly as is. Make sure you place it above the definition of your IntList class. Notice that you will not code an implementation file for the IntNode class. The IntNode constructor has been defined inline (within the class declaration). Do not write any other functions for the IntNode class. Use as is. struct IntNode { int data; IntNode *next;...
C++ See the provided specification files. Complete the implementation for each as a separate file. void...
C++ See the provided specification files. Complete the implementation for each as a separate file. void seen(std::string); If there is already a Word object in the Words list, then the number of occurrences for this word is incremented. If there is no Word object for this word already, create a new word object with occurrence =1, and insert this object into the list of Word objects. std::string getNextWord(); Returns the next word of the list and sets the currentItem pointer...
using dr.racket programing language If we write a function that tests whether a list contains only...
using dr.racket programing language If we write a function that tests whether a list contains only strings, odd numbers, or even numbers, you will notice that the code that iterates through the list stays the same, with the only change being the predicate function that checks for the desired list element. If we were to write a new function for each of the tests listed above, it would be more error-prone and an example of bad abstraction. We could write...
Write the function decipher(s, frequencies), which will decipher a Caesar cipher encrypted string s using the...
Write the function decipher(s, frequencies), which will decipher a Caesar cipher encrypted string s using the letter frequencies in frequencies, and return the plaintext string. Here is a sample of how this function would be used: if __name__ == '__main__': # this file path works on my computer. # you will need to set this path to work on your computer! f = open('/Users/azs/code/bu/cs108/assignments/romeo.txt') text = f.read() f.close() d = letter_frequencies(text) s1 = 'h svun aptl h nv pu h...
/* Write a function that looks for a particular person in their respective linked list The...
/* Write a function that looks for a particular person in their respective linked list The only place you need to write code is the "find" method in the linked list class */ #include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); #define BUFFLEN 10 /* Each "person" is defined by their name, zipcode, and their pet's name. Persons are hashed by their zipcode. */ //---------------------------------------------------------------------------- /* function declarations ------------------------*/ int computeKey(int); void add_to_buffer(string,int,string); void find_in_buffer(int);...
Write a code in c++ using linear insertion following the steps below. Comment your work. 1....
Write a code in c++ using linear insertion following the steps below. Comment your work. 1.    Ask the user for the name of a file containing data. If it does not exist, the program should display an error, then ask for a new file name. Entering an asterisk (*) as the first and only character on a line should terminate the program. 2.     You can use a statically-allocated one-dimensional array of doubles for this with length 100. You...
Write regular expressions that will match IP addresses and usernames in a Microsoft IIS log file....
Write regular expressions that will match IP addresses and usernames in a Microsoft IIS log file. First, you will write a regular expression that matches IP addresses within the re.compile function call on line 36. Next, you will write a regular expression that matches usernames (in the format domain\username) on line 50. Finally, in steps 3 and 4 you will write a loop for each step that displays all the IP addresses (gathered into the list ipAddresses) and usernames (gathered...
Write a function in c using #include <stdio.h> that takes a one-dimensional integer array and returns...
Write a function in c using #include <stdio.h> that takes a one-dimensional integer array and returns the index of the first occurance of the smallest value in the array. Your function must be able to process all the elements in the array. Create a function prototype and function definition (after the main function). Your main function should declare a 100 element integer array. Prompt the user for the number of integers to enter and then prompt the user for each...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT