Changeset 191 in xtideuniversalbios
- Timestamp:
- Nov 16, 2011, 8:47:56 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
r186 r191 51 51 ; Nothing (jumps to next push below) 52 52 ; Corrupts registers: 53 ; AX 53 ; AX, BX 54 54 ;-------------------------------------------------------------------- 55 55 PushAddressingMode: 56 call AccessDPT_GetAddressingMode ForWordLookToBX57 mov al,g_szAddressingModes_Displacement56 call AccessDPT_GetAddressingModeToAXZF 57 mov bl,g_szAddressingModes_Displacement 58 58 mul bl 59 59 add ax,g_szAddressingModes -
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. -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
r181 r191 42 42 43 43 ;-------------------------------------------------------------------- 44 ; AccessDPT_GetAddressingMode ForWordLookToBX44 ; AccessDPT_GetAddressingModeToAXZF 45 45 ; Parameters: 46 46 ; DS:DI: Ptr to Disk Parameter Table 47 47 ; Returns: 48 ; BX: Addressing Mode (L-CHS, P-CHS, LBA28, LBA48) shifted for WORD lookup 48 ; AX: Addressing Mode (L-CHS, P-CHS, LBA28, LBA48) 49 ; ZF: Set if AX=0 49 50 ; Corrupts registers: 50 51 ; Nothing 51 52 ;-------------------------------------------------------------------- 52 53 ALIGN JUMP_ALIGN 53 AccessDPT_GetAddressingMode ForWordLookToBX:54 mov bl, [di+DPT.bFlagsLow]55 and bx, BYTE MASKL_DPT_ADDRESSING_MODE56 eSHR_IM bx, ADDRESSING_MODE_FIELD_POSITION-154 AccessDPT_GetAddressingModeToAXZF: 55 mov al, [di+DPT.bFlagsLow] 56 and ax, BYTE MASKL_DPT_ADDRESSING_MODE 57 eSHR_IM ax, ADDRESSING_MODE_FIELD_POSITION 57 58 ret 58 59
Note:
See TracChangeset
for help on using the changeset viewer.