Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "c99int.h"
- #define MAX_X 80
- #define MAX_Y 25
- static volatile char *const VGABUF = (volatile char*) 0xb8000;
- static void vga_write(const char *s, int8_t linea, uint8_t color){
- volatile char *buf = VGABUF;
- int pos_y = linea;
- if(linea < 0){
- pos_y = 80 + linea;
- }
- buf += pos_y*80*2;
- while(*s != 0){
- *buf++ = *s++;
- *buf++ = color;
- }
- }
- void comienzo(void) {
- vga_write("OK", 0, 47);
- vga_write("HOLA", 1, 224 );
- while (1)
- asm("hlt");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement