ECE3362 Fall2018 HW 3 - dmasmdiasmdas,mlkndjiasmnd hsakodionjk sajo jknbn asb hijn PDF

Title ECE3362 Fall2018 HW 3 - dmasmdiasmdas,mlkndjiasmnd hsakodionjk sajo jknbn asb hijn
Author Adib Shakib
Course Microcontrollers
Institution Texas Tech University
Pages 2
File Size 83.1 KB
File Type PDF
Total Downloads 18
Total Views 122

Summary

dmasmdiasmdas,mlkndjiasmnd hsakodionjk sajo jknbn asb hijn...


Description

ECE 3362 Fall 2018 Homework 3 Due Mon/Tues Sept 24/25 in class Name_____________ One point penalty for any answer not shown in correct format. DO NOT USE # for any answer 1. Suppose the memory location beginning at address 0xF800 contains the word value 0x3A47. The following line of code is executed. What is the value contained in R11 afterward? mov &0xF800, R11

0x___________

2. Suppose the memory location beginning at address 0xF850 contains the word value 0x0204 and memory location 0x0204 contains the byte value 0x28. The following lines of code are executed. What is the value contained in R9 afterward? mov &0xF850, R5 mov.b @R5, R9

0x___________

3. Suppose the memory location beginning at address 0x0200 contains the word value 0x8967, and memory location 0x0202 contains the word value 0xAC12. The following lines of code are executed. What is the value contained at memory location 0x0200 afterward? mov mov mov mov

#0x6543, &0x0202 #0x0202, R5 #0x0200, R9 0(R5), 0(R9)

0x___________

4. Suppose the memory contains the values as shown below in byte format: 0x0200 = 0x16 0x0201 = 0x59 We then execute this line: mov.b &0x0201, &0x0200 What is contained in the byte at memory location 0x0200 afterward?

0x___________

5. R8 contains 0x549C. The following line executes. What is the value in R8 afterward? swpb R8 0x___________ 6. What Port pin is tested in this code? _______ LOW) to reach the label Active:? ___________ bit.b #0x08, &P1IN jne Active jmp NotActive Active: ; various code for Active case jmp Done NotActive: ; various code for other case Done:

What state must that port pin be in (HIGH or

Below are portions of a list file. What value is contained in R12 after the following line(189) executes? 0x___________ 189 00C0CA 3C4000E0 mov #PatternTable1, R12 ; point to beginning of Pattern Table 1 ;; >>> some code left out in interest of space 269 00E000 PatternTable1 ; this is just an example table (or perhaps the more 270 00E000 FC Row0 DB %11111100 ; familar concept is this is an array of bytes 271 00E001 D3 Row1 DB %11010011 ; containing 3 bytes as defined here) 272 00E002 A6 Row2 DB %10100110 ; PatternTable1 is the name of the table (or array) 7. After line 189 above executes, suppose the next line is: mov.b @R12, &P1OUT What actual hexadecimal value gets written to PORT 1?

0x__________________

8. Same as question 7 above, but instead the next line is: mov.b 2(R12), &P1OUT What actual hexadecimal value gets written to PORT 1?

0x __________________

9. Same as question 7 above, but instead the next line is: mov.b 0(R12), &P1OUT What actual hexadecimal value gets written to PORT 1? 10. Same as question 7 above, but instead the next line is: mov.b 1(R12), &P1OUT

0x__________________

What actual hexadecimal value gets written to PORT 1?

0x__________________

11. Suppose the line was instead: mov.b @R12+, &P1OUT How is the overall behavior different for this case? 12. What is the starting address of the table (PatternTable1) shown above? 0x _________ 13. How many times does this loop execute? mov #0x001F, R15 LoopTop dec R15 jnz LoopTop give answer in decimal _________ 14. How many times does this loop execute? mov #20, R15 LoopTop dec R15 jnz LoopTop give answer in decimal _________...


Similar Free PDFs