Changeset 543 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
- Timestamp:
- Apr 16, 2013, 11:41:49 AM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r542 r543 144 144 xchg cx, ax 145 145 div cx ; AX = new P-Cylinders 146 147 ; We could remove wPchsCylinders from DPT if we calculate it on AH=48h 148 ; but that would require extra code so we save ROM space instead. 146 149 mov [di+DPT.wPchsCylinders], ax 147 150 148 ; Store CHS sector count as total sector count 151 ; Store CHS sector count as total sector count. We must not use 152 ; LBA sector count if it is 15,482,880 or less. 149 153 mul cx 150 154 xor bx, bx 151 xor cx, cx ; Clear LBA48 flag 152 jmp SHORT .StoreTotalSectorsFromBXDXAXandLBA48flagFromCL 155 jmp SHORT .StoreTotalSectorsFromBXDXAX 153 156 ; Fall to .StoreNumberOfLbaSectors 154 157 … … 167 170 ; Store LBA 28/48 total sector count 168 171 call AtaGeometry_GetLbaSectorCountToBXDXAXfromAtaInfoInESSI 169 .StoreTotalSectorsFromBXDXAXandLBA48flagFromCL: 170 or [di+DPT.bFlagsLow], cl 172 or [di+DPT.bFlagsLow], cl ; LBA48 flag 173 .StoreTotalSectorsFromBXDXAX: 171 174 mov [di+DPT.twLbaSectors], ax 172 175 mov [di+DPT.twLbaSectors+2], dx
Note:
See TracChangeset
for help on using the changeset viewer.