Changeset 589 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu
- Timestamp:
- May 22, 2016, 12:26:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
r583 r589 39 39 mov si, g_szRomBootDash ; Standard "Rom Boot" but with a "-" at the front 40 40 mov al, 20h ; The space between "Rom" and "Boot" 41 jnc .ROMBoot; display "Rom Boot" option for last entry41 jnc SHORT .ROMBoot ; display "Rom Boot" option for last entry 42 42 43 43 call FindDPT_ForDriveNumberInDL 44 jc .notOurs44 jc SHORT .notOurs 45 45 46 46 call DriveDetectInfo_ConvertDPTtoBX 47 47 mov si, g_szDriveNumBOOTNFO ; special g_szDriveNum that prints from BDA 48 jmp .go48 jmp SHORT .go 49 49 50 50 .notOurs: 51 mov si, g_szDriveNum52 mov bx, g_szForeignHD ; assume a hard disk for the moment51 mov si, g_szDriveNum 52 mov bx, g_szForeignHD ; assume a hard disk for the moment 53 53 54 54 test dl, dl 55 js .go56 mov bl, ((g_szFloppyDrv)-$$ & 0xff) ; and revisit the earlier assumption...55 js SHORT .go 56 mov bl, ((g_szFloppyDrv)-$$ & 0xff) ; and revisit the earlier assumption... 57 57 58 58 .go: … … 60 60 call DriveXlate_ToOrBack 61 61 62 test dl, 0f0h ; if there is a character in the upper nibble 63 jnz .noSpace 64 dec si ; backup a character to a leading space 65 .noSpace: 62 cmp dl, 10h ; Check if there is a character in the upper nibble 63 sbb si, 0 ; If not, backup a character to a leading space 66 64 67 65 push dx ; translated drive number … … 86 84 ;-------------------------------------------------------------------- 87 85 BootMenuPrint_TitleStrings: 88 xor di, di ; Null character will be eaten86 xor di, di ; Null character will be eaten 89 87 mov si, g_szBootMenuTitle 90 88 jmp DetectPrint_RomFoundAtSegment.BootMenuEntry … … 105 103 106 104 call BootMenu_GetDriveToDXforMenuitemInCX 107 jnc BootMenuEvent_Completed; nothing to display if "Rom Boot" option105 jnc SHORT BootMenuEvent_Completed ; nothing to display if "Rom Boot" option 108 106 109 107 push bp … … 116 114 inc dl ; are we a hard disk? 117 115 dec dl ; inc/dec will set SF, without modifying CF or DL 118 js .HardDiskRefreshInformation119 120 jnc .ours; Based on CF from FindDPT_ForDriveNumberInDL above116 js SHORT .HardDiskRefreshInformation 117 118 jnc SHORT .ours ; Based on CF from FindDPT_ForDriveNumberInDL above 121 119 call FloppyDrive_GetType ; Get Floppy Drive type to BX 122 jmp .around120 jmp SHORT .around 123 121 .ours: 124 122 call AH8h_GetDriveParameters … … 132 130 cmp bl, FLOPPY_TYPE_35_ED 133 131 ja SHORT .PushAXAndOutput 134 135 132 ; Fall to .PrintKnownFloppyType 136 133 … … 162 159 mov al, (g_szFddThreeHalf - $$) & 0xff 163 160 cmp bl, FLOPPY_TYPE_525_HD 164 ja .ThreeHalf161 ja SHORT .ThreeHalf 165 162 mov al, (g_szFddFiveQuarter - $$) & 0xff 166 163 .ThreeHalf: … … 168 165 169 166 xor bh, bh 170 mov al, FloppyTypes.rgbCapacityMultiplier167 mov al, FloppyTypes.rgbCapacityMultiplier 171 168 mul BYTE [cs:bx+FloppyTypes.rgbCapacity - 1] ; -1 since 0 is handled above and not in the table 172 169 … … 184 181 ; Parameters: 185 182 ; DS: RAMVARS segment 183 ; DI: Zero if foreign drive 184 ; Offset to DPT if our drive 185 ; CF: Set if foreign drive 186 ; Clear if our drive 186 187 ; Returns: 187 188 ; CF: Set since menu event was handled successfully 188 189 ; Corrupts registers: 189 ; BX, CX, DX, SI, DI, ES190 ; AX, BX, CX, DX, SI, DI, ES 190 191 ;-------------------------------------------------------------------- 191 192 .HardDiskRefreshInformation: 192 jc .HardDiskMenuitemInfoForForeignDrive; Based on CF from FindDPT_ForDriveNumberInDL (way) above193 jc SHORT .HardDiskMenuitemInfoForForeignDrive ; Based on CF from FindDPT_ForDriveNumberInDL (way) above 193 194 194 195 .HardDiskMenuitemInfoForOurDrive: 195 196 ePUSH_T ax, g_szInformation ; Add substring for our hard disk information 196 call GetTotalSectorCount 197 jmp .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 197 198 %ifdef MODULE_EBIOS 199 ePUSH_T ax, .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 200 test BYTE [di+DPT.bFlagsLow], FLGL_DPT_LBA 201 %ifdef USE_386 202 jnz AccessDPT_GetLbaSectorCountToBXDXAX 203 jmp AH15h_GetSectorCountToBXDXAX 204 %else ; ~USE_386 205 jz SHORT .NoLBA 206 jmp AccessDPT_GetLbaSectorCountToBXDXAX 207 .NoLBA: 208 jmp AH15h_GetSectorCountToBXDXAX 209 %endif 210 %else ; ~MODULE_EBIOS 211 call AH15h_GetSectorCountToBXDXAX 212 jmp SHORT .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 213 %endif ; MODULE_EBIOS 198 214 199 215 .HardDiskMenuitemInfoForForeignDrive: … … 226 242 db 2880 / FloppyTypes.rgbCapacityMultiplier ; type 5 227 243 db 2880 / FloppyTypes.rgbCapacityMultiplier ; type 6 228 229 230 ;--------------------------------------------------------------------231 ; GetTotalSectorCount232 ; Parameters:233 ; DS:DI: DPT Pointer234 ; Returns:235 ; BX:DX:AX: 48-bit sector count236 ; Corrupts registers:237 ; CX238 ;--------------------------------------------------------------------239 %ifdef MODULE_EBIOS240 GetTotalSectorCount EQU AccessDPT_GetLbaSectorCountToBXDXAX241 %else242 GetTotalSectorCount EQU AH15h_GetSectorCountToBXDXAX243 %endif
Note:
See TracChangeset
for help on using the changeset viewer.