Ref_3-21 - movia r8,HEXCHAR movia r9,0xa4b5c6d7 srli...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 330 Microprocessors Course Reference Fall 2010 3-21 3.7 Examples Example 3-6 Using the following code, memory and register snapshots, show the content of registers r10, r11and r12 after the three noted instructions in the supplied code fragment are executed. (Assume instructions before current PC have already been executed). Show your results in hexadecimal notation. Memory snapshot Register values .text ...
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: movia r8,HEXCHAR movia r9,0xa4b5c6d7 srli r10,r9,16 current pc andi r10,r10,0xf # 1 add r11,r8,r10 # 2 ldb r12,0(r11) # 3 ... # r10 r11 r12 ? .data HEXCHAR: .ascii "0123456789abcdef" .end Code fragment Note: r8 contains the address of HEXCHAR (0x2b884). By looking at the memory snapshot at address 0x2b884 we can see the ascii values for the characters 0123456789abcdef r10: 0x5 r11: 0x2b889 r12: 0x35...
View Full Document

Ask a homework question - tutors are online