Optimize fix_chs code

This commit is contained in:
Nero 2019-06-24 17:05:57 +00:00
parent 75ebf6dfd9
commit 6b424844e9
1 changed files with 4 additions and 4 deletions

View File

@ -4,10 +4,10 @@ fix_chs:
jc chs_end ; skip if function does not exist
inc dh
mov [cs:fdc.nos], dh
mov ax, cx
and ax, 0x003F
mov [cs:fdc.spt], ax ; no adjustment because sectors are 1-indexed
mov ax, cx
push cx
and cx, 0x003F
mov [cs:fdc.spt], cx ; no adjustment because sectors are 1-indexed
pop ax
xchg al, ah
mov cl,6
shr ah,cl