diff --git a/boot.s b/boot.s index 77d02aa..86fe87c 100644 --- a/boot.s +++ b/boot.s @@ -223,7 +223,7 @@ digit_loop: incw %cs:_sector_num+1 read_sector: _sector_num: - movw $1, %ax # sector num + movw $0, %ax # sector num (0indexed) movb $18, %ch # divide by 18 (sectors / track) div %ch # %ah - sector @@ -233,8 +233,9 @@ _sector_num: and %al, %dh sar $1, %al - mov %al, %ch # track + mov %al, %ch # track mov %ah, %cl # sector + inc %cl # sectors are 1indexed mov $1, %al # read only one sector xor %bx, %bx # write to es:bx