CS 245 01
Programming Assignment 01
Tuesday, February 21, 2017
Modify the sample program located on page 40 to add two numbers stored in memory at number1 and
number2. (Hint: Copy number1 to EAX and then use add eax, number2 to add the second number.)
Continue to store the total in memory at sum. Assemble, link and execute the program. Explain the
changes that are displayed in registers and memory after execution of each instruction. THIS MUST BE A
DETAILED EXPLAINATION. IT IS WORTH 5 OF THE 10 POINTS.
Add the following comments to the beginning of the program.
Class and Section:
CS 245 01
Program Assignment 01
Date Turned in:
Program Description: You write a short description of what the program will do
When you complete the program, do the following.
1. Create a folder with the following name: Assignment01
2. Copy and paste your program into Notepad or Notepad++ and save it to the folder with a .txt
3. Copy the folder to your folder in the I:\kopp\inbox\CS 245 01 folder
4. Print a copy of the source code and turn it in.
Extra Credit – 5 points
Modify the program above to subtract 1000 from the value you have after adding number1 and
number2. (Hint: you need to do this after to store the total into sum so you don’t lose that value before
you subtract.) Store this new value in memory at diff. Assemble, link and execute the program. Explain
the changes that are displayed in registers and memory after execution of each instruction. THIS MUST
BE A DETAILED EXPLAINATION.
Purchase answer to see full