Changeset 505 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm


Ignore:
Timestamp:
Feb 25, 2013, 4:23:09 PM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Reverted the changes to MenuEvents.inc done in r492 since they broke the F1 key function in XTIDECFG.
  • Added a tail-call optimized variant of the CALL_DISPLAY_LIBRARY macro (JMP_DISPLAY_LIBRARY).
  • Put a block size limit in AH1Eh_ChangeXTCFmodeBasedOnControlRegisterInAL. I think it's needed but if not, it's easy to remove.
  • Other optimizations and fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r493 r505  
    33
    44;
    5 ; XTIDE Universal BIOS and Associated Tools 
     5; XTIDE Universal BIOS and Associated Tools
    66; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    77;
     
    1010; the Free Software Foundation; either version 2 of the License, or
    1111; (at your option) any later version.
    12 ; 
     12;
    1313; This program is distributed in the hope that it will be useful,
    1414; but WITHOUT ANY WARRANTY; without even the implied warranty of
    1515; 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.
    1717; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    18 ;       
     18;
    1919
    2020; Section containing code
     
    107107; The following macro could be easily inlined below.  Why a macro?  Depending on the combination
    108108; 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.
    110110;
    111111%macro TRY_TO_BOOT_DL_AND_DH_DRIVES 0
    112112    push    dx                                  ; it's OK if this is left on the stack, if we are
    113                                                 ; are successful, the following call does not return
     113                                                ; successful, the following call does not return
    114114    call    TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot
    115115    pop     dx
     
    117117    call    TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot
    118118%endmacro
    119                
    120 %ifdef MODULE_HOTKEYS
    121     call    HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars       
     119
     120%ifdef MODULE_HOTKEYS
     121    call    HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars
    122122    cmp     al, ROM_BOOT_HOTKEY_SCANCODE
    123     jz      .RomBoot                            ; CF clear so ROM boot
     123    je      .RomBoot                            ; CF clear so ROM boot
    124124%ifdef MODULE_BOOT_MENU
    125125    cmp     al, BOOT_MENU_HOTKEY_SCANCODE
    126     jz      .BootMenu
     126    je      .BootMenu
    127127%endif
    128128    call    HotkeyBar_GetBootDriveNumbersToDX
     
    130130    TRY_TO_BOOT_DL_AND_DH_DRIVES
    131131    ;; falls through to boot menu, if it is present.  If not present, falls through to rom boot.
    132 %endif
     132%endif ; MODULE_HOTKEYS
    133133
    134134%ifdef MODULE_BOOT_MENU
    135 .BootMenu:     
     135.BootMenu:
    136136    call    BootMenu_DisplayAndReturnDriveInDLRomBootClearCF
    137137    jnc     .RomBoot                            ; CF clear so ROM boot
    138138
    139139    mov     dh, dl                              ; Setup for secondary drive
    140     not     dh                                  ; Floppy goes to HD, or vice veras
    141     and     dh, 080h                            ; Go to first drive of the floppy or HD set
     140    not     dh                                  ; Floppy goes to HD, or vice versa
     141    and     dh, 80h                             ; Go to first drive of the floppy or HD set
    142142
    143143%ifdef MODULE_HOTKEYS
    144144    jmp     .TryUsingHotKeysCode
    145145%else
    146     TRY_TO_BOOT_DL_AND_DH_DRIVES       
     146    TRY_TO_BOOT_DL_AND_DH_DRIVES
    147147    jmp     .BootMenu
    148148%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
    153152    xor     dl, dl          ; Try to boot from Floppy Drive A
    154153    call    TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot
    155154    mov     dl, 80h         ; Try to boot from Hard Drive C
    156155    call    TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot
    157 %endif
    158156%endif
    159157
     
    162160    call    DriveXlate_Reset                    ; Clean up any drive mappings before Rom Boot
    163161%endif
    164     clc     
     162    clc
    165163    ;; fall through to JumpToBootSector_or_RomBoot
    166164
     
    174172;   Parameters:
    175173;       DL:     Drive to boot from (translated, 00h or 80h)
    176 ;       CF:     Set for Boot Sector Boot 
     174;       CF:     Set for Boot Sector Boot
    177175;               Clear for ROM Boot
    178176;       ES:BX:  (if CF set) Ptr to boot sector
     
    187185
    188186; clear segment registers before boot sector or rom call
    189     mov     ds, ax     
     187    mov     ds, ax
    190188    mov     es, ax
    191189%ifdef USE_386
     
    202200; Boot by calling INT 18h (ROM Basic of ROM DOS)
    203201.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
    209207;   Parameters
    210208;       DL:     Drive selected as boot device
     
    229227
    230228TryToBoot_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.