Question
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?
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
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