diff --git a/boot/chs.inc b/boot/chs.inc index 53c5c4b..1cceb56 100644 --- a/boot/chs.inc +++ b/boot/chs.inc @@ -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