SlideShare una empresa de Scribd logo
1 de 2
The following codes are supposed to add ten Bytes stored in an array and store the sum in R4.
However, there is an error. Which of the four choices pick up the bug? MOV r0, #10; load r0
with 10 MOV r4. #0 LDR, r1, = Array; load r1 with address Array loop LDRB r2, r1; load one
byte to r2 ADD r4, r4, r2; r4 = r4 + r2 ADD r1, r1, #1; increase r1 by 1 SUBS r0, r0, #1;
decrease r0 by 1 BNE loop a. BNE loop should be BEQ loop b. loop should not take one line by
itself. c. MOV r0, #10 should be MOV r0, #A d. LDRB r2, r1 should be LDRB r2, [r1] Multiple
loading and multiple storing instructions allow you to load or store multiple registers from or to
memory. Which of the following instructions load r2 with the memory location [r0 + 4] a.
LDMIA r2, {r1, r0, r4} b. STMIA r2, {r1, r0, r4}) c. STMIA r0, {r1, r2, r4} d. LDMIA r0, {r1,
r2, r4} Let's assume r0, r1, r2,r3, r4, r5 and r6 have the contents of 0 times 90, 0 times 91, 0
times 92,.. and 0 times 96. After the following two stack operations, determine the content of r1.
PUSH {r0, r2-r6} POP {r0-r5}. a. 0 times 91 b. 0 times 93 c. 0 times 90 d. 0 times 92
Solution
Answers
4. Multiple loading and multiple storing instructions allow you to load multiple registers from
memory. which of the following load r2 with the memory location r0+4.
(b) STMA r2{r1,r0,r4}
5.Let’s assume r0,r1,r2,r3,r4,r5 and r6 have the contents of 0x90,0x91,…. and 0x96. After
following two stack operations , determine the content of r1
(a) 0x91
The following codes are supposed to add ten Bytes stored in an array a.docx

Más contenido relacionado

Similar a The following codes are supposed to add ten Bytes stored in an array a.docx

15CS44 MP & MC module 5
15CS44 MP & MC  module 515CS44 MP & MC  module 5
15CS44 MP & MC module 5RLJIT
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.pptsteffydean
 
커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)Dongpyo Lee
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction setPriyangaKR1
 
How would you write this in MARIE assembly languageint count = 0;.pdf
How would you write this in MARIE assembly languageint count = 0;.pdfHow would you write this in MARIE assembly languageint count = 0;.pdf
How would you write this in MARIE assembly languageint count = 0;.pdfbermanbeancolungak45
 
Please convert the following C code to assembly Y86int i,j; ......pdf
Please convert the following C code to assembly Y86int i,j; ......pdfPlease convert the following C code to assembly Y86int i,j; ......pdf
Please convert the following C code to assembly Y86int i,j; ......pdfSIGMATAX1
 
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdfARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdfeklavya0304
 
Arm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.pptArm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.pptManju Badiger
 
Buy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineBuy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineTechnogroovy
 

Similar a The following codes are supposed to add ten Bytes stored in an array a.docx (20)

15CS44 MP & MC module 5
15CS44 MP & MC  module 515CS44 MP & MC  module 5
15CS44 MP & MC module 5
 
Ch9a
Ch9aCh9a
Ch9a
 
module 5.1.pptx
module 5.1.pptxmodule 5.1.pptx
module 5.1.pptx
 
module 5.pptx
module 5.pptxmodule 5.pptx
module 5.pptx
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.ppt
 
커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
ch2-arm-1.ppt
ch2-arm-1.pptch2-arm-1.ppt
ch2-arm-1.ppt
 
ARM instruction set
ARM instruction  setARM instruction  set
ARM instruction set
 
Ch2 arm-1
Ch2 arm-1Ch2 arm-1
Ch2 arm-1
 
How would you write this in MARIE assembly languageint count = 0;.pdf
How would you write this in MARIE assembly languageint count = 0;.pdfHow would you write this in MARIE assembly languageint count = 0;.pdf
How would you write this in MARIE assembly languageint count = 0;.pdf
 
Please convert the following C code to assembly Y86int i,j; ......pdf
Please convert the following C code to assembly Y86int i,j; ......pdfPlease convert the following C code to assembly Y86int i,j; ......pdf
Please convert the following C code to assembly Y86int i,j; ......pdf
 
