Changeset 258 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
- Timestamp:
- Feb 22, 2012, 7:01:53 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r255 r258 24 24 25 25 call RamVars_IsDriveHandledByThisBIOS 26 j nc .notOurs26 jc .notOurs 27 27 28 28 call FindDPT_ForDriveNumber ; if it is one of ours, print the string in bootnfo … … 47 47 push ax ; the hard disks don't ever use it, but it does no harm) 48 48 49 jmp short BootMenuPrint_ FormatCSSIfromParamsInSSBP49 jmp short BootMenuPrint_RefreshInformation.FormatRelay 50 50 51 51 ;-------------------------------------------------------------------- … … 87 87 push bp 88 88 mov bp,sp 89 jmp short BootMenuPrint_ FormatCSSIfromParamsInSSBP89 jmp short BootMenuPrint_RefreshInformation.FormatRelay 90 90 91 91 … … 110 110 mov bp, sp 111 111 112 mov si, g_szCapacity ; Setup print string now, carries through to print call 113 114 xor di, di 115 call RamVars_IsDriveHandledByThisBIOS 116 jc SHORT .notours 117 call FindDPT_ForDriveNumber ; DS:DI to point DPT 118 .notours: 119 112 120 test dl, dl ; are we a hard disk? 113 121 js BootMenuPrint_HardDiskRefreshInformation 114 122 123 test di,di 124 jnz .ours 115 125 call FloppyDrive_GetType ; Get Floppy Drive type to BX 126 jmp .around 127 .ours: 128 call AH8h_GetDriveParameters 129 .around: 116 130 117 131 mov ax, g_szFddSizeOr ; .PrintXTFloppyType 118 test b x, bx; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)132 test bl, bl ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD) 119 133 jz SHORT .PushAXAndOutput 120 134 … … 158 172 159 173 mov al,FloppyTypes.rgbCapacityMultiplier 174 mov bh, 0 160 175 mul byte [cs:bx+FloppyTypes.rgbCapacity - 1] ; -1 since 0 is handled above and not in the table 161 176 … … 163 178 push ax 164 179 165 jmp short BootMenuPrint_HardDiskRefreshInformation.output 180 .FormatRelay: 181 jmp short BootMenuPrint_FormatCSSIfromParamsInSSBP 166 182 167 183 … … 180 196 ALIGN JUMP_ALIGN 181 197 BootMenuPrint_HardDiskRefreshInformation: 182 call RamVars_IsDriveHandledByThisBIOS 183 jnc SHORT .HardDiskMenuitemInfoForForeignDrive 184 call FindDPT_ForDriveNumber ; DS:DI to point DPT 185 ; Fall to .HardDiskMenuitemInfoForOurDrive 186 187 ;-------------------------------------------------------------------- 188 ; .HardDiskMenuitemInfoForOurDrive 189 ; Parameters: 190 ; DL: Untranslated Hard Disk number 191 ; DS:DI: Ptr to DPT 192 ; Returns: 193 ; Nothing 194 ; Corrupts registers: 195 ; AX, BX, CX, DX, SI, DI, ES 196 ;-------------------------------------------------------------------- 198 test di,di 199 jz .HardDiskMenuitemInfoForForeignDrive 200 197 201 .HardDiskMenuitemInfoForOurDrive: 198 202 ePUSH_T ax, g_szInformation … … 200 204 ; Get and push total LBA size 201 205 call BootMenuInfo_GetTotalSectorCount 202 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 203 jmp BootMenuPrintCfg_ForOurDrive 204 205 ;-------------------------------------------------------------------- 206 ; .HardDiskMenuitemInfoForForeignDrive 207 ; Parameters: 208 ; DL: Untranslated Hard Disk number 209 ; DS: RAMVARS segment 210 ; Returns: 211 ; CF: Set since menu event was handled successfully 212 ; Corrupts registers: 213 ; AX, BX, CX, DX, SI, DI 214 ;-------------------------------------------------------------------- 215 ALIGN JUMP_ALIGN 206 jmp .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 207 216 208 .HardDiskMenuitemInfoForForeignDrive: 217 209 call DriveXlate_ToOrBack 218 210 call AH15h_GetSectorCountFromForeignDriveToDXAX 219 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 220 221 ALIGN JUMP_ALIGN 222 .output: 223 mov si, g_szCapacity 224 ;;; fall-through 211 212 .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat: 213 ePUSH_T cx, g_szCapacityNum ; Push format substring 214 call Size_ConvertSectorCountInBXDXAXtoKiB 215 mov cx, BYTE_MULTIPLES.kiB 216 call Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX 217 push ax ; Size in magnitude 218 push cx ; Tenths 219 push dx ; Magnitude character 220 221 test di,di 222 jz short BootMenuPrint_FormatCSSIfromParamsInSSBP 223 224 %include "BootMenuPrintCfg.asm" ; inline of code to fill out remainder of information string 225 226 ;;; fall-through to BootMenuPrint_FormatCSSIfromParamsInSSBP 227 225 228 226 229 ;-------------------------------------------------------------------- … … 273 276 ALIGN JUMP_ALIGN 274 277 BootMenuPrint_TheBottomOfScreen: 275 call FloppyDrive_GetCountTo CX276 mov bl, cl; Floppy Drive count to BL277 call RamVars_GetHardDiskCountFromBDAto CX278 mov bh, cl ; Hard Disk count to BH278 call FloppyDrive_GetCountToAX 279 xchg bx, ax ; Floppy Drive count to BL 280 call RamVars_GetHardDiskCountFromBDAtoAX 281 mov bh, al ; Hard Disk count to BH 279 282 ; Fall to .MoveCursorToHotkeyStrings 280 283 … … 321 324 test bh, bh ; Any Hard Drives? 322 325 jz SHORT .SkipHardDriveHotkeys 323 xchg ax, cx ; Store Key Attribute 324 call BootMenu_GetLetterForFirstHardDiskToCL 325 mov ch, ANGLE_QUOTE_RIGHT 326 xchg ax, cx 326 call BootMenu_GetLetterForFirstHardDiskToAL 327 mov ah, ANGLE_QUOTE_RIGHT 327 328 mov si, g_szHDD 328 329 call PushHotkeyParamsAndFormat … … 390 391 CALL_DISPLAY_LIBRARY InitializeDisplayContext 391 392 ret 392 393 394 ;--------------------------------------------------------------------395 ; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat396 ; Parameters:397 ; BX:DX:AX: Sector count398 ; Returns:399 ; Size in stack400 ; Corrupts registers:401 ; AX, BX, CX, DX, SI402 ;--------------------------------------------------------------------403 ALIGN JUMP_ALIGN404 ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:405 pop si ; Pop return address406 ePUSH_T cx, g_szCapacityNum ; Push format substring407 call Size_ConvertSectorCountInBXDXAXtoKiB408 mov cx, BYTE_MULTIPLES.kiB409 call Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX410 push ax ; Size in magnitude411 push cx ; Tenths412 push dx ; Magnitude character413 jmp si414 393 415 394
Note:
See TracChangeset
for help on using the changeset viewer.