pr04fn

pr04fn - Problem 1. write the register values after...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Problem 1. write the register values after executing the following instructions. .text .globl __start __start: 0x400000 addi $a0 $zero 5 $a0= 5 LOOP: addi $a1 $zero 6 $a1= 6 add $s0 $a0 $a1 $s0= b sll $s0 $s0 2 $s0= 2c ori $a0 $zero 0xffff $a0= ffff jal LOOP $ra= $PC= 400004 nop 40001c Problem 2: Write a Machine code for the following instructions. (Hexadecimal format) add $7,$8,$9 addi $7,$8,5 0x01093820 0x21070005
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Hint : opcode for add is 0 and func field is 0x20. opcode for addi is 8 . Problem 3: Write MIPS program to print “*” character value of $t1 times. ( if $t1 value is 2, then print **: if $t1 value is 3, then print ***, so on). . hint) data, text, global, system call, Problem 4: Write MIPS program to count number of ones in register a0 and return the value in register $v0. POP_CNT : Jr $ra Problem5: One way of making control signal is hardwired control. 5-1. What is the other way covered at the class? 5-2. What are the benefits of this over hardwired control?
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/26/2012 for the course EE 3755 taught by Professor Staff during the Fall '02 term at LSU.

Page1 / 8

pr04fn - Problem 1. write the register values after...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online