10.07.2015 Views

Instruction Sets

Instruction Sets

Instruction Sets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

88 CHAPTER 2 <strong>Instruction</strong> <strong>Sets</strong>Q2-10 Write ARM assembly language code for the following loops:a. for (i = 0; i < 20; i++)z[i] = a[i]*b[i];b. for (i = 0; i < 10; i++)for (j = 0; j < 10; j++)z[i] = a[i,j] * b[i]Q2-11 Explain the operation of the BL instruction, including the state of ARMregisters before and after its operation.Q2-12 How do you return from an ARM procedure?Q2-13 In the following code, show the contents of the ARM function call stackjust after each C function has been entered and just after the functionexits. Assume that the function call stack is empty when main( ) begins.int foo(int x1, int x2) {return x1 + x2;}int baz(int x1) {return x1 + 1;}void scum(int r) {for (i = 0; i = 2; i++)foo(r + i,5);}main() {scum(3);baz(2);}Q2-14 What data types does the C55x support?Q2-15 How many accumulators does the C55x have?Q2-16 What C55x register holds arithmetic and bit manipulation flags?Q2-17 What is a block repeat in the C55x?Q2-18 How are the C55x data and program memory arranged in the physicalmemory?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!