Changeset 589 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools
- Timestamp:
- May 22, 2016, 12:26:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
r568 r589 174 174 ; +=sectToSeek-1 (24-bit result) 175 175 ; Max = 16,450,497 + 63 - 1 = 16,450,559 = FB03FFh 176 xor bh, bh ; Sector number now in BX176 mov bh, ch ; Sector number now in BX, CH=zero 177 177 dec bx ; sectToSeek-=1 178 add ax, bx ; Add to loword 179 adc dl, bh ; Add possible carry to byte2, BH=zero 180 181 ; Copy DX:AX to proper return registers 182 xchg bx, ax ; BL = Sector Number Register (LBA 7...0) 183 mov cl, bh ; Low Cylinder Register (LBA 15...8) 184 mov ch, dl ; High Cylinder Register (LBA 23...16) 185 mov bh, dh ; Drive and Head Register (LBA 27...24) 178 add bx, ax ; Add loword to BX (BL = Sector Number Register (LBA 7...0)) 179 adc ch, dl ; Add possible carry to byte2 (CH = High Cylinder Register (LBA 23...16)) 180 mov cl, bh ; CL = Low Cylinder Register (LBA 15...8) 181 mov bh, dh ; BH = Drive and Head Register (LBA 27...24) 186 182 ret
Note:
See TracChangeset
for help on using the changeset viewer.