Changeset 533 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Apr 3, 2013, 4:12:34 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r526 r533 118 118 mov [di+DPT.bPchsHeads], bl 119 119 %ifdef MODULE_EBIOS 120 mov [di+DPT.bPchsSectorsPerTrack], bh 121 122 %ifdef RESERVE_DIAGNOSTIC_CYLINDER 123 ; Do not store P-Cylinders, instead calculate it from L-CHS total sector count. 124 ; Read AH=48h_GetExtendedDriveParameters.asm for more info. 125 xchg ax, bx 126 mul ah 127 push ax ; P-Heads * P-Sectors per track 128 call AH15h_GetSectorCountToBXDXAX 129 pop bx 130 div bx ; AX = Calculated cylinders 131 %endif ; RESERVE_DIAGNOSTIC_CYLINDER 132 120 133 mov [di+DPT.wPchsCylinders], ax 121 mov [di+DPT.bPchsSectorsPerTrack], bh122 134 ; Fall to .StoreNumberOfLbaSectors 123 135 … … 141 153 call StoreLba48AddressingFromCLandTotalSectorCountFromBXDXAX 142 154 155 ; If we have 15,482,880 or less sectors, we multiply P-CHS values 156 ; and use that as total sector count. 157 ; Read AH=48h_GetExtendedDriveParameters.asm for more info. 158 sub ax, 4001h 159 sbb dx, 0ECh 160 sbb bx, BYTE 0 161 jnc SHORT .NoNeedToUseCHSsectorCount ; More than EC4000h 162 163 mov al, [di+DPT.bPchsHeads] 164 mul BYTE [di+DPT.bPchsSectorsPerTrack] 165 mul WORD [di+DPT.wPchsCylinders] 166 xor bx, bx 167 call StoreLba48AddressingFromCLandTotalSectorCountFromBXDXAX 168 143 169 ; Load user defined LBA 170 .NoNeedToUseCHSsectorCount: 144 171 call GetUserDefinedCapacityToBXAXandFlagsToCXandModeToDXfromROMVARS 145 172 test cl, FLG_DRVPARAMS_USERLBA
Note:
See TracChangeset
for help on using the changeset viewer.