#include #include "vga.h" #include "fat.h" #include "fs.h" #include "ata.h" #include "panic.h" #include "serial.h" #include "util.h" uint8_t nbuf[11]; void main() { vga_blank(); vga_printsz("Initializing drivers..."); sinit(); vga_printsz("\n Serial ready."); load_fat(); clear_fs_handles(); vga_printsz("\n File system ready.\n\nDisk label: "); vga_printsn(FAT_INFO->label, 11); vga_printsz("\nDisk size: "); u32_dec(FAT_INFO->sectors >> 1, nbuf); vga_printsz(nbuf); vga_printsz("k\n\nFAT start:\n"); nbuf[3] = 0; for (uint8_t r = 0; r < 192; r += 24) { for (uint8_t c = 0; c < 24; ++c) { u8_hex(*(uint8_t *)(FAT + r + c), nbuf); nbuf[2] = ' '; vga_printsz(nbuf); } vga_printch('\n'); } while (1) asm ("hlt"); }