summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-06-16 14:54:43 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-06-16 14:54:43 +0200
commit31271229fce76281ae72f35d0036f5a9c0161eac (patch)
tree71728ae6d34edc262503ae3c196c82939d645cb8 /src/boot
parentf98f70b2c27797adeaec7215d46164e0edc03b65 (diff)
downloadabaos-31271229fce76281ae72f35d0036f5a9c0161eac.tar.gz
abaos-31271229fce76281ae72f35d0036f5a9c0161eac.tar.bz2
better output where we found/didn't find the magic signature
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/stage2_check_magic.asm8
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: