fix bug with skipping over sectors
This commit is contained in:
parent
23c6be10fa
commit
3de45fe1e5
5
boot.s
5
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
|
||||
|
|
Loading…
Reference in New Issue