Project 1 Programmer Manual S. Laufer CS221-02 - Fall, 2010 1. Problem Description The purpose of this project is to read 10 integers from the console. Upon input of 10 integers (between -32768 and 32768 due to the limitations of a 16-bit system), these integers will be sorted, and displayed along side the original, unsorted values. 2. Data Types or Classes This project uses signed integers, arrays and null-terminated strings. a. byte main: crlf - a newline s_eq - an equals sign s_mul - a multiplication sign s_div - a division sign s_add - an addition sign s_sub - a subtraction sign prompt - a prompt to enter a float readfloat: read - a string to read into inv_ent - a string displayed when an invalid value is entered sign - a byte representing the sign (+/-) of the value greet: GreetMsg - a greeting message string b. word readfloat: tmp - a temporary storatge location for fstsw base - the base to convert from/to disp: temp - a temporary storage space whole - the integer portion of the number c. dword main: float1 - first float float2 - second float float3 - third float (for operations between float1 and float2) disp: numb - number to display fract - fractional portion of number twotimes - number multiplied by 2 3. Procedures a. WriteStr (char * str) This procedure takes its argument from the stack. The first and only argument pushed should be a two-byte unsigned integer representing the DS offset of a null-terminated string. This procedure will begin at the passed DS offset and print every character until it reaches a null terminator (0x00, NULL) b. ReadStr (char * ptr, short size) This procedure takes its arguments from the stack. The first argument pushed should be a two-byte unsigned integer representing the maximum size of the string to be read. The second argument should be a two-byte unsigned integer representing a DS offset at which to store the values read. This procedure will begin reading from the console, and continue reading until it receives a Carriage Return (0x0D, CR). If more than (size - 1) characters are read before a Carriage Return is received, subsequent characters will be discarded. c. ReadFloat This procedure takes one memory location as an argument. It reads a floating point number from the console and writes it as a 32-bit float to that memory location. d. disp This procedure takes one 32-bit float as a number, and writes that number to the console in base 10 decimal format. f. Greet () This procedure prints a simple greeting message. 4. High Level Program Design Prompt user for 10 integers, storing copies in two separate arrays Pass one array to sort procedure Print sorted and unsorted arrays side-by-side 5. Design Limitations and Suggestions This program is limited by the range and resolution of 32-bit floats.