Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint16_t encode_color(uint16_t color, char ch) {
- return (uint16_t)(color << 8) | (uint16_t)ch;
- }
- void kernel_main() {
- volatile uint16_t * out = (uint16_t* )0xb8000;
- char *hi = "hello world";
- for (uint16_t i = 0; hi[i] != '\0'; i++) {
- out[i] = encode_color(3, hi[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement