From ebf106dcc4b3aa920d05514135d8cc55be6335e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Thu, 23 Mar 2023 00:07:12 +0200 Subject: [PATCH] Don't depend on dx being 0 in modify_sector --- ponydos.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ponydos.asm b/ponydos.asm index 6cf64ff..d58a2d4 100644 --- a/ponydos.asm +++ b/ponydos.asm @@ -283,11 +283,11 @@ modify_sectors: modify_sector: pusha - mov cx, 18 - div cx + mov cl, 18 + div cl ; cl = sector (1…18) - mov cl, dl + mov cl, ah inc cl ; dh = head (0…1) @@ -295,7 +295,7 @@ modify_sector: and dh, al ; ch = cylinder - shr ax, 1 + shr al, 1 mov ch, al ; dl = drive number