mup
mupmup
mup
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdfARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
 
Arm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.pptArm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.ppt
 
ARM lab programs
ARM  lab programs  ARM  lab programs
ARM lab programs
 
Buy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineBuy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects Online
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 

Más de carold11

The Financial Management Decision Process What are the three types of.docx
The Financial Management Decision Process What are the three types of.docxThe Financial Management Decision Process What are the three types of.docx
The Financial Management Decision Process What are the three types of.docxcarold11
 
The Federal Reserve attempts to keep prices stable and unemployment lo.docx
The Federal Reserve attempts to keep prices stable and unemployment lo.docxThe Federal Reserve attempts to keep prices stable and unemployment lo.docx
The Federal Reserve attempts to keep prices stable and unemployment lo.docxcarold11
 
The following class stores a list of integer values and contains a met.docx
The following class stores a list of integer values and contains a met.docxThe following class stores a list of integer values and contains a met.docx
The following class stores a list of integer values and contains a met.docxcarold11
 
The following accounts were taken from ABC CompanySolutionCalculation.docx
The following accounts were taken from ABC CompanySolutionCalculation.docxThe following accounts were taken from ABC CompanySolutionCalculation.docx
The following accounts were taken from ABC CompanySolutionCalculation.docxcarold11
 
The following are key terms in Chapter 14 that relate to regulatory an.docx
The following are key terms in Chapter 14 that relate to regulatory an.docxThe following are key terms in Chapter 14 that relate to regulatory an.docx
The following are key terms in Chapter 14 that relate to regulatory an.docxcarold11
 
The following account balances relate to the stockholders equity accou.docx
The following account balances relate to the stockholders equity accou.docxThe following account balances relate to the stockholders equity accou.docx
The following account balances relate to the stockholders equity accou.docxcarold11
 
The following accounts were taken from ABC CompanySolutionCalculation (3).docx
The following accounts were taken from ABC CompanySolutionCalculation (3).docxThe following accounts were taken from ABC CompanySolutionCalculation (3).docx
The following accounts were taken from ABC CompanySolutionCalculation (3).docxcarold11
 
The following accounts were taken from ABC CompanySolutionCalculation (2).docx
The following accounts were taken from ABC CompanySolutionCalculation (2).docxThe following accounts were taken from ABC CompanySolutionCalculation (2).docx
The following accounts were taken from ABC CompanySolutionCalculation (2).docxcarold11
 
The following accounts were taken from ABC CompanySolutionCalculation (1).docx
The following accounts were taken from ABC CompanySolutionCalculation (1).docxThe following accounts were taken from ABC CompanySolutionCalculation (1).docx
The following accounts were taken from ABC CompanySolutionCalculation (1).docxcarold11
 
The fiscal 2012 financial statements of Barney Services shows average.docx
The fiscal 2012 financial statements of Barney Services shows average.docxThe fiscal 2012 financial statements of Barney Services shows average.docx
The fiscal 2012 financial statements of Barney Services shows average.docxcarold11
 
The equity sections from Atticus Group The equity sections from.docx
The equity sections from Atticus Group        The equity sections from.docxThe equity sections from Atticus Group        The equity sections from.docx
The equity sections from Atticus Group The equity sections from.docxcarold11
 
The executive officers of Rouse Corporation have a performance-based c.docx
The executive officers of Rouse Corporation have a performance-based c.docxThe executive officers of Rouse Corporation have a performance-based c.docx
The executive officers of Rouse Corporation have a performance-based c.docxcarold11
 
The Federal Reserve had to resort to non-standard methods to try to st.docx
The Federal Reserve had to resort to non-standard methods to try to st.docxThe Federal Reserve had to resort to non-standard methods to try to st.docx
The Federal Reserve had to resort to non-standard methods to try to st.docxcarold11
 
The EU recently admitted the Eastern European countries- How do you as.docx
The EU recently admitted the Eastern European countries- How do you as.docxThe EU recently admitted the Eastern European countries- How do you as.docx
The EU recently admitted the Eastern European countries- How do you as.docxcarold11
 
The Esposito Import Company had 1 million shares of common stock outst.docx
The Esposito Import Company had 1 million shares of common stock outst.docxThe Esposito Import Company had 1 million shares of common stock outst.docx
The Esposito Import Company had 1 million shares of common stock outst.docxcarold11
 
