Changeset 230 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers
- Timestamp:
- Jan 29, 2012, 11:22:19 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r229 r230 45 45 mov WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS 46 46 47 push ds ; Move CS to DS to avoid segment overrides 48 push cs 49 pop ds 50 47 51 ; Limit LBA if necessary 48 test BYTE [ cs:di+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERLBA52 test BYTE [di+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERLBA 49 53 jz SHORT .StoreTotalSectorsFromBXDXAX 50 54 test bx, bx 51 55 jnz SHORT .LimitTotalSectors 52 cmp dx, [ cs:di+DRVPARAMS.dwMaximumLBA+2]56 cmp dx, [di+DRVPARAMS.dwMaximumLBA+2] 53 57 jb SHORT .StoreTotalSectorsFromBXDXAX ; Real size less than max 54 58 ja SHORT .LimitTotalSectors 55 cmp ax, [ cs:di+DRVPARAMS.dwMaximumLBA]59 cmp ax, [di+DRVPARAMS.dwMaximumLBA] 56 60 jbe SHORT .StoreTotalSectorsFromBXDXAX ; Real size less than max 57 61 58 62 .LimitTotalSectors: 59 63 xor bx, bx 60 mov ax, [ cs:di+DRVPARAMS.dwMaximumLBA]61 mov dx, [ cs:di+DRVPARAMS.dwMaximumLBA+2]64 mov ax, [di+DRVPARAMS.dwMaximumLBA] 65 mov dx, [di+DRVPARAMS.dwMaximumLBA+2] 62 66 63 67 .StoreTotalSectorsFromBXDXAX: 68 pop ds ; Restore DS from the change above 64 69 mov [si+EDRIVE_INFO.qwTotalSectors], ax 65 70 xor ax, ax ; Return with success -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
r227 r230 86 86 Address_OldInt13hAddressToIdeAddress: 87 87 call Address_ExtractLCHSparametersFromOldInt13hAddress 88 88 89 89 AccessDPT_GetUnshiftedAddressModeToALZF 90 91 ;;; 0: ADDR_DPT_LCHS 92 jz DoNotConvertLCHS 93 90 91 ;;; 0: ADDR_DPT_LCHS 92 jz DoNotConvertLCHS 93 94 94 ;;; 1: ADDR_DPT_PCHS 95 ; 95 ; 96 96 ; Since we are only checking for zero, we can do our math in the high order bits, 97 97 ; in this case effectively subtracting 1 from the address mode. 98 98 ; 99 99 sub al,(1<<ADDRESSING_MODE_FIELD_POSITION) 100 jz ConvertLCHStoPCHS 100 jz ConvertLCHStoPCHS 101 101 102 ;;; 2: ADDR_DPT_LBA28 and 3: ADDR_DPT_LBA48 103 ; Fall through to ConvertLCHStoLBARegisterValues 104 102 ;;; 2: ADDR_DPT_LBA28 and 3: ADDR_DPT_LBA48 103 ; Fall through to ConvertLCHStoLBARegisterValues 104 105 105 ;--------------------------------------------------------------------- 106 106 ; Converts LCHS parameters to 28-bit LBA address. … … 129 129 ; cylToSeek*headsPerCyl (18-bit result) 130 130 mov ax, cx ; Copy Cylinder number to AX 131 ; We could save a byte here by using CWD instead of the XOR DH, DH in eMOVZX 132 ; but I'm not sure how that would affect speed. 133 131 134 eMOVZX dx, BYTE [di+DPT.bLbaHeads] 132 135 mul dx ; DX:AX = cylToSeek*headsPerCyl
Note:
See TracChangeset
for help on using the changeset viewer.