Question
Arm M3 Cortex , uvision5. Easy for you, hard for me :) Below are 3 pics of code , lets call them in order: lab10
Arm M3 Cortex , uvision5. Easy for you, hard for me :)
Below are 3 pics of code , lets call them in order: lab10 , lab8 , and lab 9 . copy/paste code is below the pics.
please fill in the highlighted area in lab 10 with Macro code using lab 8 and lab 9 respectively.
In other words, take the lab8/9 code and write them as equivelant MACRO/MEND code.
please reference the 4th and 5th picture here for more information. thumbs up for good answer. need more info? lemme know thanks.
==========code==============
=======lab10
MACRO
; macro code goes here Chegg
MEND
MACRO
; macro code goes here Chegg
MEND
AREA name, CODE, READONLY
EXPORT __main
__main
LDR R1, =0x2345ABCD
LDR R2, =0x2345ABCD
Case_1_Lab_08 Count1s_Lab08 R4, R3, R1
Case_1_Lab_09 Count1s_Lab09 R5, R2
LDR R1, =0x0
LDR R2, =0x0
Case_2_Lab_08 Count1s_Lab08 R6, R3, R1
Case_2_Lab_09 Count1s_Lab09 R7, R2
LDR R1, =0xFFFFFFFF
LDR R2, =0xFFFFFFFF
Case_3_Lab_08 Count1s_Lab08 R8, R3, R1
Case_3_Lab_09 Count1s_Lab09 R9, R2
stop B stop
END
=======lab8
AREA name, CODE, READONLY
EXPORT __main
__main
LDR R0, =0x2345ABCD
MOV R1, #0
loop
CMP R0, #0
BEQ stop
CLZ R2, R0
ADD R2, #1
ADD R1, #1
LSL R0, R2
BNE loop
stop B stop
END
==========lab9
AREA Lab_09_YourFirstName_YourLastName, CODE, READONLY
EXPORT __main
__main
LDR R0, =0x2345ABCD
MOV R1, #0
loop
LSRS R0, #1
ADC R1, #0
BNE loop
stop B stop
END
1 2 MACRO cro code goes here Chegd MEND 6 MACRO macro code goes heze Chegg MEND 10 12 13 14 15 16 17 18 19 20 Case l Lab 08 Countls Lab08 R4, R3. Rl 21 Case 1 Lab 09 Countls Lab09 R5, R2 CODE, READONLY EXPORT main main LDR Ri, -0x2345ABCD LDR R2 , =0x2 34 5ABCD 2 3 24 25 26 Case 2 Lab 08 Countis Lab08 R6, R3, RI 27 Case 2 Lab 09 Countls Lab09 R7, R2 28 29 30 31 32 Case 3 Lab 08 Countls Lab08 R8, R3, RI 33 Case 3 Lab 09 Countls Labo9 R9, R2 34 35 stop B stop 36 LDR R1 , =0x0 LDR R2, 0x0 LDR R1, =0xFFFFFFFF LDR R2, =0xFFFFFFFF END 1 2 MACRO cro code goes here Chegd MEND 6 MACRO macro code goes heze Chegg MEND 10 12 13 14 15 16 17 18 19 20 Case l Lab 08 Countls Lab08 R4, R3. Rl 21 Case 1 Lab 09 Countls Lab09 R5, R2 CODE, READONLY EXPORT main main LDR Ri, -0x2345ABCD LDR R2 , =0x2 34 5ABCD 2 3 24 25 26 Case 2 Lab 08 Countis Lab08 R6, R3, RI 27 Case 2 Lab 09 Countls Lab09 R7, R2 28 29 30 31 32 Case 3 Lab 08 Countls Lab08 R8, R3, RI 33 Case 3 Lab 09 Countls Labo9 R9, R2 34 35 stop B stop 36 LDR R1 , =0x0 LDR R2, 0x0 LDR R1, =0xFFFFFFFF LDR R2, =0xFFFFFFFF ENDStep 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