Advertisement
captmicro

os print string reoutine

Dec 29th, 2012
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #define ROMAREA                 0x000A0000
  2. #define VGA_FRAMEBUFFER         (ROMAREA + 0x00000000)
  3. #define VGA_TEXTMONOCHROME      (ROMAREA + 0x00010000)
  4. #define VGA_TEXTCOLOR           (ROMAREA + 0x00018000)
  5.  
  6. KFUNC void kvideo_putchr(uint16 x, uint16 y, char c, uint8 col)
  7. {
  8.     if (c == '\n' || c == '\r' || c == '\0') return;
  9.    
  10.     uint16 *vptr = (uint16*)VGA_TEXTCOLOR;
  11.     *(vptr + x + (y * 80)) = (col << 8) | c;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement