#include #include "vga.h" #include "serial.h" #include "console.h" void entry( void ) { serial_t serial; serial_init( &serial ); vga_t vga; vga_init( &vga ); console_t console; console_init( &console ); console_add_vga_output( &console, &vga ); console_add_serial_output( &console, &serial ); vga_set_color( &vga, VGA_COLOR_LIGHT_GREY ); vga_set_background_color( &vga, VGA_COLOR_BLACK ); console_put_string( &console, "Initializing hardware" ); const char bar[] = "\\|/-"; int y_pos = vga_get_cursor_y( &vga ); int x_pos = vga_get_cursor_x( &vga ); int i = 0; for( i = 0; i < 10000; i++ ) { if( i % 1000 == 0 ) { vga_put_char_at( &vga, x_pos, y_pos, '.' ); x_pos++; serial_put_char( &serial, '.' ); } vga_put_char_at( &vga, x_pos, y_pos, bar[i%4] ); for( int j = 0; j < 150; j++ ) { } } vga_put_char_at( &vga, x_pos, y_pos, '.' ); serial_put_char( &serial, '.' ); console_put_newline( &console ); console_put_string( &console, "Terminating" ); console_put_newline( &console ); //~ vga_set_color( &vga, VGA_COLOR_WHITE ); //~ vga_set_background_color( &vga, VGA_COLOR_RED ); //~ vga_clear_screen( &vga ); //~ for( int i = 0; i < 50; i++ ) { //~ for( int j = 0; j < i; j++ ) { //~ vga_put_char( &vga, '-' ); //~ } //~ vga_put_char( &vga, '>' ); //~ vga_put_string( &vga, (const char *)"TEST TEST TEST" ); //~ vga_put_newline( &vga ); //~ } //~ for( int j = 0; j < 50; j++ ) { //~ vga_put_char( &vga, '-' ); //~ } //~ vga_put_char( &vga, '>' ); //~ vga_put_string( &vga, (const char *)"TEST TEST TEST" ); }