summaryrefslogtreecommitdiff
path: root/src/boot/stage1_functions.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/stage1_functions.asm')
-rw-r--r--src/boot/stage1_functions.asm7
1 files changed, 5 insertions, 2 deletions
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