ECE 330 Homework 3 Fall 2010 Due: 9/13/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. Write a program that utilizes each of the following macros. Show before and after snapshots of registers that confirms validity. a.decrdecrement Operation: rA ←rA - 1 Assembler Syntax: decr rA Example: decr r6 b.rorirotate right immediate Operation: rB ←rA rotated right IMM5 bit positions Assembler Syntax: rori rB, rA, IMM5 Example: rori r6, r7, 3c.halthalt execution Operation: PC ←PC Assembler Syntax: halt Example: halt d.compone’s complement Operation: rB ←~rA Assembler Syntax: comp rB, rA Example: comp r2, r8
has intentionally blurred sections.
Sign up to view the full version.