7 %include "../fat32/fat32-structs.s"
16 extern __STACK_BOTTOM__
20 mov sp, __STACK_BOTTOM__
35 call read_cluster_chain
42 cmp byte [es:di], 0 ; end of root directory
44 cmp byte [es:di], 0xe5 ; unused entry
64 mov eax, [es:di+dir_entry.filesize]
65 mov [KERNEL_SIZE], eax
66 mov ax, [es:di+dir_entry.firstclushi]
68 mov ax, [es:di+dir_entry.firstcluslo]
72 call read_clus_chain_unreal ; load kernel
99 ; edi - address to load to
100 read_clus_chain_unreal:
121 movzx eax, word BPB_BytsPerSec
122 movzx bx, byte BPB_SecPerClus
140 ; ecx - bytes to copy
165 %include "../fat32/fat32.s"
180 push dword [KERNEL_SIZE]
191 kernel_name: db "KERNEL ELF"
192 begin: db "Nameless Bootloader revision ", GIT_REVISION, 0xd, 0xa, 0
193 a20_enabled: db "A20 has been enabled", 0xd, 0xa, "Searching for kernel...", 0xd, 0xa, 0
194 a20_fail: db "Failed to enable A20, giving up!", 0xd, 0xa, 0
195 crit_err: db "A critical error occurred, dumping registers now: ", 0xd, 0xa, 0
196 kernel_found: db "Found kernel at cluster ", 0
197 kernel_loading: db 0xd, 0xa, "Loading kernel...", 0xd, 0xa, 0
198 kernel_loaded: db "Kernel successfully loaded.", 0xd, 0xa, "Setting up kernel environment and running kernel...", 0xd, 0xa, 0
199 missing_kernel: db "Could not find KERNEL.ELF", 0xd, 0xa, 0
212 newline: db 0xd, 0xa, 0