The following 16-bit hex words are stored in memory as shown. Find the correspon
ID: 3731542 • Letter: T
Question
The following 16-bit hex words are stored in memory as shown. Find the corresponding MSP430 instructions by disassembling the machine code. The first two lines have been completed for you. Show all branch address calculations. 1. Addr: hex binary 005c18: 4034 0100000000110100 005c1a: SCOC 0101 1100 0000 1100 005c1c: 4345 instr/data R4 mov.w #Ox5COC, #0x5cOc 005c1e: 4476 005c20: 9306 005c22: 2405 005c24: 9076 005c26: 006 005c28: 23FA 005c2a: 5315 005c2c: 3FF8 005c2e: 4303 Write the complete assembly program that corresponds to the machine code above. The first line has been completed for you. Use labels for all branch instructions. 2. main: mov.w #0x5c0cr4Explanation / Answer
Addr : hex binary instr/data
005c18 : 4034 0100 0000 0011 0100 mov.w #0x5C0C, R4
005c1a : 5C0C 0101 1100 0000 1100 #0x5c0c
005c1c : 4345 0100 0011 0100 0101 mov.b ,R5
005c1e : 4476 0100 0100 0111 0110 mov.b,R7
005c20 : 9306 1001 0011 0000 0110 cmp
005c22 : 2405 0010 0100 0000 0101
005c24 : 9076 1001 0000 0111 0110 cmp
005c26 : 006F 0000 0000 0110 1111
005c28 : 23FA 0010 0011 1111 1010
005c2a : 5315 0101 0011 0001 0101 add.w
005c2c : 3FF8 0011 1111 1111 1000
005c2e : 4303 0100 0011 0000 0011 mov.w