getchar() / putchar() (Part 3)
The 1-character buffer gives us some time to read/write
Extend the 1-character buffers to 32 characters buffers
- now we can go away for a long time and not miss incoming characters
- we can write out lots of characters and not wait for them all to go
Each buffer now becomes a queue
- standard circular queue
- 33 character vector (why 33?)
- head, tail pointers
- initialize on startup
getchar()
- interrupt routine writes characters to buffer, getchar() reads
putchar()
- putchar() writes characters to buffer, getchar() reads