Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using a sequence of MIPS instructions, create a new addressing mode that implements a load-word (lw) or store- word (sw) with auto-increment (by 4) of
Using a sequence of MIPS instructions, create a "new addressing mode" that implements a load-word (lw) or store- word (sw) with auto-increment (by 4) of the address register after the memory access, where the syntax is lw St1, imm16(StO) and w St1, imm16(St0)+ Registers Stl and St0 are to be initialized to point to two distinct "arrays" of memory locations, where each element in the array is one word (4 bytes). Thus, the "imm16" value should be the array element number (starting with 0) times 4. For example, if you wanted to access the 3d element in the array (aray2, the "imm16" value should be 8. You are to use the "la" (load address) MIPS pseudo-instruction; no other pseudo-instructions may be used. Below is an example "code snippet" of how to initialize St1 and St0 to point the data, along with appropriate data definitions Stl, num 1 St0, arrayl # initialize $t1 to point to memory location with label "num !" # initialize $t0 to point to memory location with label "array2" # MIPS code that actually implements the "enhanced" MIPS instruction specified ori v0, zero, 10 syscall # $v0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started