Project 1 Due: 25 Feb
Requirements Specfication
Create the source file 6789prj1.asm, assembly it, link it, and run it.
When it runs correctly, submit using Blackboard.
(Remember that the 6789 is suppose to be the last four digits of your
SSN, so that there is a unique file! Do not use 6789 unless that
is in YOUR SSN!!)
Specifications
Translate the following C program in an assembly language program. Make sure that
the output from both versions is identical.
#include <stdio.h>
int main( void )
{
int age = 21;
int size;
int i;
size = 7;
printf( "size 1 = %d\n", size );
size = size * age;
printf( "size 2 = %d\n", size );
age = age / 7;
printf( " age 1 = %d\n", age );
i = age % 7;
printf( "i 1 = %d\n", i );
i = age + 4 * 3 + ( size * i / age );
printf( " i 2 = %d\n\n", i );
printf( "\nStarting FOR loop:\n" );
for( i = -5; i < 100; i+= 5 )
{
printf( "i = %d\n", i + 2 );
}
return 0;
}
Program Header Comment Block
Use the following comment block at the beginning of your source code:
;; Filename: 6789prj1.asm
;; Name: Ima Student
;; SSAN: 6789
;; Date: 18 Feb 2004
;; Course: CMSC313
;; Description: (Your psuedocode goes here. Must be detailed)
;; Notes: (As needed, such has how to compile)