Changeset 294 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
- Timestamp:
- Mar 4, 2012, 1:35:10 AM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r262 r294 7 7 ;-------------------------------------------------------------------- 8 8 ; BootMenuPrint_RefreshItem 9 ; 9 ; 10 10 ; Parameters: 11 11 ; DL: Untranslated Floppy Drive number … … 19 19 call BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS 20 20 jnc BootMenuEvent_EventCompleted ; if no menu item selected, out we go 21 21 22 22 push bp 23 23 mov bp, sp … … 29 29 mov si, g_szDriveNumBOOTNFO ; special g_szDriveNum that prints from BDA 30 30 jmp .go 31 31 32 32 .notOurs: 33 mov si,g_szDriveNum 33 mov si,g_szDriveNum 34 34 mov bx,g_szForeignHD ; assume a hard disk for the moment 35 36 test dl, 80h35 36 test dl, dl 37 37 js .go 38 38 mov bl,((g_szFloppyDrv)-$$ & 0xff) ; and revisit the earlier assumption... 39 39 40 40 .go: 41 41 mov ax, dx ; preserve DL for the floppy drive letter addition … … 45 45 add al, 'A' ; floppy drive letter (we always push this although 46 46 push ax ; the hard disks don't ever use it, but it does no harm) 47 47 48 48 jmp short BootMenuPrint_RefreshInformation.FormatRelay 49 49 … … 88 88 jmp short BootMenuPrint_RefreshInformation.FormatRelay 89 89 90 90 91 91 ;-------------------------------------------------------------------- 92 92 ; BootMenuPrint_FloppyMenuitemInformation … … 101 101 ALIGN JUMP_ALIGN 102 102 BootMenuPrint_RefreshInformation: 103 CALL_MENU_LIBRARY ClearInformationArea 104 103 CALL_MENU_LIBRARY ClearInformationArea 104 105 105 call BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS 106 106 jnc BootMenuEvent_EventCompleted ; if no menu selection, abort … … 115 115 inc dl ; are we a hard disk? 116 116 dec dl ; inc/dec will set SF, without modifying CF or DL 117 js .HardDiskRefreshInformation 117 js .HardDiskRefreshInformation 118 118 119 119 jnc .ours ; Based on CF from FindDPT_ForDriveNumberInDL above … … 122 122 .ours: 123 123 call AH8h_GetDriveParameters 124 .around: 124 .around: 125 125 126 126 mov ax, g_szFddSizeOr ; .PrintXTFloppyType 127 test bl, bl ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD) 127 test bl, bl ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD) 128 128 jz SHORT .PushAXAndOutput 129 129 … … 131 131 cmp bl, FLOPPY_TYPE_35_ED 132 132 ja SHORT .PushAXAndOutput 133 133 134 134 ; Fall to .PrintKnownFloppyType 135 135 … … 142 142 ; Corrupts registers: 143 143 ; AX, BX, SI, DI 144 ; 144 ; 145 145 ; Floppy Drive Types: 146 146 ; 147 ; 0 Handled above 147 ; 0 Handled above 148 148 ; 1 FLOPPY_TYPE_525_DD 5 1/4 360K 149 149 ; 2 FLOPPY_TYPE_525_HD 5 1/4 1.2M … … 153 153 ; 6 FLOPPY_TYPE_35_ED 3 1/2 2.88M 154 154 ; >6 Unknwon, handled above 155 ; 155 ; 156 156 ;-------------------------------------------------------------------- 157 157 .PrintKnownFloppyType: 158 158 mov al, (g_szFddSize - $$) & 0xff 159 159 push ax 160 160 161 161 mov al, (g_szFddThreeHalf - $$) & 0xff 162 162 cmp bl, FLOPPY_TYPE_525_HD 163 163 ja .ThreeHalf 164 164 mov al, (g_szFddFiveQuarter - $$) & 0xff 165 .ThreeHalf: 165 .ThreeHalf: 166 166 push ax ; "5 1/4" or "3 1/2" 167 167 … … 170 170 mul byte [cs:bx+FloppyTypes.rgbCapacity - 1] ; -1 since 0 is handled above and not in the table 171 171 172 .PushAXAndOutput: 172 .PushAXAndOutput: 173 173 push ax 174 174 … … 189 189 ;-------------------------------------------------------------------- 190 190 ALIGN JUMP_ALIGN 191 .HardDiskRefreshInformation: 191 .HardDiskRefreshInformation: 192 192 jc .HardDiskMenuitemInfoForForeignDrive ; Based on CF from FindDPT_ForDriveNumberInDL (way) above 193 193 … … 196 196 call BootMenuInfo_GetTotalSectorCount ; Get Total LBA Size 197 197 jmp .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 198 198 199 199 .HardDiskMenuitemInfoForForeignDrive: 200 200 call DriveXlate_ToOrBack … … 208 208 push ax ; Size in magnitude 209 209 push cx ; Tenths 210 push dx ; Magnitude character 211 210 push dx ; Magnitude character 211 212 212 test di,di 213 213 jz short BootMenuPrint_FormatCSSIfromParamsInSSBP … … 225 225 ; Returns: 226 226 ; BP: Popped from stack 227 ; CF: Set since menu event was handled successfully 227 ; CF: Set since menu event was handled successfully 228 228 ; Corrupts registers: 229 229 ; AX, DI … … 232 232 BootMenuPrint_FormatCSSIfromParamsInSSBP: 233 233 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 234 stc ; Successful lreturn from menu event234 stc ; Successful return from menu event 235 235 pop bp 236 236 ret 237 238 237 238 239 239 ;-------------------------------------------------------------------- 240 240 ; BootMenuPrint_ClearScreen … … 364 364 push cx ; Key attribute for last space 365 365 mov si, g_szHotkey 366 367 BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay: 366 367 BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay: 368 368 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP 369 369
Note:
See TracChangeset
for help on using the changeset viewer.