Changeset 505 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
- Timestamp:
- Feb 25, 2013, 4:23:09 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r493 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 107 107 ; The following macro could be easily inlined below. Why a macro? Depending on the combination 108 108 ; of MODULE_HOTKEYS or MODULE_BOOT_MENU, this code needs to either come before or after the 109 ; call to the boot menu. 109 ; call to the boot menu. 110 110 ; 111 111 %macro TRY_TO_BOOT_DL_AND_DH_DRIVES 0 112 112 push dx ; it's OK if this is left on the stack, if we are 113 ; aresuccessful, the following call does not return113 ; successful, the following call does not return 114 114 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 115 115 pop dx … … 117 117 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 118 118 %endmacro 119 120 %ifdef MODULE_HOTKEYS 121 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 119 120 %ifdef MODULE_HOTKEYS 121 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 122 122 cmp al, ROM_BOOT_HOTKEY_SCANCODE 123 j z.RomBoot ; CF clear so ROM boot123 je .RomBoot ; CF clear so ROM boot 124 124 %ifdef MODULE_BOOT_MENU 125 125 cmp al, BOOT_MENU_HOTKEY_SCANCODE 126 j z.BootMenu126 je .BootMenu 127 127 %endif 128 128 call HotkeyBar_GetBootDriveNumbersToDX … … 130 130 TRY_TO_BOOT_DL_AND_DH_DRIVES 131 131 ;; falls through to boot menu, if it is present. If not present, falls through to rom boot. 132 %endif 132 %endif ; MODULE_HOTKEYS 133 133 134 134 %ifdef MODULE_BOOT_MENU 135 .BootMenu: 135 .BootMenu: 136 136 call BootMenu_DisplayAndReturnDriveInDLRomBootClearCF 137 137 jnc .RomBoot ; CF clear so ROM boot 138 138 139 139 mov dh, dl ; Setup for secondary drive 140 not dh ; Floppy goes to HD, or vice ver as141 and dh, 080h; Go to first drive of the floppy or HD set140 not dh ; Floppy goes to HD, or vice versa 141 and dh, 80h ; Go to first drive of the floppy or HD set 142 142 143 143 %ifdef MODULE_HOTKEYS 144 144 jmp .TryUsingHotKeysCode 145 145 %else 146 TRY_TO_BOOT_DL_AND_DH_DRIVES 146 TRY_TO_BOOT_DL_AND_DH_DRIVES 147 147 jmp .BootMenu 148 148 %endif 149 %endif 150 151 %ifndef MODULE_HOTKEYS 152 %ifndef MODULE_BOOT_MENU 149 %endif ; MODULE_BOOT_MENU 150 151 %ifndef MODULE_HOTKEYS OR MODULE_BOOT_MENU 153 152 xor dl, dl ; Try to boot from Floppy Drive A 154 153 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 155 154 mov dl, 80h ; Try to boot from Hard Drive C 156 155 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 157 %endif158 156 %endif 159 157 … … 162 160 call DriveXlate_Reset ; Clean up any drive mappings before Rom Boot 163 161 %endif 164 clc 162 clc 165 163 ;; fall through to JumpToBootSector_or_RomBoot 166 164 … … 174 172 ; Parameters: 175 173 ; DL: Drive to boot from (translated, 00h or 80h) 176 ; CF: Set for Boot Sector Boot 174 ; CF: Set for Boot Sector Boot 177 175 ; Clear for ROM Boot 178 176 ; ES:BX: (if CF set) Ptr to boot sector … … 187 185 188 186 ; clear segment registers before boot sector or rom call 189 mov ds, ax 187 mov ds, ax 190 188 mov es, ax 191 189 %ifdef USE_386 … … 202 200 ; Boot by calling INT 18h (ROM Basic of ROM DOS) 203 201 .romboot: 204 int BIOS_BOOT_FAILURE_INTERRUPT_18h ; Never returns 205 206 207 ;-------------------------------------------------------------------- 208 ; TryToBootFromPrimaryOrSecondaryBootDevice 202 int BIOS_BOOT_FAILURE_INTERRUPT_18h ; Never returns 203 204 205 ;-------------------------------------------------------------------- 206 ; TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 209 207 ; Parameters 210 208 ; DL: Drive selected as boot device … … 229 227 230 228 TryToBoot_FallThroughTo_BootSector_TryToLoadFromDriveDL_AndBoot: 231 ; fall through to BootSector_TryToLoadFromDriveDL_AndBoot 232 %endif 233 234 229 ; fall through to BootSector_TryToLoadFromDriveDL_AndBoot 230 %endif 231
Note:
See TracChangeset
for help on using the changeset viewer.