Homework 1, The Envornment
Short Description:
Make sure you can edit/assemble/execute code on the department servers.
Goals
When you finish this homework, you should have:- Demonstrate your ability to edit/assemble/execute code on the department servers
Formal Description
Using the code from the notes, write an assembly program that tells a joke simple joke.- Print the set up
- Print three blank lines
- Print the punch line
- Print a blank line
- Print an attribution line
- Print a programmed by line.
For example, I got the joke "Why are Assembly programmers always soaking wet? They work below C-level." from https://www.databasestar.com/programmer-jokes/. My output for this program would be:
Why are Assembly programmers always soaking wet? They work below C-level. Joke found at https://www.databasestar.com/programmer-jokes/ Programmed by Dan Bennett.
Please call your program joke.asm
To demonstrate that you have accomplished the goals of the assignment, please take a screen shot of your terminal assembling and running this program.
- clear
- hostname
- make clean
- make
- ./joke call CallPrintf
Notes
- I would make four different message strings.
- Load them one at time into rsi, and call printf
- Make sure that you reload rdi with the format string each time, this sounds silly, but we will explain later.
- I would make a new format string with just the newline.
- Load that into rdi, no need to load anything into rdi
- Call printf as needed.
- No need for any loops, functions, ...
- We will learn thos later.
- This is not clean code, but write it anyway. Remember the purpose of this assignmant.
Required Files
Submit a tar or zip file containing- joke.asm
- Your screenshot