Remove unnecessary segment register modification from modify_sector
This commit is contained in:
parent
9d3de7483e
commit
c4ab75fc54
10
ponydos.asm
10
ponydos.asm
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue