hw4 - ECE 332 Due: 2/12/2010 Homework 4 Spring 2010 1....

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

View Full Document Right Arrow Icon
ECE 332 Homework 4 Spring 2010 Due: 2/12/2010 Page 1 of 3 1. Create macros that implement the following instructions. These macros should not use any registers other than those specified as operands. Example problem Incr increment Operation: rA rA + 1 Assembler Syntax: incr rA Example: incr r6 Solution .macro incr rA addi \rA,\rA,1 .endm a. decr decrement Operation: rA rA - 1 Assembler Syntax: decr rA Example: decr r6 b. rori rotate right immediate Operation: rB rA rotated right IMM5 bit positions Assembler Syntax: rori rB, rA, IMM5 Example: rori r6, r7, 3 c. halt halt execution Operation: PC PC Assembler Syntax: halt Example: halt d. comp one’s complement Operation: rB ~rA Assembler Syntax: comp rB, rA Example: comp r2, r8
Background image of page 1

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

View Full DocumentRight Arrow Icon
ECE 332 Homework 4 Spring 2010 Due: 2/12/2010 Page 2 of 3 2. Create macros that implement the following instructions. These macros may require the usage of additional registers. When a temporary register is needed for temporary values use register
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 document was uploaded on 11/02/2011 for the course ECE 332 at Boise State.

Page1 / 3

hw4 - ECE 332 Due: 2/12/2010 Homework 4 Spring 2010 1....

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