5 %include "../fat32/fat32-structs.s"
29 call read_cluster_chain
36 cmp byte [es:di], 0 ; end of root directory
38 cmp byte [es:di], 0xe5 ; unused entry
58 mov ax, [es:di+dir_entry.firstclushi]
60 mov ax, [es:di+(dir_entry.firstcluslo)]
64 call read_clus_chain_unreal ; load kernel
84 ; edi - address to load to
85 read_clus_chain_unreal:
106 movzx eax, word BPB_BytsPerSec
107 movzx bx, byte BPB_SecPerClus
125 ; ecx - bytes to copy
151 %include "../fat32/fat32.s"
167 kernel_name: db "KERNEL BIN"
168 begin: db "Nameless Bootloader revision ", GIT_REVISION, 0xd, 0xa, 0
169 a20_enabled: db "A20 has been enabled", 0xd, 0xa, "Searching for kernel...", 0xd, 0xa, 0
170 a20_fail: db "Failed to enable A20, giving up!", 0xd, 0xa, 0
171 crit_err: db "A critical error occurred, dumping registers now: ", 0xd, 0xa, 0
172 kernel_found: db "Found kernel at cluster ", 0
173 kernel_loading: db 0xd, 0xa, "Loading kernel...", 0xd, 0xa, 0
174 kernel_loaded: db "Kernel successfully loaded.", 0xd, 0xa, "Setting up kernel environment and running kernel...", 0xd, 0xa, 0
175 missing_kernel: db "Could not find KERNEL.BIN", 0xd, 0xa, 0
188 newline: db 0xd, 0xa, 0