The energy levels of electrons are related to their- a) Position on t.docx
The energy levels of electrons are related to their-  a) Position on t.docxThe energy levels of electrons are related to their-  a) Position on t.docx
The energy levels of electrons are related to their- a) Position on t.docxcarold11
 
The Electron in a Hydrogen Atom transforms from its n-1 state to its n.docx
The Electron in a Hydrogen Atom transforms from its n-1 state to its n.docxThe Electron in a Hydrogen Atom transforms from its n-1 state to its n.docx
The Electron in a Hydrogen Atom transforms from its n-1 state to its n.docxcarold11
 
The enqueue operation on the Queue ADT adds a new item to the back of (1).docx
The enqueue operation on the Queue ADT adds a new item to the back of (1).docxThe enqueue operation on the Queue ADT adds a new item to the back of (1).docx
The enqueue operation on the Queue ADT adds a new item to the back of (1).docxcarold11
 
The Fed follows the theory of bureaucratic behavior in what sense-.docx
The Fed follows the theory of bureaucratic behavior in what sense-.docxThe Fed follows the theory of bureaucratic behavior in what sense-.docx
The Fed follows the theory of bureaucratic behavior in what sense-.docxcarold11
 
Pay structures Union contracts Wage and price contracts Levels of reve.docx
Pay structures Union contracts Wage and price contracts Levels of reve.docxPay structures Union contracts Wage and price contracts Levels of reve.docx
Pay structures Union contracts Wage and price contracts Levels of reve.docxcarold11
 

Más de carold11 (20)

The Financial Management Decision Process What are the three types of.docx
The Financial Management Decision Process What are the three types of.docxThe Financial Management Decision Process What are the three types of.docx
The Financial Management Decision Process What are the three types of.docx
 
The Federal Reserve attempts to keep prices stable and unemployment lo.docx
The Federal Reserve attempts to keep prices stable and unemployment lo.docxThe Federal Reserve attempts to keep prices stable and unemployment lo.docx
The Federal Reserve attempts to keep prices stable and unemployment lo.docx
 
The following class stores a list of integer values and contains a met.docx
The following class stores a list of integer values and contains a met.docxThe following class stores a list of integer values and contains a met.docx
The following class stores a list of integer values and contains a met.docx
 
The following accounts were taken from ABC CompanySolutionCalculation.docx
The following accounts were taken from ABC CompanySolutionCalculation.docxThe following accounts were taken from ABC CompanySolutionCalculation.docx
The following accounts were taken from ABC CompanySolutionCalculation.docx
 
The following are key terms in Chapter 14 that relate to regulatory an.docx
The following are key terms in Chapter 14 that relate to regulatory an.docxThe following are key terms in Chapter 14 that relate to regulatory an.docx
The following are key terms in Chapter 14 that relate to regulatory an.docx
 
The following account balances relate to the stockholders equity accou.docx
The following account balances relate to the stockholders equity accou.docxThe following account balances relate to the stockholders equity accou.docx
The following account balances relate to the stockholders equity accou.docx
 
The following accounts were taken from ABC CompanySolutionCalculation (3).docx
The following accounts were taken from ABC CompanySolutionCalculation (3).docxThe following accounts were taken from ABC CompanySolutionCalculation (3).docx
The following accounts were taken from ABC CompanySolutionCalculation (3).docx
 
The following accounts were taken from ABC CompanySolutionCalculation (2).docx
The following accounts were taken from ABC CompanySolutionCalculation (2).docxThe following accounts were taken from ABC CompanySolutionCalculation (2).docx
The following accounts were taken from ABC CompanySolutionCalculation (2).docx
 
The following accounts were taken from ABC CompanySolutionCalculation (1).docx
The following accounts were taken from ABC CompanySolutionCalculation (1).docxThe following accounts were taken from ABC CompanySolutionCalculation (1).docx
The following accounts were taken from ABC CompanySolutionCalculation (1).docx
 
The fiscal 2012 financial statements of Barney Services shows average.docx
The fiscal 2012 financial statements of Barney Services shows average.docxThe fiscal 2012 financial statements of Barney Services shows average.docx
The fiscal 2012 financial statements of Barney Services shows average.docx
 
The equity sections from Atticus Group The equity sections from.docx
The equity sections from Atticus Group        The equity sections from.docxThe equity sections from Atticus Group        The equity sections from.docx
The equity sections from Atticus Group The equity sections from.docx
 
