Vous êtes sur la page 1sur 1

CMSC 216

Assembly I Worksheet

Fall 2012

1. What is the dierence between the following two instructions assuming age is a label? irmovl age, %eax mrmovl age, %eax

2. How do you dene global variables in Assembly? 3. What is largest address we can have in the Assembly language we are using? 4. Is the following instruction valid? Briey explain. addl $20, %eax

5. Describe what takes place when the call instruction is executed. 6. Describe what takes place when the ret instruction is executed. 7. Why do we use .align 4? Could you use .align 8? Does .align aects the size of integer values? 8. Write Assembly code that corresponds to the following C program. #include <stdio.h> int a = 0x23; int b = 0x17; int main() { printf("%d %d\n", a, b); while (a - b > 0) { printf("%d\n", b); b++; } return 0; }

Vous aimerez peut-être aussi