CPS 104 (Ramm) Fall Semester 1995 Homework Assignment #6 Due Wednesday, Oct. 18 Write an interactive assembler program that can be used to look at the computer's memory. The program should include three key procedures. One procedure should be a revision of your decin routine designed to read in hexadecimal. Except for the fact that hexin expects hex digits, it should have the same specifica- tions as decin. Another major procedure, called hexout, should display a byte of memory in hexadecimal (2 digits). The "main" procedure, to be named dumpmem, should display 16 bytes of memory starting at the address passed in $a0. It should display memory both as characters (assuming ASCII) and as bytes, in hexadecimal, in the following format: please enter address: 3090A24 030A0124 61 62 70 72 24 20 08 31 30 0A 0D 24 21 22 20 4D 030A0124 a b p r . . 1 0 . . . ! " M The main program should include a main loop that asks the user for a hex address and then displays the contents as shown above. When displaying the characters, show unprint- able characters as periods. The loop should quit when given an address of 0. The real problem comes in testing this routine. This kind of program would really be useful to check out memory when you are the superuser and could look at any of it. In prac- tice, you can look only at the memory used by your program. To make debugging possible, initialize some arrays and strings to known values and print out some reference ad- dresses. Actually, with the help of xspim, you can check everything and get the proper addresses to use. The previ- ous precautions should make debugging a little easier. October 8, 1995