For this assignment, you should write a routine funky which
calculates
result = sumi = 1count i * mem[baseaddr + i - 1];
The code should start at memory location 0x400, the result should be
placed in memory location 0x8000, the base address of the vector
should be located in location 0x8001, and the number of elements
(count) should be located in memory location 0x8002. Your code must
include the definition and use of a mult macro. The contents
of memory location 0x8001 is the address of the vector, and you are
guaranteed that this address is not in the range 0x8000-0x8400, so
there is plenty of space for your variables. Likewise it will not be
in the range 0x0-0x800, where the code will reside.
To hand in this program, you must use the turnin program. I suggest you organize your files in the following way: create an assn3 subdirectory in your home directory that will contain all of your masm, asm, and oic files for this assignment. Test the turning as follows:
cd tar cf assn3.tar assn3 mkdir test3 cd test3 tar xf ../assn3.tar ls assn3to verify that you have all the files and no others, i.e., do not turn in extraneous files such as a copy of the oic simulator. You'll get points deducted for doing that!
Once you're sure that this copy of the assn3 directory (created as ~/test3/assn3) is okay, you can do
cd turnin -c cs30f < assn3.tar rm -fr test3
See test inputs test1.vec.oic, test1.ptr.oic, test1.result.txt; and test2.vec.oic, test2.ptr.oic, test2.result.txt. Run your code with
% oic -s 0x8000 -c 1 -e 0x400 funky.txt.oic funky.data.oic test1.vec.oic test1.ptr.oicand the output word should match test1.result.txt.
64 students handed in assignment 3. assignment 3 as a whole: mean 78.9972 stdev 21.3511 w/o late adjustment: mean 81.0312 stdev 18.9736 Excluding all-zero scores: assignment 3 as a whole: mean 78.9972 stdev 21.3511 w/o late adjustment: mean 81.0312 stdev 18.9736 Per-problem statistics: Num 1: mean 34.406250 stdev 6.904977 Num 2: mean 14.203125 stdev 3.212182 Num 3: mean 14.031250 stdev 3.220873 Num 4: mean 18.390625 stdev 14.154965 Per-problem statistics, omitting zero grades: Num 1: mean 34.406250 stdev 6.904977 Num 2: mean 14.901639 stdev 0.645410 Num 3: mean 14.483871 stdev 2.037883 Num 4: mean 28.707317 stdev 4.073974
bsy+cse30.f99@cs.ucsd.edu, last updated
email bsy.