midterm - CS 220: Computer Systems II: Architecture and...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 220: Computer Systems II: Architecture and Programming Fall 2009 - Section A0 Midterm Exam - 2009/10/28 Name: ______________________________ ================================================================================ 1: Circle which of the flags (it can be any number of them) listed under each set of numbers will be set (to 1) after each pair of numbers is computed using 16-bit addition/subtraction (the flags names are short for "Overflow" (OF), "Carry" (CF), "Sign" (SF) and "Zero" (ZF)): 0x4000 0x0000 0xC000 0xC000 0x8008 + 0x4000 - 0x0001 - 0x8000 + 0xC000 - 0x8008 -------- -------- -------- -------- -------- OF CF OF CF OF CF OF CF OF CF SF ZF SF ZF SF ZF SF ZF SF ZF ================================================================================ 2: Circle which one (1) of the following would be the value of %ch if the following code is executed (assume var1 is defined as ".int" elsewhere): ========================= movl $0x1234567, %eax movl %eax, var1 movw var1, %cx ========================= a) 0x12 b) 0x34 c) 0x56 d) 0x07 e) 0x01 f) 0x23 g) 0x45 h) 0x67 i) 0x21 j) 0x43 k) 0x65 l) 0x70 m) 0x10 n) 0x32 o) 0x54 p) 0x76 ================================================================================ 3: Convert each of the following 8-bit signed numbers to decimal: 0xF8 0x40 0x66 0x80 0xC0 ================================================================================ 4: Circle which one (1) of the following is the register which GCC uses to point to the stack (the Stack Pointer): a) eax b) ebx c) ecx d) edx
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
e) ebp f) esp g) edi h) esi ================================================================================ 5: Circle which flags (it can be any number of them) listed under each
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/20/2010 for the course CS 220 taught by Professor Greene during the Spring '08 term at Binghamton University.

Page1 / 5

midterm - CS 220: Computer Systems II: Architecture and...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online