Changeset 150 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot
- Timestamp:
- Apr 29, 2011, 7:04:13 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Boot
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r135 r150 111 111 BootMenuPrint_HardDiskMenuitem: 112 112 call PrintDriveNumberAfterTranslationFromDL 113 call FindDPT_ForDriveNumber ; DS:DI to point DPT113 call RamVars_IsDriveHandledByThisBIOS 114 114 jnc SHORT .HardDiskMenuitemForForeignDrive 115 115 ; Fall to .HardDiskMenuitemForOurDrive … … 280 280 ALIGN JUMP_ALIGN 281 281 BootMenuPrint_HardDiskMenuitemInformation: 282 call RamVars_IsDriveHandledByThisBIOS 283 jnc SHORT .HardDiskMenuitemInfoForForeignDrive 282 284 call FindDPT_ForDriveNumber ; DS:DI to point DPT 283 jnc SHORT .HardDiskMenuitemInfoForForeignDrive284 285 ; Fall to .HardDiskMenuitemInfoForOurDrive 285 286 … … 303 304 304 305 ; Get and push L-CHS size 305 call HCapacity_GetSectorCountFromOurAH08h 306 mov [RAMVARS.wTimeoutCounter], dl ; Store drive number 307 call AH15h_GetSectorCountToDXAX 306 308 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 307 309 308 310 ; Get and push total LBA size 309 mov dl, [ di+DPT.bDrvNum]311 mov dl, [RAMVARS.wTimeoutCounter] ; Restore drive number 310 312 call BootInfo_GetTotalSectorCount 311 313 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat … … 332 334 333 335 call DriveXlate_ToOrBack 334 call HCapacity_GetSectorCountFromForeignAH08h336 call AH15h_GetSectorCountFromForeignDriveToDXAX 335 337 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 336 338 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
r127 r150 17 17 ; Nothing 18 18 ; Corrupts registers: 19 ; AX, BX, CX, DX, SI, DI , ES19 ; AX, BX, CX, DX, SI, DI 20 20 ;-------------------------------------------------------------------- 21 21 ALIGN JUMP_ALIGN … … 24 24 mov si, g_szCfgHeader 25 25 call BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 26 call BootMenuPrintCfg_GetPointers 26 eMOVZX ax, BYTE [di+DPT.bIdevarsOffset] 27 xchg si, ax ; CS:SI now points to IDEVARS 27 28 ; Fall to PushAndFormatCfgString 28 29 29 30 30 ;-------------------------------------------------------------------- … … 32 32 ; Parameters: 33 33 ; DS:DI: Ptr to DPT 34 ; ES:BX: Ptr to BOOTNFO35 34 ; CS:SI: Ptr to IDEVARS 36 35 ; Returns: … … 48 47 ; Parameters: 49 48 ; DS:DI: Ptr to DPT 50 ; ES:BX: Ptr to BOOTNFO51 49 ; CS:SI: Ptr to IDEVARS 52 50 ; Returns: … … 56 54 ;-------------------------------------------------------------------- 57 55 PushAddressingMode: 58 xchg ax, bx 59 mov bx, MASK_DPT_ADDR ; Load addressing mode mask 60 and bl, [di+DPT.bFlags] ; Addressing mode now in BX 61 push WORD [cs:bx+.rgszAddressingModeString] 62 xchg bx, ax 63 jmp SHORT .NextPush 64 ALIGN WORD_ALIGN 65 .rgszAddressingModeString: 66 dw g_szLCHS 67 dw g_szPCHS 68 dw g_szLBA28 69 dw g_szLBA48 70 ALIGN JUMP_ALIGN 71 .NextPush: 56 call AccessDPT_GetAddressingModeForWordLookToBX 57 push WORD [cs:bx+rgszAddressingModeString] 72 58 73 59 ;-------------------------------------------------------------------- … … 75 61 ; Parameters: 76 62 ; DS:DI: Ptr to DPT 77 ; ES:BX: Ptr to BOOTNFO78 63 ; CS:SI: Ptr to IDEVARS 79 64 ; Returns: … … 83 68 ;-------------------------------------------------------------------- 84 69 PushBlockMode: 85 eMOVZX ax, BYTE [di+DPT.bSetBlock] 70 mov ax, 1 71 test WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED 72 jz SHORT .PushBlockSizeFromAX 73 mov al, [di+DPT_ATA.bSetBlock] 74 .PushBlockSizeFromAX: 86 75 push ax 87 76 … … 90 79 ; Parameters: 91 80 ; DS:DI: Ptr to DPT 92 ; ES:BX: Ptr to BOOTNFO93 81 ; CS:SI: Ptr to IDEVARS 94 82 ; Returns: … … 99 87 PushBusType: 100 88 xchg ax, bx ; Store BX to AX 101 eMOVZX bx, BYTE [cs:si+IDEVARS.b BusType]102 mov bx, [cs:bx+ .rgwBusTypeValues] ; Char to BL, Int to BH89 eMOVZX bx, BYTE [cs:si+IDEVARS.bDevice] 90 mov bx, [cs:bx+rgwBusTypeValues] ; Char to BL, Int to BH 103 91 eMOVZX dx, bh 104 92 push bx ; Push character 105 push dx ; Push 8, 16 or 3293 push dx ; Push 1, 8, 16 or 32 106 94 xchg bx, ax ; Restore BX 107 jmp SHORT .NextPush108 ALIGN WORD_ALIGN109 .rgwBusTypeValues:110 db 'D', 8 ; BUS_TYPE_8_DUAL111 db ' ', 16 ; BUS_TYPE_16112 db ' ', 32 ; BUS_TYPE_32113 db 'S', 8 ; BUS_TYPE_8_SINGLE114 ALIGN JUMP_ALIGN115 .NextPush:116 95 117 96 ;-------------------------------------------------------------------- … … 119 98 ; Parameters: 120 99 ; DS:DI: Ptr to DPT 121 ; ES:BX: Ptr to BOOTNFO122 100 ; CS:SI: Ptr to IDEVARS 123 101 ; Returns: … … 152 130 ; Parameters: 153 131 ; DS:DI: Ptr to DPT 154 ; ES:BX: Ptr to BOOTNFO155 132 ; CS:SI: Ptr to IDEVARS 156 133 ; Returns: … … 160 137 ;-------------------------------------------------------------------- 161 138 PushResetStatus: 162 eMOVZX ax, BYTE [di+DPT.bReset] 139 mov ax, [di+DPT.wFlags] 140 and ax, MASK_DPT_RESET 163 141 push ax 164 142 … … 177 155 178 156 179 ;-------------------------------------------------------------------- 180 ; BootMenuPrintCfg_GetPointers 181 ; Parameters: 182 ; DS:DI: Ptr to DPT 183 ; Returns: 184 ; DS:DI: Ptr to DPT 185 ; ES:BX: Ptr to BOOTNFO 186 ; CS:SI: Ptr to IDEVARS 187 ; Corrupts registers: 188 ; AX, DL 189 ;-------------------------------------------------------------------- 190 ALIGN JUMP_ALIGN 191 BootMenuPrintCfg_GetPointers: 192 mov dl, [di+DPT.bDrvNum] ; Load Drive number to DL 193 call BootInfo_GetOffsetToBX ; ES:BX now points... 194 LOAD_BDA_SEGMENT_TO es, ax, ! ; ...to BOOTNFO 195 mov al, [di+DPT.bIdeOff] 196 xchg si, ax ; CS:SI now points to IDEVARS 197 ret 157 ALIGN WORD_ALIGN 158 rgszAddressingModeString: 159 dw g_szLCHS 160 dw g_szPCHS 161 dw g_szLBA28 162 dw g_szLBA48 163 164 rgwBusTypeValues: 165 db 'D', 8 ; DEVICE_8BIT_DUAL_PORT_XTIDE 166 db 'X', 8 ; DEVICE_XTIDE_WITH_REVERSED_A3_AND_A0 167 db 'S', 8 ; DEVICE_8BIT_SINGLE_PORT 168 db ' ', 16 ; DEVICE_16BIT_ATA 169 db ' ', 32 ; DEVICE_32BIT_ATA 170 db ' ', 1 ; DEVICE_SERIAL_PORT
Note:
See TracChangeset
for help on using the changeset viewer.