Classwork 2: Getting started with Linux, vim, and the course server
Logistics
- Due: Thursday, September 11th AoE (Friday 6am Bozeman time).
- Submission instructions: make sure that the required file (name matched) is submitted to Canvas
Outside resources
On this assignment, there are no restrictions on the use of outside resources for help in any way, including use of AI tools like ChatGPT.
Learning outcomes
- Be able to
ssh
into the course server and use basic Linux commands to navigate and perform basic tasks. - Be able to read and edit files using vim.
- Understand how you will complete classwork assignments in this course.
Assignment
2.1 Develop a assembly program named assignment2-1.asm that can compare two numbers and print their result. It should follow the format below.
The result of the example code depends on the comparison of the values stored in num1 and num2.
- If num1 is less than num2, the program will print “Comparison result: -1”.
- If num1 is greater than num2, the program will print “Comparison result: 1”.
- If num1 is equal to num2, the program will print “Comparison result: 0”.
2.2 Develop a assembly program named assignment2-2.asm. It has a function to count the length of a string (msg db “Hello, world!”) until null terminator is found (hints, using loop). The main function calls the function and prints the length of the string.
After compiling and linking the assembly program to produce assignment3-1.exe, double clicked assignment3-1.exe, it is gonna show you the length of the string:
- The length of the string:
2.3 Develop a assembly program named assignment2-3.asm. It has a function to print out all ASCII character set (hints, using loop and pushing and poping rcx).
After compiling and linking the assembly program to produce assignment3-1.exe, double clicked assignment3-1.exe, it is gonna show you the ASCII character set.
Grading–30 points
For each subassignment, you get 10 points if your solution is correct and 0 otherwise.
Grading turnaround
Final scores will be run at 6am Saturday and scores will be uploaded to D2L by class time Monday.