flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
me239 29 May 2011, 06:13
Ok, this may sound crazy, but I just really wanted to know If I'm the only one who sees this. Here is the code\equation I've seen on http://www.brokenthorn.com/Resources/OSDev6.html
It says that "absolute sector = (logical sector / sectors per track) + 1", but the code goes as Code: LBACHS: xor dx, dx ; prepare dx:ax for operation div WORD [bpbSectorsPerTrack] ; divide by sectors per track inc dl ; add 1 (obsolute sector formula) mov BYTE [absoluteSector], dl Isn't this code MODing the sectorspertrack rather than just dividing? |
|||
![]() |
|
sinsi 29 May 2011, 08:19
If they used AL then the mod result would apply but they are using DL which is the remainder of the div.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.