,
Programming Exercise 1, UMBC CMSC 313
UMBC CMSC 313, Computer Organization & Assembly Language
Programming Exercise 1: Capitalizing
Due: Monday June 10, 2002
Objective
This project is a finger-warming exercise to make sure that everyone can
compile an assembly language program, run it through the debugger and
submit the requisite files using the systems in place for the programming
projects.
Assignment
For this project, you must do the following:
-
Modify the assembly language program toupper.asm as follows.
Assume that the input is a person's name in upper case (e.g.,
"KIRK, JAMES T."). Your program should convert the name to lower
case except for the first character of each word (e.g., "Kirk, James
T."). You may assume that words are separated by one or more spaces.
Non-alphabetic characters and characters that are already lower case should
be unchanged.
-
To change the case, I want you to use the function toupper that is
in the C library. (See the handouts I have you you in class!)
-
Using the UNIX script command, record some sample runs of your program
and a debugging session using gdb. In this session, you should
fully exercise the debugger. You must set several breakpoints, single step
through some instructions, use the automatic display function and examine
the contents of memory before and after processing. The script command
is initiated by the command script. This puts you in a new UNIX
shell which records every character typed or printed to the screen. You
exit from this shell by typing exit at the UNIX prompt. A file
named typescript is placed in the current directory.
Turning in your program
Email the source file and the typescript file to Gary Burt, burt@cs.umbc.edu
Notes:
Additional help on running NASM, gdb and
making system calls in Linux are available on the assembly
language programming web page for this course.
Recall that the project policy states that programming assignments
must be the result of individual effort. You are not allowed to
work together. Also, your projects will be graded on five criteria:
correctness, design, style, documentation and efficiency. So, it is not
sufficient to turn in programs that assemble and run. Assembly language
programming can be a messy affair --- neatness counts.
UMBC |
CSEE |