Difference between revisions of "CSC231 Final Exam 2010"

From dftwiki3
Jump to: navigation, search
Line 86: Line 86:
 
The EFLAGS register  
 
The EFLAGS register  
  
Taken from http://www.eecg.toronto.edu/~amza/www.mindsec.com/files/x86regs.html: ''The EFLAGS register hold the state of the processor. It is modified by many intructions and is used for comparing some parameters, conditional loops and conditionnal jumps. Each bit holds the state of specific parameter of the last instruction. Here is a listing :
+
Taken from http://www.eecg.toronto.edu/~amza/www.mindsec.com/files/x86regs.html: ''The EFLAGS register hold the state of the processor. It is modified by many intructions and is used for comparing some parameters, conditional loops and conditionnal jumps. Each bit holds the state of specific parameter of the last instruction. Here is a listing :''
  
Bit  Label    Desciption
+
''Bit  Label    Desciption
---------------------------
+
---------------------------
 
  0      CF      Carry flag
 
  0      CF      Carry flag
 
  2      PF      Parity flag
 
  2      PF      Parity flag
Line 106: Line 106:
 
  19    VIF    Virutal interrupt flag
 
  19    VIF    Virutal interrupt flag
 
  20    VIP    Virtual interrupt pending flag
 
  20    VIP    Virtual interrupt pending flag
  21    ID      ID flag
+
  21    ID      ID flag''
  
Those that are not listed are reserved by Intel.''
+
''Those that are not listed are reserved by Intel.''
  
 +
You need to display only the Carry, Parity, Zero, and Sign bits.
 +
 +
Make sure that your function displays the status of the bits as they stand before the function is called, and make sure that whatever your function does, when it returns to the caller the status bits are in the same state they were before the function was called.
 +
 +
You will need the pushf and popf instructions.  Pushf pushes a doubleword containing the flags register in the stack.  Popf pops it back.
 +
 +
=Submission=
 +
 +
Submit only one program for all parts.  Call it final.asm, and submit it as follows:
 +
 +
submit final final.asm
  
  
 
</onlydft>
 
</onlydft>

Revision as of 12:41, 12 December 2010

This final exam is take-home. It is open-books, open-notes, and open-Web. It is due a week after it is made available, at 4:00 p.m. on TBA.

You cannot discuss the details of this exam with anyone except your instructor. The TAs are not allowed to help you out in any way. No question will be answered in person after 12:00 a.m. on 12/13/10. Instead, if you have questions regarding the exam, send them via email to thiebaut@cs.smith.edu, and the question and its answer will be broadcast back to the hole class via email. The exam is given under the rules of the Smith College Honor Code.

Make sure you reference all work/resources you use in your documentation.


...