Difference between revisions of "CSC270 Final Exam 2011"

From dftwiki3
Jump to: navigation, search
Line 80: Line 80:
 
* When we want to set the output signal low, we execute this code:
 
* When we want to set the output signal low, we execute this code:
  
LDAA #00 ; set the output signal low
+
LDAA #00 ; set the output signal low
STAA 9000
+
STAA 9000
  
 
===An input port===
 
===An input port===
Line 89: Line 89:
 
* Our program would need to initialize the port as an input port first:
 
* Our program would need to initialize the port as an input port first:
  
LDAA #00 ; set output port in input mode
+
LDAA #00 ; set output port in input mode
STAA 8000 ; set port as an input port
+
STAA 8000 ; set port as an input port
  
 
* When we want to read the value of the data bit sent by the peripheral, we can execute this:
 
* When we want to read the value of the data bit sent by the peripheral, we can execute this:
  
LDAA 9000 ; get data from port
+
LDAA 9000 ; get data from port
ANDA #01 ; clear all bits except LSB
+
ANDA #01 ; clear all bits except LSB
  
 
:Now the bit that is coming from the peripheral is in the Least-Significant bit of Acca.
 
:Now the bit that is coming from the peripheral is in the Least-Significant bit of Acca.

Revision as of 16:48, 25 April 2011

--D. Thiebaut 10:24, 13 April 2011 (EDT)


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 Wed. May 4, 2011.

You cannot discuss the details of this exam with anyone except your instructor. No question will be answered in person after 2:30 a.m. on 4/29/11. Instead, if you have questions regarding the exam, you are to 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 to answer the questions below.



...