Question: 3 . 9 LAB: Arithmetic expression - ADD / SUB / MUL Given the mapping of registers to variables below, write a program in LEGv
LAB: Arithmetic expression ADDSUBMUL
Given the mapping of registers to variables below, write a program in LEGv to implement the following expression: Z AB X CD LAB: Arithmetic expression ADDSUBMUL
Given the mapping of registers to variables below, write a program to implement the following expression:
Ex: If the values of and are initialized in the simulator as:
the result is stored in :
Note: Use the button under the Registers display to initialize register values.
This zyLab platform supports the following LEGv instructions:
Arithmetic: ADD, ADDS, ADDI, ADDIS, MUL, SDIV, SUB, SUBS, SUBI, SUBIS
Data transfer: LDURB, LDUR, LDURH, LDURSW, MOVK, MOVZ, STURB, STUR, STURH, STURW
Logical: AND, ANDI, EOR, EORI, ORR, ORRI, LSL LSR
Conditional branch: BHS BLO BEQ BGT BGE BHI BLT BLE BLS BMI BNE BVC BVS BPL CBZ CBNZ
Unconditional jump: B BL BR
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
