Program 2 - Write an uitoa (unsigned int to ASCII) function to
translate a 16 bit unsigned int to ASCII representation. The function should
expect on the stack, a word (value to convert), the address of an array
where the result is to be stored, and a word containing a number in the
range 2 through 16 indicating the base of the output representation. The
result will be a null-terminated string of digits (or letters in the case
that the result is base 11 or more) starting at the address specified by the
argument. Test your procedure by displaying several different values in
various bases. Your function must not change registers and should NOT remove
the arguments from the stack.
Program 1 - from chapter 4: Do problem 4 on page 129. When
displaying the average, also display the remainder that resulted from the
division. Be sure to document your program. Email me a copy of the source
file.
Homework Assignments
Homework 7 to turn in - Read the following document and try out the
example: Linking C++ and Assembly -
let me know if something does not work. Develop your own example of a C or
C++ program that calls an assembly language function to perform the strcat
function (let's call it strconcat for this assignment). Normally you use the
C library strcat - I want you to implement it in assembly language. Your
driver should exercise it with several concatenations, including
concatenating with null strings. Remember - strcat returns a value and
performs a concatenation.
Homework 6 to turn in - invent a 12-bit floating point code
similar to the IEEE standard. Show how to encode 0, 1, -2.5, and 15.25.
Homework 4 to turn in - 7.1:1,2,3,4; 7.2:1,2,3,4,7,8 Do
programs 1 and 2 on page 253, use the answer from program 1 to help do
program 2. Build a main program to exercise each function. Use three
separate files for the project.