diff options
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/stage2_check_magic.asm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/boot/stage2_check_magic.asm b/src/boot/stage2_check_magic.asm index 479da26..9b9583e 100644 --- a/src/boot/stage2_check_magic.asm +++ b/src/boot/stage2_check_magic.asm @@ -1,6 +1,7 @@ ; check whether the end of the loaded image contains in fact the magic ; string (avoid truncation of image) check_magic: + push eax push ebx push ecx push edx @@ -18,16 +19,22 @@ check_magic: jne .ok jmp .mismatch .ok: + xor esi, esi mov si, MAGIC_OK_MSG call pm_print_string call pm_print_hex + shr edx, 16 + call pm_print_hex call pm_print_newline xor eax, eax jmp .end .mismatch: + xor esi, esi mov si, MAGIC_NOT_OK_MSG call pm_print_string call pm_print_hex + shr edx, 16 + call pm_print_hex call pm_print_newline xor eax, eax mov eax, 1 @@ -37,6 +44,7 @@ check_magic: pop edx pop ecx pop ebx + pop eax ret COMPARE_MAGIC: |