The executive officers of Rouse Corporation have a performance-based c.docx
The executive officers of Rouse Corporation have a performance-based c.docxThe executive officers of Rouse Corporation have a performance-based c.docx
The executive officers of Rouse Corporation have a performance-based c.docx
 
The Federal Reserve had to resort to non-standard methods to try to st.docx
The Federal Reserve had to resort to non-standard methods to try to st.docxThe Federal Reserve had to resort to non-standard methods to try to st.docx
The Federal Reserve had to resort to non-standard methods to try to st.docx
 
The EU recently admitted the Eastern European countries- How do you as.docx
The EU recently admitted the Eastern European countries- How do you as.docxThe EU recently admitted the Eastern European countries- How do you as.docx
The EU recently admitted the Eastern European countries- How do you as.docx
 
The Esposito Import Company had 1 million shares of common stock outst.docx
The Esposito Import Company had 1 million shares of common stock outst.docxThe Esposito Import Company had 1 million shares of common stock outst.docx
The Esposito Import Company had 1 million shares of common stock outst.docx
 
The energy levels of electrons are related to their- a) Position on t.docx
The energy levels of electrons are related to their-  a) Position on t.docxThe energy levels of electrons are related to their-  a) Position on t.docx
The energy levels of electrons are related to their- a) Position on t.docx
 
The Electron in a Hydrogen Atom transforms from its n-1 state to its n.docx
The Electron in a Hydrogen Atom transforms from its n-1 state to its n.docxThe Electron in a Hydrogen Atom transforms from its n-1 state to its n.docx
The Electron in a Hydrogen Atom transforms from its n-1 state to its n.docx
 
The enqueue operation on the Queue ADT adds a new item to the back of (1).docx
The enqueue operation on the Queue ADT adds a new item to the back of (1).docxThe enqueue operation on the Queue ADT adds a new item to the back of (1).docx
The enqueue operation on the Queue ADT adds a new item to the back of (1).docx
 
The Fed follows the theory of bureaucratic behavior in what sense-.docx
The Fed follows the theory of bureaucratic behavior in what sense-.docxThe Fed follows the theory of bureaucratic behavior in what sense-.docx
The Fed follows the theory of bureaucratic behavior in what sense-.docx
 
Pay structures Union contracts Wage and price contracts Levels of reve.docx
Pay structures Union contracts Wage and price contracts Levels of reve.docxPay structures Union contracts Wage and price contracts Levels of reve.docx
Pay structures Union contracts Wage and price contracts Levels of reve.docx
 

Último

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 

Último (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 

The following codes are supposed to add ten Bytes stored in an array a.docx

  • 1. The following codes are supposed to add ten Bytes stored in an array and store the sum in R4. However, there is an error. Which of the four choices pick up the bug? MOV r0, #10; load r0 with 10 MOV r4. #0 LDR, r1, = Array; load r1 with address Array loop LDRB r2, r1; load one byte to r2 ADD r4, r4, r2; r4 = r4 + r2 ADD r1, r1, #1; increase r1 by 1 SUBS r0, r0, #1; decrease r0 by 1 BNE loop a. BNE loop should be BEQ loop b. loop should not take one line by itself. c. MOV r0, #10 should be MOV r0, #A d. LDRB r2, r1 should be LDRB r2, [r1] Multiple loading and multiple storing instructions allow you to load or store multiple registers from or to memory. Which of the following instructions load r2 with the memory location [r0 + 4] a. LDMIA r2, {r1, r0, r4} b. STMIA r2, {r1, r0, r4}) c. STMIA r0, {r1, r2, r4} d. LDMIA r0, {r1, r2, r4} Let's assume r0, r1, r2,r3, r4, r5 and r6 have the contents of 0 times 90, 0 times 91, 0 times 92,.. and 0 times 96. After the following two stack operations, determine the content of r1. PUSH {r0, r2-r6} POP {r0-r5}. a. 0 times 91 b. 0 times 93 c. 0 times 90 d. 0 times 92 Solution Answers 4. Multiple loading and multiple storing instructions allow you to load multiple registers from memory. which of the following load r2 with the memory location r0+4. (b) STMA r2{r1,r0,r4} 5.Let’s assume r0,r1,r2,r3,r4,r5 and r6 have the contents of 0x90,0x91,…. and 0x96. After following two stack operations , determine the content of r1 (a) 0x91