2020-03-12 17:23:40 -05:00
|
|
|
# vga
|
|
|
|
This crate provides vga specific functions, data structures,
|
|
|
|
and access to various registers.
|
|
|
|
|
|
|
|
Memory addresses `0xA0000 -> 0xBFFFF` must be readable and writeable
|
|
|
|
this crate to work properly.
|
2020-03-12 17:40:53 -05:00
|
|
|
|
2020-03-16 19:07:44 -05:00
|
|
|
**Note: This crate is currently experimental and subject to change since it's in active development.**
|
|
|
|
|
2020-03-12 17:40:53 -05:00
|
|
|
## Usage
|
|
|
|
```rust
|
2020-03-16 19:07:44 -05:00
|
|
|
use vga::colors::Color16Bit;
|
|
|
|
use vga::writers::{ScreenCharacter, TextWriter, Text80x25};
|
2020-03-12 17:40:53 -05:00
|
|
|
|
|
|
|
let text_mode = Text80x25::new();
|
2020-03-16 19:07:44 -05:00
|
|
|
let screen_character = ScreenCharacter::new(b'T'Color16Bit::Yellow, Color16Bit::Black);
|
2020-03-12 17:40:53 -05:00
|
|
|
|
|
|
|
text_mode.set_mode();
|
|
|
|
text_mode.clear_screen();
|
2020-03-16 19:07:44 -05:00
|
|
|
text_mode.write_character(0, 0, screen_character);
|
2020-03-12 17:40:53 -05:00
|
|
|
```
|