From 82eb88e1b48f290680e939bf5597c4b4c494d74f Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 16 Jun 2017 14:53:46 +0200 Subject: paranoia, copy BOOT_DRIVE to every call to read sector --- src/boot/stage2_real_functions.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/boot') 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 -- cgit v1.2.3-54-g00ecf