Added example to README.md
This commit is contained in:
parent
685bdfcbfc
commit
609d9f07c8
13
README.md
13
README.md
|
@ -4,3 +4,16 @@ and access to various registers.
|
||||||
|
|
||||||
Memory addresses `0xA0000 -> 0xBFFFF` must be readable and writeable
|
Memory addresses `0xA0000 -> 0xBFFFF` must be readable and writeable
|
||||||
this crate to work properly.
|
this crate to work properly.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```rust
|
||||||
|
use vga::colors::{Color16Bit, TextModeColor};
|
||||||
|
use vga::Text80x25;
|
||||||
|
|
||||||
|
let text_mode = Text80x25::new();
|
||||||
|
let color = TextModeColor::new(Color16Bit::Yellow, Color16Bit::Black);
|
||||||
|
|
||||||
|
text_mode.set_mode();
|
||||||
|
text_mode.clear_screen();
|
||||||
|
text_mode.write_character(0, 0, b'H', color);
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue