explain div weirdness
This commit is contained in:
1 parent
108040ae01
commit
1bad40143e
1 file changed
+1
-1
@@ -59,7 +59,7 @@ bits 16
|
||||
setne cl ; sector - 1 = LBA % (sectors per track)
|
||||
inc cl
|
||||
xor ah, ah ; zero-extend temp
|
||||
xor dx, dx ; TODO: explain why this is needed for div
|
||||
xor dx, dx ; div by 16-bit register divides dx:ax, so we zero dx
|
||||
div bx ; ah = mod (head), al = div (cylinder)
|
||||
|
||||
mov dh, ah ; head
|
||||
|
||||
Reference in new issue
Block a user