diff options
Diffstat (limited to 'src/boot/stage2_check_magic.asm')
-rw-r--r-- | src/boot/stage2_check_magic.asm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/boot/stage2_check_magic.asm b/src/boot/stage2_check_magic.asm index 1deaf05..7339a89 100644 --- a/src/boot/stage2_check_magic.asm +++ b/src/boot/stage2_check_magic.asm @@ -8,7 +8,7 @@ check_magic: push edi mov eax, NOF_LOAD_SECTORS ; number of 512-byte sectors shl eax, 9 ; 512 bytes per sector - mov edx, 0x8400 ; offset of kernel + mov edx, 0x8800 ; offset of kernel add edx, eax sub edx, MAGICLEN ; subtract the length of the magic string mov esi, edx ; now use edx as first string address to compare to @@ -20,12 +20,16 @@ check_magic: .ok: mov si, MAGIC_OK_MSG call pm_print_string + mov edx, esi + call pm_print_hex call pm_print_newline xor eax, eax jmp .end .mismatch: mov si, MAGIC_NOT_OK_MSG call pm_print_string + mov edx, esi + call pm_print_hex call pm_print_newline xor eax, eax mov eax, 1 @@ -42,7 +46,7 @@ db "ABAOS", %[MAGIC], 0 MAGICLEN equ $ - COMPARE_MAGIC MAGIC_NOT_OK_MSG: -db "Magic signature found", 0 +db "Magic signature found at ", 0 MAGIC_OK_MSG: -db "Magic signature not found!", 0 +db "Magic signature not found at ", 0 |