Assembly language programming of the MIPS 1. Put the following bit pattern into
ID: 3865186 • Letter: A
Question
Assembly language programming of the MIPS
1. Put the following bit pattern into register $1 :
do this using just three instructions.
2. Start out a program with the instruction that puts a single one-bit into register one:
Now, by using only shift instructions and register to register logic instructions, put the pattern 0xFFFFFFFF into register $1. Don't use another ori after the first. You will need to use more registers than $1. See how few instructions you can do this in. My program has 11 instructions.
Explanation / Answer
1.bit pattern into register $1 :
MIPS Code:
.text # code section
.globl main
main:
la $1, str # load address of string
.data
str: .ascii “DEADBEEF”
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.