Question: Please help me with the code, I keep getting an program timed out message: STUR XZR , [ X 2 0 , # 0 ]
Please help me with the code, I keep getting an "program timed out" message:
STUR XZRX #
ADDI X XZR #
STUR XX #
ADDI X X #
SUBI X X #
loop:
CBZ X end
LDUR XX #
LDUR XX #
ADD X X X
STUR XX #
ADDI X X #
SUBI X X #
B loop
end: Write a program to populate an array with Fibonacci numbers. The Fibonacci sequence begins with and then each following number is
the sum of the previous two numbers. Ex: Assume the size of the array is always at least Use the button under the
Registers display to store the size of an integer array in X and the address of the first element of the array in the memory in X
Ex: If X and X are initialized in the simulator as and the data memory starting at address will contain:
Note: Use the button under the Registers display to initialize X and X 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
BVCBVS
BPL CBZ CBNZ
Unconditional jump: B BL BR
This
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
BVCBVS
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
