Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What memory address (in hex) is varW stored? What memory address (in hex) is varB stored? What memory address (in hex) is const+4 stored? What

What memory address (in hex) is varW stored?

What memory address (in hex) is varB stored?

What memory address (in hex) is const+4 stored?

What is the value of R4 (in decimal) at CHECKPOINT 1?

What is the value of R5 (in hex) at CHECKPOINT 2?

What is the value of the memory address (16 bits) that &varW+4 points to?

What is the value of R5 (in hex) at CHECKPOINT 3?

What is the significance of the byte operator in add.b, specifically, how did it impact the result of question 7?

What is the result of the instruction mov.w #0xFFFF, &const?

What are the values of the array at CHECKPOINT 4?

The instruction jne L1 is 0x23FB in machine code. If 23 is the op-code/C, why are the last two bits FB?

image text in transcribed

2 MSP438 Assembler Code Template for use with TI Code Composer Studio cdecls C, LIST, "msp438.h Include device header file .def RESET Export program entry-point to make it known to linker data RAM STARTS AT ex8200 15 varW: Word x4444, 8x5555 6 varB: .byte 8x77, 0x66 8 array: .space 10 Assemble into program memory Override ELF conditional linking retain ; and retain current section retainrefs tain any sections that have 24 ; references to current section symcon1: ,set x0001 7const: word ex1800, ex2000, 8x3000 8x400 x3FE+2, x83FE RAM BOTTOM 9 INIT STACK: .sct x400 38 1 RESET 2 StopWDT mov . w #NDTPWINDTHOLD,ZnDTCTL ; Stop watchdog timer mov.w # STACK END,SP ; Initialize stackpointer 34 6 Main loop here 7 38 9 main: #INTT STACK , SP ; initialize stack pointer mov .w stop watchdog timer mov.w #0x5555, R4 mov.w &varw, R4 sub.w &varw+2, R4 7 CHECKPOINT1 49 mov.w &var+4, R5 3 CHECKPOINT 2 4 add. b &varB, RS 5 CHECKPOINT 3 mov.w #8xFFFF, &const clr.w R14 1 L1: 52 .R14, array (R14) incd.w R14 cnp.w #8,R14 jne L1 7 CHECKPOINT 4 58 9 Loop: jmp Loop 4 Stack Pointer definition lobal STACK END sect stack Interrupt Vectors ,sect ".reset .short RESET MSP430 RESET Vector 2 MSP438 Assembler Code Template for use with TI Code Composer Studio cdecls C, LIST, "msp438.h Include device header file .def RESET Export program entry-point to make it known to linker data RAM STARTS AT ex8200 15 varW: Word x4444, 8x5555 6 varB: .byte 8x77, 0x66 8 array: .space 10 Assemble into program memory Override ELF conditional linking retain ; and retain current section retainrefs tain any sections that have 24 ; references to current section symcon1: ,set x0001 7const: word ex1800, ex2000, 8x3000 8x400 x3FE+2, x83FE RAM BOTTOM 9 INIT STACK: .sct x400 38 1 RESET 2 StopWDT mov . w #NDTPWINDTHOLD,ZnDTCTL ; Stop watchdog timer mov.w # STACK END,SP ; Initialize stackpointer 34 6 Main loop here 7 38 9 main: #INTT STACK , SP ; initialize stack pointer mov .w stop watchdog timer mov.w #0x5555, R4 mov.w &varw, R4 sub.w &varw+2, R4 7 CHECKPOINT1 49 mov.w &var+4, R5 3 CHECKPOINT 2 4 add. b &varB, RS 5 CHECKPOINT 3 mov.w #8xFFFF, &const clr.w R14 1 L1: 52 .R14, array (R14) incd.w R14 cnp.w #8,R14 jne L1 7 CHECKPOINT 4 58 9 Loop: jmp Loop 4 Stack Pointer definition lobal STACK END sect stack Interrupt Vectors ,sect ".reset .short RESET MSP430 RESET Vector

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

Step: 3

blur-text-image

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

How have social technologies changed e-commerce?

Answered: 1 week ago

Question

1.who the father of Ayurveda? 2. Who the father of taxonomy?

Answered: 1 week ago

Question

Commen Name with scientific name Tiger - Wolf- Lion- Cat- Dog-

Answered: 1 week ago