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)]
63 call read_clus_chain_unreal ; load kernel
82 ; edi - address to load to
83 read_clus_chain_unreal:
104 movzx eax, word BPB_BytsPerSec
105 movzx bx, byte BPB_SecPerClus
123 ; ecx - bytes to copy
149 %include "../fat32/fat32.s"
165 kernel_name: db "KERNEL BIN"
166 string: db "Hello from LOADER.BIN!", 0xd, 0xa, 0
167 a20_enabled: db "A20 is enabled", 0xd, 0xa, 0
168 a20_fail: db "Failed to enable A20, giving up!", 0xd, 0xa, 0
169 crit_err: db "A critical error occurred, dumping registers now: ", 0xd, 0xa, 0
170 kernel_found: db "Found kernel at cluster ", 0
171 missing_kernel: db "Could not find KERNEL.BIN", 0xd, 0xa, 0
184 newline: db 0xd, 0xa, 0