vga.h 488 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #ifndef _KERNEL_VGA_H_
  3. #define _KERNEL_VGA_H_
  4. #include <types/stdint.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #define VGA_CHAR_COLOR_WHITE (0x0fU)
  9. struct vga_char {
  10. int8_t c;
  11. uint8_t color;
  12. };
  13. #define VGA_MEM ((struct vga_char*)0xb8000)
  14. #define VGA_SCREEN_WIDTH_IN_CHARS (80U)
  15. #define VGA_SCREEN_HEIGHT_IN_CHARS (25U)
  16. void vga_put_char(struct vga_char* c);
  17. void vga_print(const char* str, uint8_t color);
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21. #endif // _KERNEL_VGA_H_