Remove unnecessary segment register modification from modify_sector

This commit is contained in:
Juhani Krekelä 2023-03-18 15:49:18 +02:00
parent 9d3de7483e
commit c4ab75fc54
1 changed files with 2 additions and 8 deletions

View File

@ -187,13 +187,8 @@ read_sectors:
; di = 0x0100 for write, 0x0000 for read
modify_sector:
pusha
push ds
xor cx, cx
mov ds, cx
;mov cx, 18
mov cl, 18
mov cx, 18
div cx
; cl = sector (1…18)
@ -209,7 +204,7 @@ modify_sector:
mov ch, al
; dl = drive number
mov dl, [ds:boot_disk]
mov dl, [cs:boot_disk]
.retry:
mov ax, 0x0201 ; read/write one sector
@ -217,7 +212,6 @@ modify_sector:
int 0x13
jc .error
pop ds
popa
ret