OSlings Practice 45k-47k, Problem 1: Console Input¶
OSlings Practice 45k-47k, problem 1 of 3 · Length: 5:43 · Exercise: 45k_console (Week 12) · Problems: 45k-47k (PDF) · Answer key: Solutions (PDF)
Two parts, worked on the set's pages 1 and 2: (a) one call to intr() with h and i both waiting in the UART, in a table: with the while let loop and with an if let instead, how many times the loop body runs, what lands in BUF[0] and BUF[1], the TAIL value and the bytes left in the UART; then why the loop stops, and how the i gets in with if let; (b) what happens after a key is pressed when intr never reads the UART, and why. The answer key's handwriting is written onto the page as each step is worked.
Download the video (MP4, 10 MB) · Captions (WebVTT) · All three problems