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
86 ; edi - address to load to
87 read_clus_chain_unreal:
108 movzx eax, word BPB_BytsPerSec
109 movzx bx, byte BPB_SecPerClus
127 ; ecx - bytes to copy
153 %include "../fat32/fat32.s"
167 call load_paging_structs
174 kernel_name: db "KERNEL BIN"
175 begin: db "Nameless Bootloader revision ", GIT_REVISION, 0xd, 0xa, 0
176 a20_enabled: db "A20 has been enabled", 0xd, 0xa, "Searching for kernel...", 0xd, 0xa, 0
177 a20_fail: db "Failed to enable A20, giving up!", 0xd, 0xa, 0
178 crit_err: db "A critical error occurred, dumping registers now: ", 0xd, 0xa, 0
179 kernel_found: db "Found kernel at cluster ", 0
180 kernel_loading: db 0xd, 0xa, "Loading kernel...", 0xd, 0xa, 0
181 kernel_loaded: db "Kernel successfully loaded.", 0xd, 0xa, "Setting up kernel environment and running kernel...", 0xd, 0xa, 0
182 missing_kernel: db "Could not find KERNEL.BIN", 0xd, 0xa, 0
195 newline: db 0xd, 0xa, 0