5 %include "../fat32/fat32-structs.s"
27 call read_cluster_chain
34 cmp byte [es:di], 0 ; end of root directory
36 cmp byte [es:di], 0xe5 ; unused entry
55 mov ax, [es:di+dir_entry.firstclushi]
57 mov ax, [es:di+(dir_entry.firstcluslo)]
59 call read_clus_chain_unreal ; load kernel
78 ; edi - address to load to
79 read_clus_chain_unreal:
100 movzx eax, word BPB_BytsPerSec
101 movzx bx, byte BPB_SecPerClus
119 ; ecx - bytes to copy
145 %include "../fat32/fat32.s"
161 kernel_name: db "KERNEL BIN"
162 a20_fail: db "Failed to enable A20, giving up!", 0xd, 0xa, 0
163 crit_err: db "A critical error occurred, dumping registers now: ", 0xd, 0xa, 0
164 missing_kernel: db "Could not find KERNEL.BIN", 0xd, 0xa, 0
177 newline: db 0xd, 0xa, 0