summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-06-16 14:53:46 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-06-16 14:53:46 +0200
commit82eb88e1b48f290680e939bf5597c4b4c494d74f (patch)
treed09f061250bc13bd09ff345779a4ba777011b7b9 /src/boot
parent071a6d2c84d8c8a3557ab038b5795f4401f20838 (diff)
downloadabaos-82eb88e1b48f290680e939bf5597c4b4c494d74f.tar.gz
abaos-82eb88e1b48f290680e939bf5597c4b4c494d74f.tar.bz2
paranoia, copy BOOT_DRIVE to every call to read sector
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/stage2_real_functions.asm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/boot/stage2_real_functions.asm b/src/boot/stage2_real_functions.asm
index 3810963..01584c9 100644
--- a/src/boot/stage2_real_functions.asm
+++ b/src/boot/stage2_real_functions.asm
@@ -1,7 +1,7 @@
; number of sectors to be read for the kernel itself
; (note: the first sector gets loaded by the BIOS, the
; next 5 sectors are read by the simple stage 1 loader,
-; so subtract 5 here!)
+; so subtract 6 here!)
NOF_LOAD_SECTORS equ 46
; data sections used for reading the kernel from disk
@@ -140,6 +140,7 @@ read_one_sector_from_disk:
mov al, 1 ; read 1 sector
mov ch, BYTE [CURRENT_CYLINDER]
mov dh, BYTE [CURRENT_HEAD]
+ mov dl, BYTE [BOOT_DRIVE]
mov cl, BYTE [CURRENT_SECTOR]
int 0x13