Changeset 294 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot
- Timestamp:
- Mar 4, 2012, 1:35:10 AM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Boot
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
r258 r294 43 43 call RamVars_GetSegmentToDS 44 44 ;;; fall-through 45 45 46 46 ALIGN JUMP_ALIGN 47 47 BootMenu_GetDriveToDXforMenuitemInCX: … … 136 136 BootMenu_GetMenuitemToAXforAsciiHotkeyInAL: 137 137 call Char_ALtoUpperCaseLetter 138 xor ah, ah138 cbw 139 139 xchg ax, cx 140 140 call BootMenu_GetLetterForFirstHardDiskToAL -
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 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
r258 r294 24 24 ;-------------------------------------------------------------------- 25 25 .BootMenuPrintCfg_ForOurDrive: 26 eMOVZX ax, BYTE[di+DPT.bIdevarsOffset]26 eMOVZX ax, [di+DPT.bIdevarsOffset] 27 27 xchg bx, ax ; CS:BX now points to IDEVARS 28 28 ; Fall to .PushAndFormatCfgString … … 40 40 .PushAddressingMode: 41 41 AccessDPT_GetUnshiftedAddressModeToALZF 42 ;; 43 ;; This multiply both shifts the addressing mode bits down to low order bits, and 42 ;; 43 ;; This multiply both shifts the addressing mode bits down to low order bits, and 44 44 ;; at the same time multiplies by the size of the string displacement. The result is in AH, 45 45 ;; with AL clear, and so we exchange AL and AH after the multiply for the final result. 46 ;; 46 ;; 47 47 mov cl,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement 48 48 mul cl … … 50 50 add ax,g_szAddressingModes 51 51 push ax 52 52 53 53 ;-------------------------------------------------------------------- 54 54 ; PushBlockMode … … 82 82 mov al,g_szBusTypeValues_Displacement 83 83 mul BYTE [cs:bx+IDEVARS.bDevice] 84 84 85 85 shr ax,1 ; divide by 2 since IDEVARS.bDevice is multiplied by 2 86 86 87 87 add ax,g_szBusTypeValues 88 push ax 89 88 push ax 89 90 90 ;-------------------------------------------------------------------- 91 91 ; PushIRQ … … 99 99 ;-------------------------------------------------------------------- 100 100 .PushIRQ: 101 mov al, BYTE[cs:bx+IDEVARS.bIRQ]101 mov al, [cs:bx+IDEVARS.bIRQ] 102 102 cbw 103 103 push ax -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm
r148 r294 11 11 ; DS: RAMVARS segment 12 12 ; Returns: 13 ; ES:BX: Ptr to boot sector (if successful l)14 ; CF: Set if boot sector loaded succes fully13 ; ES:BX: Ptr to boot sector (if successful) 14 ; CF: Set if boot sector loaded successfully 15 15 ; Cleared if failed to load boot sector 16 16 ; Corrupts registers: … … 46 46 ; Returns: 47 47 ; AH: INT 13h error code 48 ; ES:BX: Ptr to boot sector (if successful l)49 ; CF: Cleared if read successful l48 ; ES:BX: Ptr to boot sector (if successful) 49 ; CF: Cleared if read successful 50 50 ; Set if any error 51 51 ; Corrupts registers: … … 73 73 ; Returns: 74 74 ; AH: INT 13h error code 75 ; CF: Cleared if read successful l75 ; CF: Cleared if read successful 76 76 ; Set if any error 77 77 ; Corrupts registers: … … 96 96 ; AH: INT 13h error code 97 97 ; ES:BX: Ptr to boot sector 98 ; CF: Cleared if read successful l98 ; CF: Cleared if read successful 99 99 ; Set if any error 100 100 ; Corrupts registers:
Note:
See TracChangeset
for help on using the changeset viewer.