Changeset 191 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Timestamp:
- Nov 16, 2011, 8:47:56 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
r173 r191 4 4 ; Section containing code 5 5 SECTION .text 6 7 ; Jump table for conversion functions8 ALIGN WORD_ALIGN9 g_rgfnAddressTranslation:10 dw DoNotConvertLCHS ; 0, ADDR_DPT_LCHS11 dw ConvertLCHStoPCHS ; 1, ADDR_DPT_PCHS12 dw ConvertLCHStoLBARegisterValues ; 2, ADDR_DPT_LBA2813 dw ConvertLCHStoLBARegisterValues ; 3, ADDR_DPT_LBA4814 15 16 ;--------------------------------------------------------------------17 ; Address_OldInt13hAddressToIdeAddress18 ; Parameters:19 ; CH: Cylinder number, bits 7...020 ; CL: Bits 7...6: Cylinder number bits 9 and 821 ; Bits 5...0: Starting sector number (1...63)22 ; DH: Starting head number (0...255)23 ; DS:DI: Ptr to DPT24 ; Returns:25 ; BL: LBA Low Register / Sector Number Register (LBA 7...0)26 ; CL: LBA Mid Register / Low Cylinder Register (LBA 15...8)27 ; CH: LBA High Register / High Cylinder Register (LBA 23...16)28 ; BH: Drive and Head Register (LBA 27...24)29 ; Corrupts registers:30 ; AX, DX31 ;--------------------------------------------------------------------32 ALIGN JUMP_ALIGN33 Address_OldInt13hAddressToIdeAddress:34 call AccessDPT_GetAddressingModeForWordLookToBX35 push WORD [cs:bx+g_rgfnAddressTranslation] ; Push return address36 ; Fall to Address_ExtractLCHSparametersFromOldInt13hAddress37 6 38 7 ;--------------------------------------------------------------------- … … 50 19 ; Nothing 51 20 ;-------------------------------------------------------------------- 21 ALIGN JUMP_ALIGN 52 22 Address_ExtractLCHSparametersFromOldInt13hAddress: 53 23 mov bl, cl ; Copy sector number... … … 97 67 ret 98 68 99 69 ;-------------------------------------------------------------------- 70 ; Address_OldInt13hAddressToIdeAddress 71 ; Parameters: 72 ; CH: Cylinder number, bits 7...0 73 ; CL: Bits 7...6: Cylinder number bits 9 and 8 74 ; Bits 5...0: Starting sector number (1...63) 75 ; DH: Starting head number (0...255) 76 ; DS:DI: Ptr to DPT 77 ; Returns: 78 ; BL: LBA Low Register / Sector Number Register (LBA 7...0) 79 ; CL: LBA Mid Register / Low Cylinder Register (LBA 15...8) 80 ; CH: LBA High Register / High Cylinder Register (LBA 23...16) 81 ; BH: Drive and Head Register (LBA 27...24) 82 ; Corrupts registers: 83 ; AX, DX 84 ;-------------------------------------------------------------------- 85 ALIGN JUMP_ALIGN 86 Address_OldInt13hAddressToIdeAddress: 87 call Address_ExtractLCHSparametersFromOldInt13hAddress 88 call AccessDPT_GetAddressingModeToAXZF 89 jz DoNotConvertLCHS ; 0, ADDR_DPT_LCHS 90 dec ax 91 jz ConvertLCHStoPCHS ; 1, ADDR_DPT_PCHS 92 ;; Fall-through ; 2, ADDR_DPT_LBA28 and 3, ADDR_DPT_LBA48 93 100 94 ;--------------------------------------------------------------------- 101 95 ; Converts LCHS parameters to 28-bit LBA address.
Note:
See TracChangeset
for help on using the changeset viewer.