Project 1 Due: 7 Oct
Requirements Specfication
Create the source file jdoe1p1.asm, assembly it, link it, and run it.
When it runs correctly, submit using Blackboard.
(Remember that the jdoe1 is suppose to be your id that you use to log onto
the GL computers, so that there is a unique file! Do not use jdoe1 unless that
is in YOUR ID!!)
Specifications
Translate the following C program in an assembly langumonths program. Make sure that
the output from both versions is identical.
#include <stdio.h>
int main( void )
{
int months = 12;
int years;
int days;
int i;
int nr1 = 8;
int nr2 = 10;
int nr3 = 15;
years = 7;
printf( "years 1 = %d\n", years );
days = months * 30; /*Notice change of sequence */
printf( " days 1 = %d\n", days );
i = years * months;
printf( "i 1 = %d\n", i );
i = years % 12;
printf( "i 2 = %d\n", i );
i = nr1 + 4 + nr2 * i / nr3 * 3;
printf( " i 3 = %d\n\n", i );
printf( "\nStarting FOR loop:\n" );
for( i = -33; i < 75; i+= 4 )
{
printf( "i = %d\n", i + 3 );
}
return 0;
}
Program Header Comment Block
Use the following comment block at the beginning of your source code:
;; Filename: jdoe1p1.asm
;; Name: Ima Student
;; email: jdoe1@umbc.edu
;; Date: 18 Sep 2004
;; Course: CMSC313
;; Description: (Your psuedocode goes here. Must be detailed)
;; Notes: (As needed, such has how to compile)