Guest User

Untitled

a guest
Jun 26th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <stdint.h>
  2.  
  3. #include <multiboot.hpp>
  4.  
  5. #include <driver/video.hpp>
  6. #include <driver/serial.hpp>
  7.  
  8. extern "C" void init(multiboot::Structure const & data)
  9. {
  10.     SerialPort serial(SERIAL_COM1);
  11.  
  12.     serial.write('H');
  13.     serial.write('i');
  14.     serial.write('\n');
  15.    
  16.     VideoScreen video(*data.vbe.modeInfo);
  17.     for(uint32_t y = 0; y < video.height(); y++)
  18.     {
  19.         for(uint32_t x = 0; x < video.width(); x++)
  20.         {
  21.             video(x,y) = COLOR(255, 0, 0);
  22.         }
  23.     }
  24.    
  25.     while(true);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment