



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Name __________________________ Section _______________________________
Student No. _____________________
Closed Books, Closed Notes, No computers or calculators.
Having read the Georgia Institute of Technology Academic Honor Code, I understand and accept my responsibility as a member of the Georgia Tech Community to uphold the Honor Code at all times. In addition, I understand my options for reporting honor violations as detailed in the code.
(Signature) (Date)
0
1
Fill in the truth table for this circuit on the answer sheet. Do not leave any values for F blank!
SEVENSEG: EQU &H01 ; I/O write here for 7-segment display TIMER: EQU &H02 ; I/O access to timer IR_Detector: EQU &H04 ; I/O read here for detector (ircomm) ORG 0 .
. (other code – just assume it is OK) . LOAD ZERO STORE IRNUM IRloop: LOAD IRNUM ValidIR: OUT IR_Detector OUT SEVENSEG OUT TIMER ScanIR: IN TIMER SUB IRWAIT JNEG ScanIR IN IR_Detector JZERO NextDetector OUT TIMER DisplayIR: IN TIMER SUB DISPWAIT JNEG DisplayIR NextDetector: LOAD IRNUM ADDI &H STORE IRNUM SUB EIGHT JZERO ResetIRcount JUMP IRloop ResetIRcount: STORE IRNUM JUMP IRloop ; Data memory ZERO: DW &H EIGHT: DW &H IRNUM: DW 0 IRWAIT: DW 03 DISPWAIT: DW 10
Which of the statements below are true statements about what the code does or about what is wrong with this code? (Select all that apply.) a) The ORG statement is wrong, because it has to have a hexadecimal operand. b) The data memory is located wrong, because variables have to be placed at the top of the ASM file. c) It displays the sensed IR code byte on the seven segment display. d) It waits about three seconds for a detector to sense something. e) It sequentially scans all eight detectors and repeats this over and over. f) If a nonzero IR code byte is detected, it breaks out of the timer loop immediately. g) It includes commands to drive the robot forward. h) It includes commands to turn off the mine by emitting the twos complement. i) It includes commands to read sonar values. j) It pauses the scanning process for a brief interval when a nonzero IR code byte is detected.