Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Keil uvision5 , m3 cortex how do i fix/resolve this warning shown below? code included below I need R1 to result to 0x0000000E . please

Keil uvision5 , m3 cortex

how do i fix/resolve this warning shown below? code included below

I need R1 to result to 0x0000000E . please test and confrim thanks

image text in transcribed

==code==

AREA name, CODE, READONLY

EXPORT __main

__main

LDR r0, = 0x7E0C0A2B ; MOV wont work

MOV r1, #0 ;r1 = 0

MOV r2,r0 ; r2 = r0

MOV r4, #0 ; r4 = 0

countone ; loop

MOVS r2, r2, LSR #1

CLZ r3, r2

ADD r1,r1,r4 ; Now Add carry bit

CMP r3, #0

BNE stop ; if r3 not equal to 0, then LSB is 0, dont perform ADD as adding 0 doesn't make sense

ADD r1, r1, #1 ; if r3 is set to 0 then LSB is 1,add 1 to r1

CMP r2, #0 ; compare r2 and 0

BNE countone ; branch if not equal to loop

stop B stop

END

5 ??Source Gro CMSIS Device 7 8 9 10 LDR r0, = Ox7E0C0A2B ; MOV wont work MOV r1, #0 MOV r2,r0 MOV r4, #0 ; r2 = r0 ;r4 = 0 11 countone : loop 12 13 14 15 16 17 18 19 20 21 Movs r2, r2, LSR #1 CLZ r3, r2 ADD r1,rl,r4 :Now Add carry bit CHP r3, #0 BNE stop : if r3 not equal to 0,t : if r3 is set to 0 then : compare r2 and 0 ADD r1, r1, #1 CHP r2, #0 BNE Countone 23 24 ; branch if n 25 stop B stop 26 27 END Build Output Using Compiler 'v5.06 update 5 (build 528) ', folder: 'C:\Keil_5 ARMNARMCC\Bin Build target 'Target l' assembling assembly.s. . . assembly, s (27): warning : A? 58M :Added' 2 bytes of padding at address 0x22 linking. .. Program Size: Code-144 RO-data-192 RW-data-4 ZI-data-4100 ".objects\Lab_08.axf"- 0 Error (s),1 Warning (s). Build Time Elapsed: 00:00:00 5 ??Source Gro CMSIS Device 7 8 9 10 LDR r0, = Ox7E0C0A2B ; MOV wont work MOV r1, #0 MOV r2,r0 MOV r4, #0 ; r2 = r0 ;r4 = 0 11 countone : loop 12 13 14 15 16 17 18 19 20 21 Movs r2, r2, LSR #1 CLZ r3, r2 ADD r1,rl,r4 :Now Add carry bit CHP r3, #0 BNE stop : if r3 not equal to 0,t : if r3 is set to 0 then : compare r2 and 0 ADD r1, r1, #1 CHP r2, #0 BNE Countone 23 24 ; branch if n 25 stop B stop 26 27 END Build Output Using Compiler 'v5.06 update 5 (build 528) ', folder: 'C:\Keil_5 ARMNARMCC\Bin Build target 'Target l' assembling assembly.s. . . assembly, s (27): warning : A? 58M :Added' 2 bytes of padding at address 0x22 linking. .. Program Size: Code-144 RO-data-192 RW-data-4 ZI-data-4100 ".objects\Lab_08.axf"- 0 Error (s),1 Warning (s). Build Time Elapsed: 00:00:00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions