From 31271229fce76281ae72f35d0036f5a9c0161eac Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 16 Jun 2017 14:54:43 +0200 Subject: better output where we found/didn't find the magic signature --- src/boot/stage2_check_magic.asm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/boot') 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: -- cgit v1.2.3-54-g00ecf