CS 210 PROJECT #2 Due: Noon Tuesday 03/03/05 This project acquaints the student with issues involved in creating an "interactive" program in assembly language for the Linux environment. PROBLEM STATEMENT Design an assembly language program that will assist programmers in choosing valid symbol-names to use as statement-labels in their assembly language programs. Here is the definition of a symbol-name, quoted from the official GNU assembler manual (online): A symbol is one or more characters chosen from the set of all letters (both upper and lower case), digits and the three characters `_.$' (i.e., underscore, period, and currency-sign). No symbol may begin with a digit. Case is significant. There is no length limit: all characters are significant. Symbols are delimited by characters not in that set, or by the beginning of a file. (Note that because the source program must end with a newline, the end of a file is not a possible symbol delimiter). Your program should be constructed as an endless loop, which asks a user to type in a proposed symbol-name, then reports whether or not the reply that the user enters obeys the above rules for a valid symbol-name. The program-loop should terminate in case the user enters an empty character string (i.e., just a newline character). This is what a sample terminal sesion would look like: $ project2 Please type a proposed symbol-name on the line below: xyz$123 Yes, you typed a valid assembly language symbol-name. Please type a proposed symbol-name on the line below: 123_xyz No, you typed an invalid assembly language symbol-name. Please type a proposed symbol-name on the line below: $ REQUIREMENTS Your program should be written entirely in assembly language and be contained in just one source-file (named 'project2.s'). To assemble and link your program, you should use this command-sequence: $ as project2.s -o project2.o $ ld project2.o -o project2 You will need to make use of three Linux kernel system-calls (for write, read, and exit), as illustrated in several prior program demos. Turn in a printed copy of your program source-file plus a one-page printout that shows a sample terminal-session, and put all three of your program files ('project2.s', project2.o', and 'project2') into your '/submit' folder. ________________________________________________________________________ Allan B. Cruse University of San Francisco Spring 2005