Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Library to program vga hardware.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

rust-osdev/vga

Repository files navigation

Build StatusDocs.rs Badge

vga

This crate provides vga specific functions, data structures,and access to various registers.

Memory addresses0xA0000 -> 0xBFFFF must be readable and writeablethis crate to work properly.

Note: This crate is currently experimental and subject to change since it's in active development.

Text Mode

use vga::colors::{Color16,TextModeColor};use vga::writers::{ScreenCharacter,TextWriter,Text80x25};let text_mode =Text80x25::new();let color =TextModeColor::new(Color16::Yellow,Color16::Black);let screen_character =ScreenCharacter::new(b'T', color);text_mode.set_mode();text_mode.clear_screen();text_mode.write_character(0,0, screen_character);

Graphics Mode

use vga::colors::Color16;use vga::writers::{Graphics640x480x16,GraphicsWriter};let mode =Graphics640x480x16::new();mode.set_mode();mode.clear_screen(Color16::Black);mode.draw_line((80,60),(80,420),Color16::White);mode.draw_line((80,60),(540,60),Color16::White);mode.draw_line((80,420),(540,420),Color16::White);mode.draw_line((540,420),(540,60),Color16::White);mode.draw_line((80,90),(540,90),Color16::White);for(offset, character)in"Hello World!".chars().enumerate(){    mode.draw_character(270 + offset*8,72, character,Color16::White)}

About

Library to program vga hardware.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors8

Languages


[8]ページ先頭

©2009-2025 Movatter.jp