When a byte is loaded from memory into an ARM processor register using the Load instruction, the

Question:

When a byte is loaded from memory into an ARM processor register using the Load instruction, the high-order 24 bits are cleared to Os. (See Section 3.1.2.) If the loaded byte represents an 8-bit signed integer in 2's-complement representation, it must be sign-extended to 32 bits in the register before it can be used in arithmetic operations. Assuming such a byte has been loaded into register RO, write a short routine to sign- extend it to the 32-bit register length. (Hint: Use MOV instructions to move the contents of RO back into RO after appropriate shifts from the possibilities LSL, LSR, and ASR, as described in Section 2.10.2 and shown in Figure 2.30.)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Organization

ISBN: 9780072320862

5th Edition

Authors: V Carl Hamacher, Carl Hamacher, Zvonko G Vranesic, Safwat G Zaky

Question Posted: