5 %include "../fat32/fat32-structs.s"
14 extern __STACK_BOTTOM__
18 mov sp, __STACK_BOTTOM__
33 call read_cluster_chain
40 cmp byte [es:di], 0 ; end of root directory
42 cmp byte [es:di], 0xe5 ; unused entry
62 mov ax, [es:di+dir_entry.firstclushi]
64 mov ax, [es:di+(dir_entry.firstcluslo)]
68 call read_clus_chain_unreal ; load kernel
90 ; edi - address to load to
91 read_clus_chain_unreal:
112 movzx eax, word BPB_BytsPerSec
113 movzx bx, byte BPB_SecPerClus
131 ; ecx - bytes to copy
156 %include "../fat32/fat32.s"
171 call load_paging_structs
181 kernel_name: db "KERNEL BIN"
182 begin: db "Nameless Bootloader revision ", GIT_REVISION, 0xd, 0xa, 0
183 a20_enabled: db "A20 has been enabled", 0xd, 0xa, "Searching for kernel...", 0xd, 0xa, 0
184 a20_fail: db "Failed to enable A20, giving up!", 0xd, 0xa, 0
185 crit_err: db "A critical error occurred, dumping registers now: ", 0xd, 0xa, 0
186 kernel_found: db "Found kernel at cluster ", 0
187 kernel_loading: db 0xd, 0xa, "Loading kernel...", 0xd, 0xa, 0
188 kernel_loaded: db "Kernel successfully loaded.", 0xd, 0xa, "Setting up kernel environment and running kernel...", 0xd, 0xa, 0
189 missing_kernel: db "Could not find KERNEL.BIN", 0xd, 0xa, 0
202 newline: db 0xd, 0xa, 0