Homework 4
WPI Basketball Score Analyzer - an LC-3 Assembly Language Program

Due on Tuesday, December 5, 2006 at 11:59 pm

Outcomes

After successfully completing this assignment, you will be able to...

Before Starting

Read Chapters 6 and 7.

Description of Problem

In this project you'll write a program to process an array of records, where each record contains information about a WPI basketball game. Your program will print a summary of the scores followed by the win/loss record for WPI.

Input and Output

The format of each record in the database is as follows: the first item is the name of the opponent, stored as a zero-terminated ASCII string (one character per word); the second item is the number of points scored by WPI (an integer); and the third item is the number of points scored by the opponent (an integer). The database can contain any number of such records, and the last record in the database will be followed by a memory location containing the value x0000. The team scores can take on any value between 0 and #999. The database starts at location x4000.

Given this input:
x4000         'B'
x4001         'e'
x4002         'c'
x4003         'k'
x4004         'e'
x4005         'r'
x4006         x0000
x4007         #94
x4008         #43
x4009         'N'
x400A         'i'
x400B         'c'
x400C         'h'
x400D         'o'
x400E         'l'
x400F         's'
x4010         x0000
x4011         #106
x4012         #53
x4013         x0000
Your program should display this output:
WPI:  94,  Becker:  43
WPI:  106,  Nichols:  53

Wins:  2, Losses:  0
The format of your output should look just like the given example.

Hints

This program is more complicated than it might first appear - don't wait until the last minute to do this assignment. Break the program into manageable parts instead of trying to write the whole thing at once. Here is one way you might want to approach this assignment:

There are other ways to break up the assignment; the point is to concentrate on one subtask at a time, test it completely, then move on to the next. Comment as you code!

Design Considerations

Make use of subroutines where appropriate. For example, your routine to convert an integer to an ASCII string, and your routine to strip off leading zero's, should both be coded as subroutines.

Documentation Guidelines

You will be using the LC3Edit program to create your assembly language source file. Follow these formatting and documentation guidelines:

Deliverables

You should turn in two files for this assignment. basketball.asm contains the assembly language code for your program. scores.asm contains sample data you used to test your program. Using web-based turnin submit your LC-3 source files before 11:59pm on Tuesday, Dec 5.