Questions and Answers


Q:
Can I just test to see if the subtrahend is larger than the minuend to test for borrow?
A:
That is a valid method; you should, however, avoid using it. The method that I gave in class and in the Web page extends trivially to doing multiprecision addition as well as subtraction; the subtrahend-minuend comparision does not. Make sure you understand how the test that I gave you works.
Q:
Can I use labels on the .wordA:
No. If you do so, the MIPS assembler will translate those labels into MIPS addresses; the OIC memory content should be OIC addresses, and the OIC memory array would not work correctly. For example, using the OIC you can create computed gotos to branch into one of several entry points by modifying a subz instruction's branch target; this requires, however, that the addresses be OIC addresses, so that the addition will work properly.
Q:
In the sample C program, digits whose value is base or higher are allowed. Should our code check for this?
A:
This was an oversight in the C program -- I lose 10 points. In your MIPS code, you should follow the homework problem specification and disallow illegal digits. I've modified the C code to match.
Q:
In assignment 4, do I have to use subroutine calls / pointer arithmetic? Do I have to follow the C program's structure?
A:
You are required to write a MIPS assembly language program which performs with the given I/O specification. The sample C program is a program that satisfies the requirements, except for the fact that it is in C and not MIPS assembler. I make no requirements on the internal structure of your program, so you can code it in whatever way you like, with the following proviso: clarity and efficiency matters. Your code should not be spaghetti code unless you have a very good reason for it, and you must clearly comment the code. If a smart but unknowledgeable reader can not figure out what your code does, points will be taken off. The hypothetical reader knows (superficially) the MIPS assembly language, but does not know what algorithm you are using.
Q:
In assignment 1, can I use the add / move / etc macros?
A:
You may do so, but you must give a precise specification of how a macro assembler would handle these macros (translate macro invocations into the base subz instructions). If there are any ambiguities or the description is unclear, I will assume that your macro assembler does not work properly, and thus your code will not work.
Q:
When is assignment 1 due?
A:
As I said in class, it is due before class next Wednesday (Oct 9th).
Q:
How do I turn in the three portions?
A:
You may put all three in a single text file and turn that in. In the future, however, you will need to turn in multiple files using the tar command. I suggest that you learn how to use it soon, if you don't know already. Also, type in help instruct at a shell prompt, and you'll get some more information on how to run the turnin program.
Q:
I'm having trouble running xspim. How do you run it?
A:
The xspim executable should be on your PATH. However, in case something is wrong, you can always run it as /home/solaris/ieng9/cs30f/public/bin/xspim.
Q:
I'm having trouble loading the assignment 1 assembler input file. How do I load it?
A:
You need to type in the path to the file. If you ran xspim while in your home directory, the path given in the web page, ../public/assn1.asm should work. In any case, you can always use the full path, /home/solaris/ieng9/cs30f/public/assn1.asm, and that should always work regardless of what is your current directory.

[ CSE 80 | ACS home | CSE home | CSE calendar | bsy's home page ]
picture of bsy

bsy@cse.ucsd.edu, last updated Mon Nov 11 12:38:25 PST 1996.

email bsy