From f8dd9dd71ab603af23e008f1147f652b429c9296 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 15 Jun 2017 21:24:36 +0200 Subject: increased size of stage 2 bootloader by 1024 bytes --- src/boot/stage1_functions.asm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/boot/stage1_functions.asm') diff --git a/src/boot/stage1_functions.asm b/src/boot/stage1_functions.asm index bdb2aac..f1d229b 100644 --- a/src/boot/stage1_functions.asm +++ b/src/boot/stage1_functions.asm @@ -1,3 +1,6 @@ +; NOF_SECTORS_STAGE2 +NOF_SECTORS_STAGE2 equ 5 + ; IN dx: hex value to print print_hex: push bx @@ -88,7 +91,7 @@ current_row: read_stage2_from_disk: mov ah, 0x02 ; read sectors from drive - mov al, 3 ; read 3 sectors of stage 2 + mov al, NOF_SECTORS_STAGE2 ; read sectors of stage 2 mov ch, 0 ; select first cylinder mov dh, 0 ; first head mov cl, 2 ; second sector after boot sector @@ -101,7 +104,7 @@ read_stage2_from_disk: jc .read_error - cmp al, 3 ; 3 sectors read? + cmp al, NOF_SECTORS_STAGE2 ; correct number of sectors read? jne .short_read ; if not, short read ret -- cgit v1.2.3-54-g00ecf