LWOS Display
When display_io -> signal is true, the connected display device will draw the text stored in display_io -> data on the screen and reset display_io -> signal to false.
For example, suppose that at some time t, LWOS interrupted the display as follows:
- hostname: "computer_1"
- status: "idle"
- interrupts
- keyboard: false
- pressed_key: "k"
- shell
- user_input: "k"
- buffer: "> k"
- display_io
- data: "> k"
- signal: true
Then at time t + 1, the LWOS state is:
- hostname: "computer_1"
- status: "idle"
- interrupts
- keyboard: false
- pressed_key: "k"
- shell
- user_input: "k"
- buffer: "> k"
- display_io
- data: "> k"
- signal: false
Recall that LWOS set display_io -> signal to true to tell the display to write the text on the screen. Here, the display sets display_io -> signal to false. Then the next time LWOS wants to display something on the screen, it can set display_io -> signal to true again.
At this point, the shell is ready for more keyboard input. Note that state transitions happen very fast, so we usually don't have to worry about the next key press interfering with the display rendering process above.
Let's try displaying some text on the shell. Try clicking the prompt ( > ) inside SHELL_A of the LWOS simulator below and type some keys.
Please fill in the blank.
In the example above, the display changed display_io -> signal to _____
Comments
Please log in to add comments