CMSC313, Computer Organization & Assembly Language Programming, Fall 2012

Project 4: External Records

Due: Thursday October 11, 2012, 11:59pm

Objective

The objective of this programming project is to gain experience writing more complex assembly language programs and to use indexed addressing modes.

Assignment

Your assembly language program for this project will work with an externally defined array of records (a.k.a., structs). This array is defined in a C program as follows:
struct {
char realname[32] ;
char nickname[16] ;
char alignment[20] ;
char role[20] ;
int points ;
int level ;

} records[10] ;

int num_records = 10 ;
The records in the array have pre-initialized values not shown here. The full text of the C program is available on the GL file system at: /afs/umbc.edu/users/c/h/chang/pub/cs313/records.c You need to copy this file into your own directory.

Your assembly language program must search through the array and find the record with the least number of points and the record with the highest level. It must then print out the realname field of these two records. E.g.,

Lowest Points: James Pressman
Highest Level: Gabriel Lee

Implementation Notes

Extra Credit

For 15% extra credit, extend your assembly language program so that it also prints out the realname field of the record that has the alphabetically first nickname.

Nicknames should be compared using dictionary ordering. For example, any string starting with the letter 'a' comes before any string that starts with 'b' (regardless of length). In the case that one string is a prefix of another, the shorter string come first. E.g., "egg" comes before "egghead".

Turning in your program

Use the UNIX submit command on the GL system to turn in your project. You should submit at least 4 files: your assembly language program, at least 2 of your own test cases and a typescript file of sample runs of your program.

The UNIX command to do this should look something like:

submit cs313 proj4 report.asm myrec1.c myrec2.c typescript


Last Modified: 10 Oct 2012 21:36:39 EDT by Richard Chang
to Fall 2012 CMSC 313 Homepage