/*----------------*\ |Nanite OS | |Copyright (C) 2026| |Xircon | \*----------------*/ // Architecture specific #include #include #include // stdlibs #include #include #include // Drivers #include #include #include #include #include #include #include #include // Core #include #include // Utilities #include #include #include // Other #include // Declarations extern uint8_t __bss_start; extern uint8_t __end; extern int uptime; int Memory; // Amount of Available RAM To OS uint16_t DEBUG_COM_PORT = COM1_PORT; void start() { // Print logo clrscr(); printf("%s", LOGO); printf("The Nano OS %s\n-------------------------------------\n", VERSION); // Init Drivers printf("Initializing Basic Drivers..."); // HAL HAL_Initialize(); // Register IRQs IRQ_RegisterHandler(0, Timer_Handler); IRQ_RegisterHandler(1, Keyboard_Handler); IRQ_RegisterHandler(4, COM1_Serial_Handler); IRQ_RegisterHandler(6, Floppy_Handler); IRQ_RegisterHandler(8, CMOS_RTC_Handler); // Other Stuff Serial_Init(DEBUG_COM_PORT, 9600); Keyboard_Init(); // Storage // Floppy_Init(); // This should always be last; its slow as fuck printf("Done!\n"); printf("Initializing Memory Paging..."); Memory = Detect_Memory(); Serial_Printf(DEBUG_COM_PORT, "MEMORY:> There is %dKB of Memory Available\n", Memory); Memory_Page_Init(); printf("Done!\n"); // Finish Up printf("The Current Time and Date Is: %d:%d:%d %d/%d/%d%d\n", BCD2BIN(Read_CMOS(CMOS_RTC_Hours)), BCD2BIN(Read_CMOS(CMOS_RTC_Minutes)), BCD2BIN(Read_CMOS(CMOS_RTC_Seconds)), BCD2BIN(Read_CMOS(CMOS_RTC_Month)), BCD2BIN(Read_CMOS(CMOS_RTC_Day)), BCD2BIN(Read_CMOS(CMOS_RTC_Century)), BCD2BIN(Read_CMOS(CMOS_RTC_Year))); // Beep! PCSP_Beep(); end: for (;;); }