Presentation is loading. Please wait.

Presentation is loading. Please wait.

Announcements Homework #2 solutions in Blackboard

Similar presentations


Presentation on theme: "Announcements Homework #2 solutions in Blackboard"— Presentation transcript:

1 Announcements Homework #2 solutions in Blackboard
Homework #4 due Thursday, Oct 18, 4:30pm bring printout of solutions to Questions 1-4 submit Question 5 using “turnin” cannot be submitted late! Upcoming office hours: Tomorrow: Swati 6:30-7:30pm Thursday: Greg 11am-12pm 1 1 1

2 Homework #4 Questions #1 and 2 are based on last week's lectures (data movement and control operations) Question #3 is based on today's lecture Question #4 is based on Thursday's lecture Question #5 is based on today's lecture Do not underestimate this problem! 2 2 2

3 Schedule Last time: Control operations (5.4); Assembling an LC-3 program (7.3) Today: LC-3 input/output (8.1 – 8.4) Thursday: Subroutines & Traps (Ch. 9) 3 3 3

4

5 Homework #4 Question #5 The user can enter the “r”, “b”, or “g” key to choose red, blue, or green as the color Then they enter a number from 1-9 That many lines are drawn in the selected color Repeat! “q” means quit when getting the color, ignore anything illegal when getting the number, assume the input is legal 5 5 5

6 Approaching Question #5
Get the program to work such that: it detects that the user has entered “r” it draws a single red line it waits for the next letter Then, add detection of the other colors How will you represent which color to draw? Then, add the “number of lines” feature How will you draw more than one line? Then, add the “quit” functionality and handling of illegal keys 6 6 6


Download ppt "Announcements Homework #2 solutions in Blackboard"

Similar presentations


Ads by Google