CSE 30 -- Lecture 2 -- Oct 2


Topics covered in class Assignment 1 (due before class Wednesday, Oct 9): You should use the turnin program to submit: Note: your OIC program is a partial specification of what's in memory -- you specify what memory contents are except for memory locations 0 and 1, which will contain the inputs (call these values x and y respectively) when the program runs; your program's ``output'' should be the value x*y in memory location 2. If you need to put a constant in memory as a number instead of as an instruction, you may do so. You may use the .data and .text notation as in the SPIM MIPS assembler, as well as symbolic memory addresses. You may assume that anything you put into memory as data or as instructions will not be placed where the input values to your program will be placed.

Example notation:

		# adds 2 to input in memory location 0
		.data
two:		.word  2		# fill entire word with the value 2
tmp:		.space 1		# allocate 1 word (not bytes as in SPIM)
		.text
add2:		subz tmp,tmp,next	# mem word gets (tmp,tmp,next) triple
		subz tmp,two,next
		subz tmp,0,next
		subz 0,0,next
		subz 0,tmp,next
You must also comment your code. You should not use the move / add macros unless you give a very clear description of how these macros would be implemented in a macro assembler; if this description is unclear or has any ambiguities, I will assume that your code does not work.

(If you've never used the turnin program before, go to a shell window and type in help instruct for instructions on how to use it. For this assignment, you can put everything in a single text file. The course ID is cs30f.)


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

bsy@cse.ucsd.edu, last updated Wed Oct 16 22:37:33 PDT 1996.

email bsy