GitHub Desktop on macOS and Windows.
Click on the assignment link.
Once you have accepted the assignment, you can clone the repository on your computer by following the instruction and begin working.
Be sure to ask any questions on Ed. Read two input values from the keyboard: Print out each index of the array, and its contents. It should look like this. Or like this. You can assume the user will not input any indexes outside of the bounds of the array. You are required to store the user’s value in memory at the specified position, and to load every value in the array from memory into a register to print it out. Note that you will need to translate between indices, which are word addresses, and values in memory, which are byte addresses. Make sure to document your programs thoroughly. (This is especially important in assembly language programs, since the code itself is less easily read than high-level language code.) This should include: to get a 4-byte aligned array. Submit the lab by committing your code and pushing it to your GitHub repository. From the command line, you would enter the commands from inside your repository’s directory. The first command instructs Git to take the changes that you made to The second command instructs Git to take all of the changes that you have committed and push them to your repository on GitHub. You can push each time you commit, or you can push after several commits have been made and all commits that haven’t yet been pushed to GitHub will be pushed at that time. If you don’t push after committing the final version of your code, the graders will not be able to see your changes (because they’ve only been recorded on your local computer). Rather than use the command line, you can visit the web page for your repository on GitHub and drag and drop the files on the page. I don’t really recommend doing this; it’s better to learn how to use Git properly. But it does work and you’re welcome to do it.Program specification
Please enter a number 6
Which element of the array would you like this to be? 1
0: 0
1: 6
2: 0
3: 0
Please enter a number 3
Which element of the array would you like this to be? 0
0: 3
1: 0
2: 0
3: 0
Helpful resources
Hints
la
instruction loads the address of a label. You can use this to load the addresses of any of the variables in the .data
section of your code.mul
instruction will allow you to multiply a register by a constant..data
section..align 2
arr: .space 16
Submission
$ git commit -m "Finished!" lab01.asm
$ git push
lab01.asm
and record those changes on your computer. Usually, when writing software, you would make multiple commits. This allows you to “easily” go back to previous versions. (“Easily” is in quotes because nothing with Git is ever actually easy.)