summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-06-05 19:32:00 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-06-05 19:32:00 +0200
commitaa85f2aaf27d79af277867fc7ca4168f1bb117c0 (patch)
treecb62d0dc342cfc56e67d00a571fe2480463b0402
parent0b5fe16e54276330f0f36fd27b6b3899f49f764f (diff)
downloadabaos-aa85f2aaf27d79af277867fc7ca4168f1bb117c0.tar.gz
abaos-aa85f2aaf27d79af277867fc7ca4168f1bb117c0.tar.bz2
some cleanup in boot loader code and changed order of A20 gate methods
-rw-r--r--src/boot.asm5
-rw-r--r--src/stage2_a20.asm20
2 files changed, 11 insertions, 14 deletions
diff --git a/src/boot.asm b/src/boot.asm
index ac3dad7..8dbbb8a 100644
--- a/src/boot.asm
+++ b/src/boot.asm
@@ -75,10 +75,7 @@ times 510-($-$$) db 0
dw 0xaa55
stage2:
- nop
- nop
- nop
-
+
; print a message that we are indeed in stage 2 now
mov si, MESSAGE_STAGE_2_LOADED
call print_string
diff --git a/src/stage2_a20.asm b/src/stage2_a20.asm
index 50f82a6..c0951ad 100644
--- a/src/stage2_a20.asm
+++ b/src/stage2_a20.asm
@@ -62,16 +62,6 @@ check_and_enable_A20:
cmp ax, 1
je A20_ENABLED
-A20_ENABLE_VIA_BIOS:
- mov al, 'B'
- call print_char
- mov ax, 0x2401
- int 0x15
-
- call check_A20_enabled
- cmp ax, 1
- je A20_ENABLED
-
A20_ENABLE_KBD_PORT:
mov al, 'K'
call print_char
@@ -152,6 +142,16 @@ A20_FAST_SPECIAL_PORT:
cmp ax, 1
je A20_ENABLED
ret
+
+A20_ENABLE_VIA_BIOS:
+ mov al, 'B'
+ call print_char
+ mov ax, 0x2401
+ int 0x15
+
+ call check_A20_enabled
+ cmp ax, 1
+ je A20_ENABLED
A20_ENABLED:
ret