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
|
; di = 0x0100 for write, 0x0000 for read
|
||||||
modify_sector:
|
modify_sector:
|
||||||
pusha
|
pusha
|
||||||
push ds
|
|
||||||
|
|
||||||
xor cx, cx
|
mov cx, 18
|
||||||
mov ds, cx
|
|
||||||
|
|
||||||
;mov cx, 18
|
|
||||||
mov cl, 18
|
|
||||||
div cx
|
div cx
|
||||||
|
|
||||||
; cl = sector (1…18)
|
; cl = sector (1…18)
|
||||||
|
@ -209,7 +204,7 @@ modify_sector:
|
||||||
mov ch, al
|
mov ch, al
|
||||||
|
|
||||||
; dl = drive number
|
; dl = drive number
|
||||||
mov dl, [ds:boot_disk]
|
mov dl, [cs:boot_disk]
|
||||||
|
|
||||||
.retry:
|
.retry:
|
||||||
mov ax, 0x0201 ; read/write one sector
|
mov ax, 0x0201 ; read/write one sector
|
||||||
|
@ -217,7 +212,6 @@ modify_sector:
|
||||||
int 0x13
|
int 0x13
|
||||||
jc .error
|
jc .error
|
||||||
|
|
||||||
pop ds
|
|
||||||
popa
|
popa
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue