This preview shows page 1. Sign up to view the full content.
Unformatted text preview: (a) and $7,$12,$4 (b) lw $4, -16($5) (c) addi $s1,$t3, 22 (d) sw $ra 4($sp) 4. Using opcodes given in the lecture notes, give the hexadecimal representation of the machine code for the branch (beq), jump (j), and and immediate (addi) in-structions. Assume that loop = 0x00002000. loop: and $7,$12,$4 lw $4, -16($5) addi $s1,$t3, 22 beq $4, $5, end sw $ra 4($sp) j loop end: 5. Specify assembler memory directives to initialize an array A of word integers of size 5 such that A[i]=i. (equivalent to the C code: int A; for (i=0;i<5;i++) A[i]=i;). Spring 2009 Due: 22.4.2009 Prof. David Schimmel Sections F...
View Full Document
- Spring '09